opennlp.tools.postag
Class POSTaggerCrossValidator

java.lang.Object
  extended by opennlp.tools.postag.POSTaggerCrossValidator

public class POSTaggerCrossValidator
extends Object


Constructor Summary
POSTaggerCrossValidator(String languageCode, ModelType modelType, POSDictionary tagDictionary, Dictionary ngramDictionary)
           
POSTaggerCrossValidator(String languageCode, ModelType modelType, POSDictionary tagDictionary, Dictionary ngramDictionary, int cutoff, int iterations)
           
 
Method Summary
 void evaluate(ObjectStream<POSSample> samples, int nFolds)
           
 double getWordAccuracy()
          Retrieves the accuracy for all iterations.
 long getWordCount()
          Retrieves the number of words which where validated over all iterations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

POSTaggerCrossValidator

public POSTaggerCrossValidator(String languageCode,
                               ModelType modelType,
                               POSDictionary tagDictionary,
                               Dictionary ngramDictionary,
                               int cutoff,
                               int iterations)

POSTaggerCrossValidator

public POSTaggerCrossValidator(String languageCode,
                               ModelType modelType,
                               POSDictionary tagDictionary,
                               Dictionary ngramDictionary)
Method Detail

evaluate

public void evaluate(ObjectStream<POSSample> samples,
                     int nFolds)
              throws IOException,
                     IOException
Throws:
IOException

getWordAccuracy

public double getWordAccuracy()
Retrieves the accuracy for all iterations.

Returns:

getWordCount

public long getWordCount()
Retrieves the number of words which where validated over all iterations. The result is the amount of folds multiplied by the total number of words.

Returns:


Copyright © 2010. All Rights Reserved.