edu.stanford.nlp.parser.metrics
Class FilteredEval
java.lang.Object
edu.stanford.nlp.parser.metrics.AbstractEval
edu.stanford.nlp.parser.metrics.FilteredEval
public class FilteredEval
- extends AbstractEval
An AbstractEval which doesn't just evaluate all constituents, but
lets you provide a filter to only pay attention to constituents
formed from certain subtrees. For example, one provided filter
lets you limit the evaluation to subtrees which contain a
particular kind of node.
- Author:
- John Bauer
Methods inherited from class edu.stanford.nlp.parser.metrics.AbstractEval |
display, display, evaluate, evaluate, evaluate, getEvalbF1, getEvalbF1Percent, getExact, getExactPercent, getLastF1, getNum, getSentAveF1, precision |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilteredEval
public FilteredEval(java.lang.String str,
boolean runningAverages,
Filter<Tree> subtreeFilter)
makeObjects
protected java.util.Set<?> makeObjects(Tree tree)
- Specified by:
makeObjects
in class AbstractEval
childFilteredEval
public static FilteredEval childFilteredEval(java.lang.String str,
boolean runningAverages,
TreebankLanguagePack tlp,
java.lang.String childPattern)
- Returns an eval which is good for counting the attachment of
specific node types. For example, suppose you want to count the
attachment of PP in an English parsing. You could create one
with PP as the child pattern, and then it would give you p/r/f1
for just nodes which have a PP as a child.
Stanford NLP Group