NAME

Treex::Tool::Parser::MSTperl::TrainerLabelling

VERSION

version 0.09407

DESCRIPTION

Trains on correctly labelled sentences and so creates and tunes the model. Uses single-best MIRA (McDonald et al., 2005, Proc. HLT/EMNLP)

FIELDS

labeller

Reference to an instance of Treex::Tool::Parser::MSTperl::Labeller which is used for the training.

model

Reference to an instance of Treex::Tool::Parser::MSTperl::ModelLabeller which is being trained.

METHODS

$trainer->train($training_data);

Trains the model, using the settings from config and the training data in the form of a reference to an array of labelled sentences (Treex::Tool::Parser::MSTperl::Sentence), which can be obtained by the Treex::Tool::Parser::MSTperl::Reader.

$self->mira_update($sentence_correct, $sentence_best, $sumUpdateWeight)

Performs one update of the MIRA (Margin-Infused Relaxed Algorithm) on one sentence from the training data. Its input is the correct labelling of the sentence (from the training data) and the best scoring labelling created by the labeller.

AUTHORS

Rudolf Rosa <rosa@ufal.mff.cuni.cz>

COPYRIGHT AND LICENSE

Copyright © 2011 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.