|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.stanford.nlp.trees.TreeNormalizer
|
+--edu.stanford.nlp.trees.DanBobChrisTreeNormalizer
Normalizes trees roughly the way used in Manning and Carpenter 1997. NB: This implementation is still incomplete! The normalizations performed are: (i) terminals are interned, (ii) nonterminals are stripped of alternants, functional tags and cross-reference codes (on |, =, -) and then interned, (iii) empty elements (ones with nonterminal label "-NONE-") are deleted from the tree, (iv) the null label at the root node is replaced with the label "ROOT". Dan's mod: -NONE- are all made into Word.EMPTY but left in.
Implementation note: This class should probably be removed and made a constructor option of BobChrisTreeNormalizer, which should in turn be folded into the ParametricTreeNormalizer.
| Constructor Summary | |
DanBobChrisTreeNormalizer()
|
|
| 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 |
public DanBobChrisTreeNormalizer()
| Method Detail |
public String normalizeTerminal(String leaf)
normalizeTerminal in class TreeNormalizerpublic String normalizeNonterminal(String category)
normalizeNonterminal in class TreeNormalizer
public Tree normalizeWholeTree(Tree tree,
TreeFactory tf)
normalizeWholeTree in class TreeNormalizertree - The tree to be normalizedtf - the TreeFactory to create new nodes (if needed)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||