edu.stanford.nlp.trees
Class GrammaticalFunctionTreeNormalizer
java.lang.Object
edu.stanford.nlp.trees.TreeNormalizer
edu.stanford.nlp.trees.GrammaticalFunctionTreeNormalizer
- All Implemented Interfaces:
- java.io.Serializable
public class GrammaticalFunctionTreeNormalizer
- extends TreeNormalizer
Tree normalizer for cleaning up labels and preserving the whole node label,
the grammatical function and category information from the label, or only
the category information. Only normalization occurs on nonterminals.
- Author:
- Anna Rafferty
- See Also:
- Serialized Form
Method Summary |
protected java.lang.String |
cleanUpLabel(java.lang.String label)
Remove things like hyphened functional tags and equals from the
end of a node label. |
java.lang.String |
normalizeNonterminal(java.lang.String category)
Normalizes a nonterminal contents. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tlp
protected final TreebankLanguagePack tlp
GrammaticalFunctionTreeNormalizer
public GrammaticalFunctionTreeNormalizer(TreebankLanguagePack tlp,
int nodeCleanup)
normalizeNonterminal
public java.lang.String normalizeNonterminal(java.lang.String category)
- Normalizes a nonterminal contents.
This implementation strips functional tags, etc. and interns the
nonterminal.
- Overrides:
normalizeNonterminal
in class TreeNormalizer
- Parameters:
category
- The String that decorates this nonterminal node
- Returns:
- The normalized form of this nonterminal String
cleanUpLabel
protected java.lang.String cleanUpLabel(java.lang.String label)
- Remove things like hyphened functional tags and equals from the
end of a node label.
Stanford NLP Group