NAME

Treex::Tool::Tagger::Role - role for PoS taggers

VERSION

version 2.20151102

SYNOPSIS

package Treex::Tool::Tagger::Simple::XY;
use Moose;
with 'Treex::Tool::Tagger::Role';

REQUIRED METHODS

new({lemmatize=>1,...})

If the constructor parameter lemmatize has a true value and the tagger does not support lemmatization, it should immediately log_fatal. If <lemmatize> is false, the tagger can save some resources by not doing the lemmatization (i.e. method tag_sentence returning just $tags_rf). If the additional cost of lemmatization is low, the tagger may always lemmatize (i.e. ignoring the lemmatize parameter).

my ($tags_rf, $lemmas_rf) = $tagger->tag_sentence(\@words_forms);

If the tagger does not support lemmatization, it may return just $tags_rf.

COPYRIGHT AND LICENCE

Copyright 2012 Martin Popel

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.