edu.stanford.nlp.parser.metrics
Class DependencyEval

java.lang.Object
  extended by edu.stanford.nlp.parser.metrics.AbstractEval
      extended by edu.stanford.nlp.parser.metrics.DependencyEval

public class DependencyEval
extends AbstractEval

Evaluates the dependency accuracy of a tree (based on HeadFinder dependency judgments). TODO CDM Mar 2004: This should be rewritten so as to root a word at an index position; otherwise it doesn't work correctly when you get two identical dependents (like with "I went to Greece to see the ruins"). TODO spence Feb 2010: Trees not only need to implement the HasIndex interface, but also the head finding algorithm must set the index() annotation for each phrasal node according to the head. TODO spence Feb 2010: Percolate heads sets both the Word and Index annotations.

Author:
Dan Klein

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
DependencyEval(java.lang.String str, boolean runningAverages, Filter<java.lang.String> punctFilter)
           
 
Method Summary
protected  java.util.Set<?> makeObjects(Tree tree)
          Build the set of dependencies for evaluation.
 
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

DependencyEval

public DependencyEval(java.lang.String str,
                      boolean runningAverages,
                      Filter<java.lang.String> punctFilter)
Parameters:
punctFilter - A filter that accepts punctuation words.
Method Detail

makeObjects

protected java.util.Set<?> makeObjects(Tree tree)
Build the set of dependencies for evaluation. This set excludes all dependencies for which the argument is a punctuation tag.

Specified by:
makeObjects in class AbstractEval


Stanford NLP Group