Treex::Core::Phrase::Builder
version 2.20210102
A Builder provides methods to construct a phrase structure tree around a dependency tree. It takes a Node and returns a Phrase.
Builder
Node
Phrase
The tree of phrases is constructed bottom-up and after every new nonterminal phrase is created, the method detect_special_constructions() is called. It is empty by default but derived classes may use it to implement detection of special phrase types in particular annotation styles, such as the Prague-style coordination. See Treex::Tool::PhraseBuilder for an example.
detect_special_constructions()
Treex::Tool::PhraseBuilder
Wraps a node (and its subtree, if any) in a phrase.
Takes a phrase and returns either the same phrase, or a new phrase that should replace it.
Examines a nonterminal phrase and tries to recognize certain special phrase types. This part will be different for different builders. It depends both on the expected input style and the desired output style. This method is always called after a new nonterminal phrase is built. It can be defined as empty if the builder does not do anything special.
Daniel Zeman <zeman@ufal.mff.cuni.cz>
Copyright © 2015 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.