NAME

Treex::Tool::Parser::MSTperl::Node

VERSION

version 0.09407

DESCRIPTION

Represents a word in a sentence. Contains its node features, such as form, lemma or pos tag. It may also point to its parent node.

FIELDS

Required or automatically filled fields

fields

Fields read from input and directly stored here, such as word form, morphological lemma, morphological tag etc. See Treex::Tool::Parser::MSTperl::Config for details.

ord

1-based position of the word in the sentence. The ord is set automatically when a sentence containing the node is created (see Treex::Tool::Parser::MSTperl::Sentence).

These fields are filled in only if the sentence containing the node has been parsed.

parent

Reference to the node's parent in the dependency tree. Default value is 0, which means that the node is a child of the root node.

parentOrd

Semantically this is an alias of parent-ord>, although technically the value is copied here, as it is used more often than the parent field itself.

METHODS

my $node = my $node = Treex::Tool::Parser::MSTperl::Node->new( fields => [@fields], config => $config, );

Creates a new node with the given field values (fields) and using the given Treex::Tool::Parser::MSTperl::Config instance (config).

my $node_copy = $node->copy_nonparsed()

Copies the node without the parse information (i.e. without the info about its parent).

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.