Martin Popel > Treex-Core-0.08664 > Treex::Core::Node::T

Download:
Treex-Core-0.08664.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.08664   Source  

NAME ^

Treex::Core::Node::T

VERSION ^

version 0.08664

DESCRIPTION ^

t-layer (tectogrammatical) node

METHODS ^

Access to a-layer (analytical nodes)

$node->add_aux_anodes(@aux_anodes)

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).

$node->set_aux_anodes(@aux_anodes)

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

set_lex_anode

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

$node->remove_aux_anodes(@to_remove)

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

$node->get_coref_nodes()

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

$node->get_coref_gram_nodes()

Return grammatical coreference nodes (from coref_gram.rf).

$node->get_coref_text_nodes()

Return textual coreference nodes (from coref_text.rf).

$node->add_coref_gram_nodes(@nodes)

Add grammatical coreference nodes (to coref_gram.rf).

$node->add_coref_gram_nodes(@nodes)

Add textual coreference nodes (to coref_text.rf).

$node->remove_coref_nodes()

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

$node->update_coref_nodes()

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_src_tnode

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.

$node->get_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"

 $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_coap_root

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)/.

AUTHOR ^

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 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.

syntax highlighting: