edu.stanford.nlp.trees
Class NPTmpRetainingTreeNormalizer

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

public class NPTmpRetainingTreeNormalizer
extends BobChrisTreeNormalizer

Same TreeNormalizer as BobChrisTreeNormalizer, but optionally provides four extras. I.e., the class name is now a misnomer. 1) retains -TMP labels on NP with the new identification NP-TMP, and marks the tag which heads this with a ^TMP
2) Annotates S nodes which contain a gapped subject: i.e., S < (/^NP-SBJ/ < -NONE-) --> S-G
3) Leave all functional tags on nodes. 4) Extended processing of -TMP modifiers

Author:
Christopher Manning, Dan Klein

Field Summary
 
Fields inherited from class edu.stanford.nlp.trees.BobChrisTreeNormalizer
tlp
 
Constructor Summary
NPTmpRetainingTreeNormalizer()
           
NPTmpRetainingTreeNormalizer(boolean doTemporalStuff, boolean doSGappedStuff)
           
NPTmpRetainingTreeNormalizer(boolean doTemporalStuff, boolean doExtendedTemporalStuff, boolean doSGappedStuff, boolean leaveItAll)
           
 
Method Summary
protected  String cleanUpLabel(String label)
          Remove things like hyphened functional tags and equals from the end of a node label.
 Tree normalizeWholeTree(Tree tree, TreeFactory tf)
          Normalize a whole tree -- one can assume that this is the root.
 
Methods inherited from class edu.stanford.nlp.trees.BobChrisTreeNormalizer
normalizeNonterminal, normalizeTerminal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NPTmpRetainingTreeNormalizer

public NPTmpRetainingTreeNormalizer()

NPTmpRetainingTreeNormalizer

public NPTmpRetainingTreeNormalizer(boolean doTemporalStuff,
                                    boolean doSGappedStuff)

NPTmpRetainingTreeNormalizer

public NPTmpRetainingTreeNormalizer(boolean doTemporalStuff,
                                    boolean doExtendedTemporalStuff,
                                    boolean doSGappedStuff,
                                    boolean leaveItAll)
Method Detail

cleanUpLabel

protected String cleanUpLabel(String label)
Remove things like hyphened functional tags and equals from the end of a node label.

Overrides:
cleanUpLabel in class BobChrisTreeNormalizer

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. It does work for a null tree.

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


Stanford NLP Group