edu.stanford.nlp.parser.lexparser
Class AbstractTreebankParserParams.RemoveGFSubcategoryStripper
java.lang.Object
edu.stanford.nlp.parser.lexparser.AbstractTreebankParserParams.RemoveGFSubcategoryStripper
- All Implemented Interfaces:
- TreeTransformer
- Enclosing class:
- AbstractTreebankParserParams
protected class AbstractTreebankParserParams.RemoveGFSubcategoryStripper
- extends java.lang.Object
- implements TreeTransformer
The job of this class is to remove subcategorizations from
tag and category nodes, so as to put a tree in a suitable
state for evaluation. Providing the TreebankLanguagePack
is defined correctly, this should work for any language.
Very simililar to subcategory stripper, but strips grammatical
functions as well.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tf
protected TreeFactory tf
AbstractTreebankParserParams.RemoveGFSubcategoryStripper
protected AbstractTreebankParserParams.RemoveGFSubcategoryStripper()
transformTree
public Tree transformTree(Tree tree)
- Description copied from interface:
TreeTransformer
- Does whatever one needs to do to a particular tree.
This routine is passed a whole
Tree
, and could itself
work recursively, but the canonical usage is to invoke this method
via the Tree.transform()
method, which will apply the
transformer in a bottom-up manner to each local Tree
,
and hence the implementation of TreeTransformer
should
merely examine and change a local (one-level) Tree
.
- Specified by:
transformTree
in interface TreeTransformer
- Parameters:
tree
- A tree. Classes implementing this interface can assume
that the tree passed in is not null
.
- Returns:
- the transformed
Tree
Stanford NLP Group