edu.stanford.nlp.parser.lexparser
Class AbstractEval

java.lang.Object
  extended by edu.stanford.nlp.parser.lexparser.AbstractEval
Direct Known Subclasses:
AbstractEval.CatErrorEval, AbstractEval.DependencyEval, AbstractEval.RuleErrorEval, AbstractEval.ScoreEval, AbstractEval.TaggingEval, ConstituentEvalByCat, LabeledConstituentEval

public abstract class AbstractEval
extends Object

A framework for Set-based precision/recall/F1 evaluation.

Author:
Dan Klein

Nested Class Summary
static class AbstractEval.CatErrorEval
          This class counts which categories are over and underproposed in trees.
static class AbstractEval.DependencyEval
          Evaluates the dependency accuracy of a tree (based on HeadFinder dependency judgements).
static class AbstractEval.RuleErrorEval
           
static class AbstractEval.ScoreEval
          This isn't really a kind of AbstractEval: we're sort of cheating here.
static class AbstractEval.TaggingEval
           
 
Field Summary
protected  boolean runningAverages
           
protected  String str
           
 
Constructor Summary
AbstractEval()
           
AbstractEval(boolean runningAverages)
           
AbstractEval(String str)
           
AbstractEval(String str, boolean runningAverages)
           
 
Method Summary
 void display(boolean verbose)
           
 void display(boolean verbose, PrintWriter pw)
           
 void evaluate(Tree guess, Tree gold)
           
 void evaluate(Tree guess, Tree gold, PrintWriter pw)
           
 double getEvalbF1()
           
 double getEvalbF1Percent()
           
 double getExact()
           
 double getExactPercent()
           
 int getNum()
           
 double getSentAveF1()
           
protected  double precision(Set s1, Set s2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

str

protected final String str

runningAverages

protected final boolean runningAverages
Constructor Detail

AbstractEval

public AbstractEval()

AbstractEval

public AbstractEval(boolean runningAverages)

AbstractEval

public AbstractEval(String str)

AbstractEval

public AbstractEval(String str,
                    boolean runningAverages)
Method Detail

getSentAveF1

public double getSentAveF1()

getEvalbF1

public double getEvalbF1()

getEvalbF1Percent

public double getEvalbF1Percent()
Returns:
The evalb (micro-averaged) F1 times 100 to make it a number between 0 and 100.

getExact

public double getExact()

getExactPercent

public double getExactPercent()

getNum

public int getNum()

precision

protected double precision(Set s1,
                           Set s2)

evaluate

public void evaluate(Tree guess,
                     Tree gold)

evaluate

public void evaluate(Tree guess,
                     Tree gold,
                     PrintWriter pw)

display

public void display(boolean verbose)

display

public void display(boolean verbose,
                    PrintWriter pw)


Stanford NLP Group