edu.stanford.nlp.parser.metrics
Class DependencyEval
java.lang.Object
edu.stanford.nlp.parser.metrics.AbstractEval
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
Method Summary |
protected 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 |
DependencyEval
public DependencyEval(String str,
boolean runningAverages,
Filter<String> punctFilter)
- Parameters:
punctFilter
- A filter that accepts punctuation words.
makeObjects
protected 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