NAME
Lingua::Jspell::DictManager - a perl module for processing jspell dictionaries
SYNOPSIS
use Lingua::Jspell::DictManager;
$dict = init("dictionary file");
$dict->foreach_word( \&func );
$dict->for_this_cat_I_want_only_these_flags('nc', 'fp');
$dict->add_flag("p","linha","carro",...);
$dict->add_word({word=>'word',flags=>'zbr',CAT=>'np',G=>'f'},...)
remflag("f.dic","p","linha","carro",...);
DESCRIPTION
init
This function returns a new dictionary object to be used in future methods. It requires a string with the dictionary file name.
foreach_word
This method processes all words from the dictionary using the function passed as argument. This function is called with three arguments: the word, a reference to an associative array with the category information and a reference to a list of rules identifiers.
for_this_cat_I_want_only_these_flags
This method receives a gramatical category and a string with flags. It will print warning messages for each entry with that category and with a flag not described in the flags string.
for_this_cat_I_dont_want_these_flags
Works like the previous method, but will print warnings if any category uses one of the specificed flags.
not_categorized
This method returns a report for the entries without a category definition.
extra_words
This method tries to find redundant entries on the dictionary, producing an ouput file to be executed and delete the redundancy.
add_words
$dict->add_word({word=>'word',flags=>'zbr',CAT=>'np',G=>'f'},...)
delete_word
Deletes the word passed as argument.
add_flag
Adds the flags in the first argument to all words passed.
AUTHOR
Alberto Simoes, E<lt>albie@alfarrabio.di.uminho.ptE<gt>
J.Joao Almeida, E<lt>jj@di.uminho.ptE<gt>
SEE ALSO
Lingua::Jspell(3), jspell(1)