|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.trees.TreeNormalizer
edu.stanford.nlp.trees.NegraTreeNormalizer
Tree normalizer for Negra. Just like BobChrisTreeNormalizer, but empty elements are differently marked.
Field Summary | |
protected TreebankLanguagePack |
tlp
|
Constructor Summary | |
NegraTreeNormalizer()
|
|
NegraTreeNormalizer(TreebankLanguagePack tlp)
|
Method Summary | |
protected String |
cleanUpLabel(String label)
Remove things like hyphened functional tags and equals from the end of a node label. |
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 |
Field Detail |
protected final TreebankLanguagePack tlp
Constructor Detail |
public NegraTreeNormalizer()
public NegraTreeNormalizer(TreebankLanguagePack tlp)
Method Detail |
public String normalizeTerminal(String leaf)
normalizeTerminal
in class TreeNormalizer
leaf
- The String that decorates the leaf
public String normalizeNonterminal(String category)
normalizeNonterminal
in class TreeNormalizer
category
- The String that decorates this nonterminal node
public Tree normalizeWholeTree(Tree tree, TreeFactory tf)
normalizeWholeTree
in class TreeNormalizer
tree
- The tree to be normalizedtf
- the TreeFactory to create new nodes (if needed)
protected String cleanUpLabel(String label)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |