NAME
Lingua::FreeLing3::RelaxTagger - Interface to FreeLing3 RelaxTagger
SYNOPSIS
use Lingua::FreeLing3::RelaxTagger;
my $pt_tagger = Lingua::FreeLing3::RelaxTagger->new("pt");
$taggedListOfSentences = $pt_tagger->analyze($listOfSentences);
DESCRIPTION
Interface to the FreeLing3 relax tagger library.
new
Object constructor. One argument is required: the languge code (Lingua::FreeLing3
will search for the tagger data file).
The format of the constraint file is described in FreeLing documentation. This file can be generated from a tagged corpus using the script src/utilitities/TRAIN provided in FreeLing package. See comments in the script file to find out which format the corpus is expected to have.
The constructor returns the tagger object for that language, or undef in case of failure.
It understands the following options:
maxIterations
-
An integer stating the maximum number of iterations to wait for convergence before stopping the disambiguation algorithm. Default value if 500.
scaleFactor
-
A real number representing the scale factor of the constraint weights. Defaults to 670.
threshold
-
A real number representing the threshold under which any changes will be considered too small. Used to detect convergence. Defaults to 0.001.
retokenize
-
A boolean stating 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. Defaults to a true value.
ambiguityResolution
-
An options stating whether and when the tagger must select only one analysis in case of ambiguity. Possbile 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. Default isFORCE_RETOK
.
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.
SEE ALSO
Lingua::FreeLing3 (3), freeling, perl(1)
AUTHOR
Alberto Manuel Brandão Simões, <ambs@cpan.org>
Jorge Cunha Mendes <jorgecunhamendes@gmail.com>
COPYRIGHT AND LICENSE
Copyright (C) 2011 by Projecto Natura