Package edu.stanford.nlp.parser.metrics
Class UnlabeledAttachmentEval
- java.lang.Object
-
- edu.stanford.nlp.parser.metrics.AbstractEval
-
- edu.stanford.nlp.parser.metrics.UnlabeledAttachmentEval
-
- All Implemented Interfaces:
Eval
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
Fields Modifier and Type Field Description static Map<String,Integer>optionArgDefs-
Fields inherited from class edu.stanford.nlp.parser.metrics.AbstractEval
curF1, num, runningAverages, str
-
-
Constructor Summary
Constructors Constructor Description UnlabeledAttachmentEval(String str, boolean runningAverages, HeadFinder headFinder)UnlabeledAttachmentEval(String str, boolean runningAverages, HeadFinder headFinder, Predicate<String> punctRejectFilter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidevaluate(Tree guess, Tree gold, PrintWriter pw)static voidmain(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
-
-
-
-
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, Predicate<String> punctRejectFilter)
-
-
Method Detail
-
evaluate
public void evaluate(Tree guess, Tree gold, PrintWriter pw)
- Specified by:
evaluatein interfaceEval- Overrides:
evaluatein classAbstractEval
-
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:
makeObjectsin classAbstractEval
-
main
public static void main(String[] args)
Run the Evalb scoring metric on guess/gold input. The default language is English.- Parameters:
args-
-
-