Treex::Tool::Parser::MSTperl::ModelUnlabelled
version 0.08055
This is an in-memory represenation of a parsing model, extended from Treex::Tool::Parser::MSTperl::ModelBase.
The model is represented by features and their weights.
A hash reference containing weights of all features. This is the actual model.
Counts the score of an edge by summing up weights of all of its features.
Returns score of the sentence (by calling score_features on the sentence features).
score_features
Counts the score of an edge or sentence by summing up weights of all of its features, which are passed as an array reference.
Returns the weight of a given feature, or 0 if the feature is not contained in the model.
0
Sets a new weight for a given feature.
Adds the update value to current feature weight - eg. if the weight of the feature '1:pes|N1' is currently 0.0021, it will be 0.0063 after the call. The update can also be negative - then the weight of the feature decreases.
'1:pes|N1'
0.0021
0.0063
Rudolf Rosa <rosa@ufal.mff.cuni.cz>
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.
To install Treex::Tool::Parser::MSTperl::Node, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Treex::Tool::Parser::MSTperl::Node
CPAN shell
perl -MCPAN -e shell install Treex::Tool::Parser::MSTperl::Node
For more information on module installation, please visit the detailed CPAN module installation guide.