|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object opennlp.tools.postag.POSTaggerCrossValidator
public class POSTaggerCrossValidator
Method Summary | |
---|---|
void |
evaluate(ObjectStream<POSSample> samples,
int nFolds)
Starts the evaluation. |
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 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public POSTaggerCrossValidator(String languageCode, TrainingParameters trainParam, File tagDictionary, Integer ngramCutoff, Integer tagdicCutoff, String factoryClass, POSTaggerEvaluationMonitor... listeners)
POSTaggerCrossValidator
that builds a ngram dictionary
dynamically. It instantiates a sub-class of POSTaggerFactory
using
the tag and the ngram dictionaries.
public POSTaggerCrossValidator(String languageCode, TrainingParameters trainParam, POSTaggerFactory factory, POSTaggerEvaluationMonitor... listeners)
POSTaggerCrossValidator
using the given
POSTaggerFactory
.
public POSTaggerCrossValidator(String languageCode, ModelType modelType, POSDictionary tagDictionary, Dictionary ngramDictionary, int cutoff, int iterations)
POSTaggerCrossValidator(String, TrainingParameters, POSTaggerFactory, POSTaggerEvaluationMonitor...)
instead and pass in a TrainingParameters
object and a
POSTaggerFactory
.
public POSTaggerCrossValidator(String languageCode, ModelType modelType, POSDictionary tagDictionary, Dictionary ngramDictionary)
POSTaggerCrossValidator(String, TrainingParameters, POSTaggerFactory, POSTaggerEvaluationMonitor...)
instead and pass in a TrainingParameters
object and a
POSTaggerFactory
.
public POSTaggerCrossValidator(String languageCode, TrainingParameters trainParam, POSDictionary tagDictionary, POSTaggerEvaluationMonitor... listeners)
POSTaggerCrossValidator(String, TrainingParameters, POSTaggerFactory, POSTaggerEvaluationMonitor...)
instead and pass in a POSTaggerFactory
.
public POSTaggerCrossValidator(String languageCode, TrainingParameters trainParam, POSDictionary tagDictionary, Integer ngramCutoff, POSTaggerEvaluationMonitor... listeners)
#POSTaggerCrossValidator(String, TrainingParameters, POSDictionary, Integer, String, POSTaggerEvaluationMonitor...)
instead and pass in the name of POSTaggerFactory
sub-class.
public POSTaggerCrossValidator(String languageCode, TrainingParameters trainParam, POSDictionary tagDictionary, Dictionary ngramDictionary, POSTaggerEvaluationMonitor... listeners)
POSTaggerCrossValidator(String, TrainingParameters, POSTaggerFactory, POSTaggerEvaluationMonitor...)
instead and pass in a POSTaggerFactory
.
Method Detail |
---|
public void evaluate(ObjectStream<POSSample> samples, int nFolds) throws IOException
samples
- the data to train and testnFolds
- number of folds
IOException
public double getWordAccuracy()
public long getWordCount()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |