NAME

Treex::Tool::Parser::MSTperl::Edge

VERSION

version 0.11306

DESCRIPTION

Represents a dependency edge (i.e. a pair of nodes where one of them is a parent to the other one which is its child).

FIELDS

child

The child (dependent) node (Treex::Tool::Parser::MSTperl::Node) of the edge.

parent

The parent (governing, head) node of the edge.

first

The one of child and parent which comes first in the sentence ("ord" in Treex::Tool::Parser::MSTperl::Node).

Filled automatically when edge is created.

second

The one of child and parent which comes second in the sentence (i.e. the one which is not in the first field)

Filled automatically when edge is created.

sentence

The sentence (Treex::Tool::Parser::MSTperl::Sentence) which contains the nodes (child and parent).

METHODS

my $edge = Treex::Tool::Parser::MSTperl::Edge->new( child => $child_node, parent => $parent_node, sentence => $sentence, );

Initializes an instance of an edge between the child node and the parent node (instances of Treex::Tool::Parser::MSTperl::Node) in the given sentence (Treex::Tool::Parser::MSTperl::Sentence).

my $edge_signature = $edge->signature()

String uniquely identifying the edge, composed of sentence id ("id" in Treex::Tool::Parser::MSTperl::Sentence), ords of the edge nodes ("ord" in Treex::Tool::Parser::MSTperl::Node) and label of the edge (which is stored with the child node - "label" in Treex::Tool::Parser::MSTperl::Node). Used to identify the edge in the edge features cache ("edge_features_cache" in Treex::Tool::Parser::MSTperl::FeaturesControl).

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.