Dušan Variš > Treex-Core-2.20150928 > Treex::Core::Node::T



Annotate this POD


Open  0
View/Report Bugs
Module Version: 2.20150928   Source  




version 2.20150928


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). If the document follows the PDT3.0 annotation style, the same steps as for $node-get_coref_text_nodes()> are applied.


Return grammatical coreference nodes (from coref_gram.rf).


Return textual coreference nodes (from coref_text.rf if the document follows the PDT2.0 annotation style). If the document follows the PDT3.0 annotation style, the list of nodes is extracted from coref_text/target_node.rf. If the with_types parameter is set in arg_ref, two list references are returned: the first one refers to a list of nodes extracted from coref_text/target_node.rf, the second one to a list of types from coref_text/type.


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ý <zabokrtsky@ufal.mff.cuni.cz>

Martin Popel <popel@ufal.mff.cuni.cz>

Ondřej Dušek <odusek@ufal.mff.cuni.cz>


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.

syntax highlighting: