edu.stanford.nlp.parser.metrics
Class FilteredEval

java.lang.Object
  extended by edu.stanford.nlp.parser.metrics.AbstractEval
      extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.stanford.nlp.parser.metrics.AbstractEval
AbstractEval.CatErrorEval, AbstractEval.RuleErrorEval, AbstractEval.ScoreEval
 
Field Summary
 
Fields inherited from class edu.stanford.nlp.parser.metrics.AbstractEval
curF1, num, runningAverages, str
 
Constructor Summary
FilteredEval(java.lang.String str, boolean runningAverages, Filter<Tree> subtreeFilter)
           
 
Method Summary
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.
protected  java.util.Set<?> makeObjects(Tree tree)
           
 
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
 

Constructor Detail

FilteredEval

public FilteredEval(java.lang.String str,
                    boolean runningAverages,
                    Filter<Tree> subtreeFilter)
Method Detail

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