- COPYRIGHT AND LICENSE
a-layer (analytical) node
For each attribute (e.g.
tag), there is a getter method (
my $tag = $anode->tag();) and a setter method (
Original w-layer and m-layer attributes
Original a-layer attributes
Links from a-trees to phrase-structure trees
Returns a terminal node from the phrase-structure tree that corresponds to the a-node.
Set the given terminal node from the phrase-structure tree as corresponding to the a-node.
Returns an array of non-terminal nodes from the phrase-structure tree that correspond to the a-node.
Returns the corresponding terminal node and all non-terminal nodes.
Root and non-root nodes have different PML type in the pml schema (
Is this node a root (or head) of a coordination/apposition construction? On a-layer this is decided based on
afun =~ /^(Coord|Apos)$/.
Figures out the real function of the subtree. If its own afun is
AuxC, finds the first descendant with a real afun and returns it. If this is a coordination or apposition root, finds the first member and returns its afun (but note that members of the same coordination can differ in afuns if some of them have
Sets the real function of the subtree. If its current afun is
AuxC, finds the first descendant with a real afun replaces it. If this is a coordination or apposition root, finds all the members and replaces their afuns (but note that members of the same coordination can differ in afuns if some of them have
ExD; this method can only set the same afun for all).
Recursively copy children from myself to another node. This method is specific to the A layer because it contains the list of attributes. If we could figure out the list automatically, the method would become general enough to reside directly in Node.pm.
If this a-node is a part of a named entity, this method returns the corresponding n-node (Treex::Core::Node::N). If this node is a part of more than one named entities, only the most nested one is returned. For example: "Bank of China"
$n_node_for_china = $a_node_china->get_n_node(); print $n_node_for_china->get_attr('normalized_name'); # China $n_node_for_bank_of_china = $n_node_for_china->get_parent(); print $n_node_for_bank_of_china->get_attr('normalized_name'); # Bank of China
Return the string corresponding to a subtree rooted in
$node. It's computed based on attributes
Zdeněk Žabokrtský <email@example.com>
Martin Popel <firstname.lastname@example.org>
COPYRIGHT AND LICENSE
Copyright © 2011-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.