NAME
Treex::Core::Node::InClause
VERSION
version 2.20210102
DESCRIPTION
Moose role for nodes in trees where (linguistic) clauses can be recognized based on attributes clause_number
and is_clause_head
.
ATTRIBUTES
- clause_number
-
Ordinal number that is shared by all nodes of a same clause.
- is_clause_head
-
Is this node a head of a finite clause.
METHODS
- my $clause_head_node = $node->get_clause_root();
-
Returns the head node of a clause. This implementation is based on the attribute
clause_number
. Note that it may give different results thanget_clause_head
. - $clause_head_node = $node->get_clause_head();
-
Returns the head node of a clause. This implementation is based on the attribute
is_clause_head
. Note that it may give different results thanget_clause_root
. - $clause_head_node = $node->get_clause_ehead();
-
Returns the (first) effective head node of a clause. Same as previous, but based on the effective parent relation.
- my @nodes = $node->get_clause_descendants();
-
Returns those descendants which are in the same clause as
$node
. The current implementation is based on the attributeis_clause_head
. - my @nodes = $node->get_clause_edescendants();
-
Same as previous, but using the effective children relation.
- my @nodes = $node->get_clause_nodes();
-
Returns all nodes of the clause (to which the
$node
belongs). The current implementation is based on the attributeclause_number
.
AUTHOR
Martin Popel <popel@ufal.mff.cuni.cz>
COPYRIGHT AND LICENSE
Copyright © 2011 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.