Lingua::FreeLing3::HMMTagger - Interface to FreeLing3 HMMTagger
use Lingua::FreeLing3::HMMTagger; my $pt_tagger = Lingua::FreeLing3::HMMTagger->new("pt"); $taggedListOfSentences = $pt_tagger->analyze($listOfSentences);
Interface to the FreeLing3 hmm tagger library.
new
Object constructor. One argument is required: the languge code (Lingua::FreeLing3 will search for the tagger data file).
Lingua::FreeLing3
Returns the tagger object for that language, or undef in case of failure.
It understands the following options:
Retokenize
States whether words that carry retokenization information (e.g. set by the dictionary or affix handling modules) must be retokenized (that is, splitted in two or more words) after the tagging.
AmbiguityResolution
States whether and when the tagger must select only one analysis in case of ambiguity. Possible values are: FORCE_NONE: no selection forced, words ambiguous after the tagger, remain ambiguous. FORCE_TAGGER: force selection immediately after tagging, and before retokenization. FORCE_RETOK: force selection after retokenization.
KBest
This option, only available with FreeLing 3.1, states how many best tag sequences the tagger must try to compute. If not specified, this parameter defaults to 1. Since a sentence may have less possible tag sequences than the given k value, the results may contain a number of sequences smaller than k.
tag
Alias to analyze
analyze
Receives a list of sentences, and returns that same list of sentences after tagging process. Basically, selected the most probable (accordingly with the tagger model) analysis for each word.
Lingua::FreeLing3 (3), freeling, perl(1)
Alberto Manuel Brandão Simões, <ambs@cpan.org>
Jorge Cunha Mendes <jorgecunhamendes@gmail.com>
Copyright (C) 2011-2013 by Projecto Natura
To install Lingua::FreeLing3, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::FreeLing3
CPAN shell
perl -MCPAN -e shell install Lingua::FreeLing3
For more information on module installation, please visit the detailed CPAN module installation guide.