Builder provides methods to construct a phrase structure tree around a dependency tree. It takes a
Node and returns a
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.
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 <email@example.com>
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.