Treex::Core::Node::T
version 2.20210102
t-layer (tectogrammatical) node
Add auxiliary a-nodes (to a/aux.rf)
a/aux.rf
Return a-nodes (both auxiliary and lexical, ie. a/aux.rf and a/lex.rf)
a/lex.rf
Return auxiliary a-nodes (from a/aux.rf).
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.
coref_gram.rf
coref_text.rf
$node-
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.
coref_text/target_node.rf
with_types
arg_ref
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 the nodes referred from the current node by bridging anaphora (in bridging attribute). The method returns references to two lists of the equal length: the referred nodes and the types of bridging relations.
bridging
Add bridging anaphora to $node of type $type (to bridging).
$node
$type
If the node is part of an apposition (no matter whether as a root or a member), return all the nodes that constitute the apposition. Only the apposition root may be excluded from the selection if the option with_appos_root is off. The method is used to abstract from the technical implementation of appositions. So far, it is used by coreference accessors.
with_appos_root
OPTIONS
Include the apposition root. Disabled by default.
Return the source language (in MT) t-node (from src_tnode.rf).
src_tnode.rf
Set the source language (in MT) t-node (to src_tnode.rf).
Note there is no set_n_node method. You must set the link from n-node to a a-node.
set_n_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"
$self->get_lex_anode()->n_node;
$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
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)/.
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>
Michal Novák <mnovak@ufal.mff.cuni.cz>
Copyright © 2011-2016 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.
To install Treex::Core, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Treex::Core
CPAN shell
perl -MCPAN -e shell install Treex::Core
For more information on module installation, please visit the detailed CPAN module installation guide.