edu.stanford.nlp.parser.metrics
Class UnlabeledAttachmentEval

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

public class UnlabeledAttachmentEval
extends AbstractEval

Dependency unlabeled attachment score.

If Collinization has not been performed prior to evaluation, then it is customary (for reporting results) to pass in a filter that rejects dependencies with punctuation dependents.

Author:
Spence Green

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.stanford.nlp.parser.metrics.AbstractEval
AbstractEval.CatErrorEval, AbstractEval.RuleErrorEval, AbstractEval.ScoreEval
 
Field Summary
static Map<String,Integer> optionArgDefs
           
 
Fields inherited from class edu.stanford.nlp.parser.metrics.AbstractEval
curF1, num, runningAverages, str
 
Constructor Summary
UnlabeledAttachmentEval(String str, boolean runningAverages, HeadFinder headFinder)
           
UnlabeledAttachmentEval(String str, boolean runningAverages, HeadFinder headFinder, Filter<String> punctRejectFilter)
           
 
Method Summary
 void evaluate(Tree guess, Tree gold, PrintWriter pw)
           
static void main(String[] args)
          Run the Evalb scoring metric on guess/gold input.
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, 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
 

Field Detail

optionArgDefs

public static final Map<String,Integer> optionArgDefs
Constructor Detail

UnlabeledAttachmentEval

public UnlabeledAttachmentEval(String str,
                               boolean runningAverages,
                               HeadFinder headFinder)
Parameters:
headFinder - If a headFinder is provided, then head percolation will be done for trees. Otherwise, it must be called separately.

UnlabeledAttachmentEval

public UnlabeledAttachmentEval(String str,
                               boolean runningAverages,
                               HeadFinder headFinder,
                               Filter<String> punctRejectFilter)
Method Detail

evaluate

public void evaluate(Tree guess,
                     Tree gold,
                     PrintWriter pw)
Overrides:
evaluate in class AbstractEval

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

main

public static void main(String[] args)
Run the Evalb scoring metric on guess/gold input. The default language is English.

Parameters:
args -


Stanford NLP Group