edu.stanford.nlp.parser.lexparser
Class TreeAnnotator
java.lang.Object
edu.stanford.nlp.parser.lexparser.TreeAnnotator
- All Implemented Interfaces:
- TreeTransformer
public class TreeAnnotator
- extends Object
- implements TreeTransformer
Performs non-language specific annotation of Trees.
- Author:
- Dan Klein, Christopher Manning
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeAnnotator
public TreeAnnotator(HeadFinder hf,
TreebankLangParserParams tlpp,
Options op)
transformTree
public Tree transformTree(Tree t)
- Do the category splitting of the tree passed in.
This method defensively copies its argument, which is not changed.
- Specified by:
transformTree
in interface TreeTransformer
- Parameters:
t
- The tree to be annotated. This can be any tree with a
value() stored in Labels. The tree is assumed to have
preterminals that are parts of speech.
- Returns:
- The annotated version of the Tree (which is a completely
separate Tree with new tree structure and new labels). The
non-leaf nodes of the tree will be CategoryWordTag objects.
Stanford NLP Group