Treex::Core::Node::P
version 2.20210102
Representation of nodes of phrase structure (constituency) trees.
Is $node a terminal node? Does its get_pml_type_name eq 'p-terminal.type'?
$node
get_pml_type_name eq 'p-terminal.type'
Create a new non-terminal child node, i.e. a node representing a constituent (phrase).
Create a new terminal child node, i.e. a node representing a token.
Fill $node's attributes and create its subtree from the serialized string in the PennTB mrg format. E.g.: (NP (DT a) (JJ nonexecutive) (NN director)).
mrg
Serialize the tree structure of $node and its subtree as a string in the PennTB mrg format. E.g.: (NP (DT a) (JJ nonexecutive) (NN director)).
Get the text representing $node's subtree. The text is tokenized, i.e. all tokens are separated by a space.
Recursively copy children from $node to $target_node. This method is specific to the P layer because it contains the list of attributes. If we could figure out the list automatically, the method would become general enough to reside directly in Node.pm.
$target_node
Martin Popel <popel@ufal.mff.cuni.cz> Zdeněk Žabokrtský <zabokrtsky@ufal.mff.cuni.cz> Daniel Zeman <zeman@ufal.mff.cuni.cz>
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.
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.