edu.stanford.nlp.parser.lexparser
Class EvaluateTreebank

java.lang.Object
  extended by edu.stanford.nlp.parser.lexparser.EvaluateTreebank

public class EvaluateTreebank
extends java.lang.Object


Field Summary
protected  Function<java.util.List<? extends HasWord>,java.util.ArrayList<TaggedWord>> tagger
          The tagger optionally used before parsing.
 
Constructor Summary
EvaluateTreebank(LexicalizedParser parser)
           
 
Method Summary
 double getLBScore()
           
 double getTagScore()
           
 void processResults(ParserQuery pq, Tree goldTree, java.io.PrintWriter pwErr, java.io.PrintWriter pwOut, java.io.PrintWriter pwFileOut, java.io.PrintWriter pwStats, TreePrint treePrint)
           
 double testOnTreebank(Treebank testTreebank)
          Test the parser on a treebank.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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.

Constructor Detail

EvaluateTreebank

public EvaluateTreebank(LexicalizedParser parser)
Method Detail

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