|
|||||||||
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.OrderedCombinationTreeNormalizer
public class OrderedCombinationTreeNormalizer
This class combines multiple tree normalizers. Given a list of tree normalizer, it applies each tree normalizer from the first to the last for each of the normalize nonterminal, normalize terminal, and normalize whole tree methods.
Constructor Summary | |
---|---|
OrderedCombinationTreeNormalizer()
|
|
OrderedCombinationTreeNormalizer(List<TreeNormalizer> tns)
|
Method Summary | |
---|---|
void |
addTreeNormalizer(TreeNormalizer tn)
Adds the given tree normalizer to this combination; the tree normalizers are applied in the order they were added, with the first to be added being the first to be applied. |
String |
normalizeNonterminal(String category)
Normalizes a nonterminal contents (and maybe intern it). |
String |
normalizeTerminal(String leaf)
Normalizes a leaf contents (and maybe intern it). |
Tree |
normalizeWholeTree(Tree tree,
TreeFactory tf)
Normalize a whole tree -- this method assumes that the argument that it is passed is the root of a complete Tree . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OrderedCombinationTreeNormalizer()
public OrderedCombinationTreeNormalizer(List<TreeNormalizer> tns)
Method Detail |
---|
public void addTreeNormalizer(TreeNormalizer tn)
public String normalizeNonterminal(String category)
TreeNormalizer
normalizeNonterminal
in class TreeNormalizer
category
- The String that decorates this nonterminal node
public String normalizeTerminal(String leaf)
TreeNormalizer
normalizeTerminal
in class TreeNormalizer
leaf
- The String that decorates the leaf
public Tree normalizeWholeTree(Tree tree, TreeFactory tf)
TreeNormalizer
Tree
.
It is normally implemented as a Tree-walking routine.
This method may return null
. This is interpreted to
mean that this is a tree that should not be included in further
processing. PennTreeReader recognizes this return value, and
asks for another Tree from the input Reader.
normalizeWholeTree
in class TreeNormalizer
tree
- 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 |