edu.stanford.nlp.parser.metrics
Class BestOfTopKEval

java.lang.Object
  extended by edu.stanford.nlp.parser.metrics.BestOfTopKEval

public class BestOfTopKEval
extends java.lang.Object

Applies an AbstractEval to a list of trees to pick the best tree using F1 measure. Then uses a second AbstractEval to tally statistics for the best tree chosen. This is useful for experiments to see how much the parser could improve if you were able to correctly order the top N trees.
The comparisonEval will not have any useful statistics, as it will tested against the top N trees for each parsing. The countingEval is the useful AbstractEval, as it is tallied only once per parse.
One example of this is the pcfgTopK eval, which looks for the best LP/LR of constituents in the top K trees.

Author:
John Bauer

Constructor Summary
BestOfTopKEval(AbstractEval comparisonEval, AbstractEval countingEval)
           
 
Method Summary
 void display(boolean verbose)
           
 void display(boolean verbose, java.io.PrintWriter pw)
           
 void evaluate(java.util.List<Tree> guesses, Tree gold, java.io.PrintWriter pw)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BestOfTopKEval

public BestOfTopKEval(AbstractEval comparisonEval,
                      AbstractEval countingEval)
Method Detail

evaluate

public void evaluate(java.util.List<Tree> guesses,
                     Tree gold,
                     java.io.PrintWriter pw)

display

public void display(boolean verbose)

display

public void display(boolean verbose,
                    java.io.PrintWriter pw)


Stanford NLP Group