edu.stanford.nlp.trees
Class BasicCategoryTreeTransformer

java.lang.Object
  extended by edu.stanford.nlp.trees.RecursiveTreeTransformer
      extended by edu.stanford.nlp.trees.BasicCategoryTreeTransformer
All Implemented Interfaces:
TreeTransformer, Function<Tree,Tree>

public class BasicCategoryTreeTransformer
extends RecursiveTreeTransformer
implements Function<Tree,Tree>

Transforms trees by turning the labels into their basic categories according to the TreebankLanguagePack

Author:
John Bauer

Constructor Summary
BasicCategoryTreeTransformer(TreebankLanguagePack tlp)
           
 
Method Summary
 Tree apply(Tree tree)
          Converts a T1 to a different T2.
 Label transformNonterminalLabel(Tree tree)
           
 
Methods inherited from class edu.stanford.nlp.trees.RecursiveTreeTransformer
transformHelper, transformLabel, transformNonterminal, transformTerminal, transformTerminalLabel, transformTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicCategoryTreeTransformer

public BasicCategoryTreeTransformer(TreebankLanguagePack tlp)
Method Detail

transformNonterminalLabel

public Label transformNonterminalLabel(Tree tree)
Overrides:
transformNonterminalLabel in class RecursiveTreeTransformer

apply

public Tree apply(Tree tree)
Description copied from interface: Function
Converts a T1 to a different T2. For example, a Parser will convert a Sentence to a Tree. A Tagger will convert a Sentence to a TaggedSentence.

Specified by:
apply in interface Function<Tree,Tree>
Parameters:
tree - The function's argument
Returns:
The function's evaluated value


Stanford NLP Group