Treex::Tool::Parser::MSTperl::ModelBase
version 0.11949
This is a base class for an in-memory represenation of a parsing or labelling model.
Instance of Treex::Tool::Parser::MSTperl::Config containing settings to be used for the model.
Provides access to features, especially enabling their computation. Intance of Treex::Tool::Parser::MSTperl::FeaturesControl.
Loads model from file in Data::Dumper format, eg.:
$VAR1 = { '0:být|VB' => '0.0042', '1:pes|N1' => '0.0021', ... };
The feature codes are represented by their indexes (see "simple_feature_codes" in Treex::Tool::Parser::MSTperl::FeaturesControl).
Loads model from file in TSV (tab separated values) format, eg.:
L|T:být|VB [tab] 0.0042 l|t:pes|N1 [tab] 0.0021 ...
The feature codes are written as text.
Stores model into file in Data::Dumper format.
Stores model into file in TSV format:
Returns the data that form the model to be saved to a model file.
Fills the model with model data acquired from a model file.
Called after preprocessing training data, before entering the MIRA phase.
Only to provide information about the model. Returns number of features in the model (where a "feature" can stand for various things depending on the algorithm used).
Rudolf Rosa <rosa@ufal.mff.cuni.cz>
Zdeněk Žabokrtský <zabokrtsky@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, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Treex::Tool::Parser::MSTperl
CPAN shell
perl -MCPAN -e shell install Treex::Tool::Parser::MSTperl
For more information on module installation, please visit the detailed CPAN module installation guide.