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, and splices out
unary A over A nodes. It assumes that it is not given a
null tree, but it may return one if there are no real words.
- Overrides:
normalizeWholeTree
in class BobChrisTreeNormalizer
- Parameters:
tree
- The tree to be normalized
tf
- the TreeFactory to create new nodes (if needed)
- Returns:
- The normalized tree. May be null which means to not use this tree at all.