NAME
Lingua::Jspell - Perl interface to the Jspell morphological analyser.
SYNOPSIS
use Lingua::Jspell;
my $dic = Lingua::Jspell->new( "dict_name");
my $dic = Lingua::Jspell->new( "dict_name" , "personal_dict_name");
$dict->rad("gatinho"); # list of radicals (gato)
$dict->fea("gatinho"); # list of possible analysis
$dict->der("gato"); # list of derivated words
$dict->flags("gato"); # list of roots and flags
FUNCTIONS
new
Use to open a dictionary. Pass it the dictionary name and optionally a personal dictionary name. A new jspell dictionary object will be returned.
setmode
fea
Returns a list of analisys of a word. Each analisys is a list of attribute value pairs. Attributes available: CAT, T, G, N, P, ....
@l = $dic->fea($word)
flags
returns the set of morphological flag associated with the word. Each flag is related with a set of morphological rules.
@f = flags("gato")
rad
Returns the list of all possible radicals/lemmas for the supplied word.
@l = $dic->rad($word)
der
Returns the list of all possible words using the word as radical.
@l = $dic->der($word);
onethat
Returns the first Feature Structure from the supplied list that verifies the Feature Structure Pattern used.
$analysis = onethat( { CAT=>'adj' }, @features);
$analysis = onethat( { CAT=>'adj' }, $pt->fea("espanhol"));
verif
Retuurns a true value if the second Feature Structure verifies the first Feature Structure Pattern.
if (verif( $pattern, $feature) ) { ... }
nlgrep
setstopwords
cat2small
Note: This function is specific for the Portuguese jspell dictionary
featags
Given a word, returns a set of analysis. Each analysis is a morphosintatic tag
@l= $pt->featags("lindas")
JFS , ...
featagsrad
Given a word, returns a set of analysis. Each analysis is a morphosintatic tag and the lemma information
@l= $pt->featagsrad("lindas")
JFS:lindo , ...
ok
# ok: cond:fs x ele:fs-set -> bool
# exist x in ele : verif(cond , x)
if(ok({CAT=>"adj"},$pt->fea("linda"))) { ... }
mkradtxt
any2str
Lingua::Jspell::any2str($ref)
Lingua::Jspell::any2str($ref,$indentation)
Lingua::Jspell::any2str($ref,"compact")
hash2str
AUTHOR
Jose Joao Almeida, <jj@di.uminho.pt>
Alberto Simões, <ambs@di.uminho.pt>
BUGS
Please report any bugs or feature requests to bug-lingua-jspell@rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lingua-Jspell. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
COPYRIGHT & LICENSE
Copyright 2007-2008 Projecto Natura
This program is free software; licensed undef GPL.