Treex::Tool::Tagger::Featurama
version 0.08170
Perl wrapper for Featurama implementation of Collins' perceptron algorithm.
use Treex::Tool::Tagger::Featurama; my @wordforms = qw(John loves Jack); my $tagger = Treex::Tool::Tagger::Featurama->new(path => '/path/to/model'); my ($tags_rf, $lemmas_rf) = $tagger->tag_sentence(\@wordforms);
This method should provide all possible morphological analyses for the given wordform.
This method should return an array of feature names.
This method should return an array of features, given all wordforms in the sentence, all possible morphological analyses for each of the wordforms, and a position in the sentence. Since the features may include parts of the context, it is necessary to provide the whole sentence to this function. For example:
$featurama->_get_features( [qw(Time flies)], [[qw(NN NNP VB JJ)], [qw(VBZ NNS)]], 0 );
This method should extract tag and lemma given index in sentence and wordform. It will probably want to use $self->perc TODO this will probably change
Tomáš Kraut <kraut@ufal.mff.cuni.cz>
Ondřej Dušek <odusek@ufal.mff.cuni.cz>
Copyright © 2011-2012 by Institute of Formal and Applied Linguistics, Charles University in Prague
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Treex::Unilang, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Treex::Unilang
CPAN shell
perl -MCPAN -e shell install Treex::Unilang
For more information on module installation, please visit the detailed CPAN module installation guide.