Treex::Tool::Parser::MSTperl::ModelAdditional
version 0.11336
A model containing edge PMI, i.e. PMI[c,p] = log #[c,p] / #([c,*])#([*,p]) where c=child and p=parent
The file containing the model, i.e. a TSV file in the format child[tab]parent[tab]PMI
Currently only tsv is supported. TODO support tsv.gz, probably also Data Dumper model.
(A reference to) an array of buckets that PMI is bucketed into (negative integers, do not have to be sorted). The PMI is first ceiled, and then it falls into the nearest lower bucket; (if there is no such bucket, falls into the lowest one).
In-memory representation of the model file, in the format model->{child}->{parent} = PMI.
The lowest bucket (a bin for all PMIs lower than that).
The highest bucket (a bin for all PMIs higher than that).
Provides fast conversion of ceiled PMIs that are between minBucket and maxBucket to buckets.
Returns the real PMI, i.e. a negative float (there are hundreds of thousands of possible values).
Returns '?' if PMI is unknown.
Returns ceiled PMI, i.e. the integer part of the real PMI (there are about 30 possible values).
Returns the nearest bucket that is lower or equal to the ceiled value of the PMI, or the lowest existing bucket if the value is even lower.
Rudolf Rosa <rosa@ufal.mff.cuni.cz>
Copyright © 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::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.