Treex::Tool::Parser::MSTperl::Parser - pure Perl implementation of MST parser
version 0.08268
This is a Perl implementation of the MST Parser described in McDonald et al.: Non-projective Dependency Parsing using Spanning Tree Algorithms 2005 in Proc. HLT/EMNLP.
Loads an unlabelled and/or a labelled model (= sets feature weights) using "load" in Treex::Tool::Parser::MSTperl::ModelBase.
A model has to be loaded before sentences can be parsed.
Parses a sentence (instance of Treex::Tool::Parser::MSTperl::Sentence). It sets the parent field of each node (instance of Treex::Tool::Parser::MSTperl::Node), i.e. a word in the sentence, and also returns these parents as an array reference.
parent
Any parse information already contained in the sentence gets discarded (explicitely, by calling "copy_nonparsed" in Treex::Tool::Parser::MSTperl::Sentence).
Does the actual parsing, returning a parsed instance of Treex::Tool::Parser::MSTperl::Sentence. The parse_sentence sub is actually only a wrapper for this method which extracts the parents of the nodes and returns these.
parse_sentence
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.