edu.stanford.nlp.trees
Class SepTreeNormalizer

java.lang.Object
  |
  +--edu.stanford.nlp.trees.TreeNormalizer
        |
        +--edu.stanford.nlp.trees.SepTreeNormalizer

public class SepTreeNormalizer
extends TreeNormalizer

Exactly like BobChrisTreeNormalize, except does not strip SBJ functional tags from NP-SBJ. Used in NTT clustering experiments.


Constructor Summary
SepTreeNormalizer()
           
 
Method Summary
 String normalizeNonterminal(String category)
          Normalizes a nonterminal contents.
 String normalizeTerminal(String leaf)
          Normalizes a leaf contents.
 Tree normalizeWholeTree(Tree tree, TreeFactory tf)
          Normalize a whole tree -- one can assume that this is the root.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SepTreeNormalizer

public SepTreeNormalizer()
Method Detail

normalizeTerminal

public String normalizeTerminal(String leaf)
Normalizes a leaf contents. This implementation interns the leaf.

Overrides:
normalizeTerminal in class TreeNormalizer

normalizeNonterminal

public String normalizeNonterminal(String category)
Normalizes a nonterminal contents. This implementation strips functional tags, etc. and interns the nonterminal.

Overrides:
normalizeNonterminal in class TreeNormalizer

normalizeWholeTree

public Tree normalizeWholeTree(Tree tree,
                               TreeFactory tf)
Normalize a whole tree -- one can assume that this is the root. This implementation deletes empty elements (ones with nonterminal tag label '-NONE-') from the tree

Overrides:
normalizeWholeTree in class TreeNormalizer
Parameters:
tree - The tree to be normalized
tf - the TreeFactory to create new nodes (if needed)
Returns:
Tree the normalized tree


Stanford NLP Group