version 0.08664


t-layer (tectogrammatical) node


Access to a-layer (analytical nodes)


Add auxiliary a-nodes (to a/aux.rf)

$anodes = $node->get_anodes()

Return a-nodes (both auxiliary and lexical, ie. a/aux.rf and a/lex.rf)

@aux_anodes = $node->get_aux_anodes()

Return auxiliary a-nodes (from a/aux.rf).

$lex_anod = $node->get_lex_anode()

Return the lexical a-nodes (from a/lex.rf).


Set the auxiliary a-nodes (to a/aux.rf).


Set the lexical a-node (to a/lex.rf).


Remove the specified a-nodes from a/aux.rf (if they are contained in it).


Return textual and grammatical coreference nodes (from coref_gram.rf and coref_text.rf).


Return grammatical coreference nodes (from coref_gram.rf).


Return textual coreference nodes (from coref_text.rf).


Add grammatical coreference nodes (to coref_gram.rf).


Add textual coreference nodes (to coref_text.rf).


Remove the specified nodes from coref_gram.rf or coref_text.rf (if they are contained in one or both of them).


Remove all invalid coreferences from coref_gram.rf and coref_text.rf.

Access to source language t-layer (in MT)

$src_tnode = $node->src_tnode()

Return the source language (in MT) t-node (from src_tnode.rf).


Set the source language (in MT) t-node (to src_tnode.rf).

Access to n-layer (named entity nodes)

Note there is no set_n_node method. You must set the link from n-node to a a-node.


This is a shortcut for $self->get_lex_anode()->n_node; If this t-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 = $t_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

Other methods


Is this node a root (or head) of a coordination/apposition construction? On t-layer this is decided based on functor =~ /^(CONJ|CONFR|DISJ|GRAD|ADVS|CSQ|REAS|CONTRA|APPS|OPER)/.


Zdeněk Žabokrtský <>

Martin Popel <>

Ondřej Dušek <>


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.