edu.stanford.nlp.ie.hmm
Class HMMTester

java.lang.Object
  |
  +--edu.stanford.nlp.ie.hmm.HMMTester

public class HMMTester
extends Object

Programmatically tests the quality of an HMM on a Corpus.


Constructor Summary
HMMTester(HMM hmm)
          Constructs a new tester for the given HMM.
 
Method Summary
 double test(Corpus testDocs)
          Returns test(testDocs,false,false).
 double test(Corpus testDocs, boolean bestAnswerOnly, boolean print)
          Returns the F1 measure for the HMM on the given corpus.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HMMTester

public HMMTester(HMM hmm)
Constructs a new tester for the given HMM.

Method Detail

test

public double test(Corpus testDocs)
Returns test(testDocs,false,false).


test

public double test(Corpus testDocs,
                   boolean bestAnswerOnly,
                   boolean print)
Returns the F1 measure for the HMM on the given corpus. Prints a bunch of debug info to stderr if print is true. If bestAnswerOnly is true, only the highest probability answer for each type is considered, otherwise all generated answers are considered.



Stanford NLP Group