edu.stanford.nlp.parser.lexparser
Class EvaluateTreebank
java.lang.Object
edu.stanford.nlp.parser.lexparser.EvaluateTreebank
public class EvaluateTreebank
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tagger
protected Function<java.util.List<? extends HasWord>,java.util.ArrayList<TaggedWord>> tagger
- The tagger optionally used before parsing.
We keep it here as a function rather than a MaxentTagger so that
we can distribute a version of the parser that doesn't include
the entire tagger.
TODO: pass this in rather than create it here if we wind up using
this in more place. Right now it's only used in testOnTreebank.
EvaluateTreebank
public EvaluateTreebank(LexicalizedParser parser)
getLBScore
public double getLBScore()
getTagScore
public double getTagScore()
processResults
public void processResults(ParserQuery pq,
Tree goldTree,
java.io.PrintWriter pwErr,
java.io.PrintWriter pwOut,
java.io.PrintWriter pwFileOut,
java.io.PrintWriter pwStats,
TreePrint treePrint)
testOnTreebank
public double testOnTreebank(Treebank testTreebank)
- Test the parser on a treebank. Parses will be written to stdout, and
various other information will be written to stderr and stdout,
particularly if
op.testOptions.verbose
is true.
- Parameters:
testTreebank
- The treebank to parse
- Returns:
- The labeled precision/recall F1 (EVALB measure)
of the parser on the treebank.
Stanford NLP Group