public class POSTaggerCrossValidator extends Object
Constructor and Description |
---|
POSTaggerCrossValidator(String languageCode,
TrainingParameters trainParam,
File tagDictionary,
Integer ngramCutoff,
Integer tagdicCutoff,
String factoryClass,
POSTaggerEvaluationMonitor... listeners)
Creates a
POSTaggerCrossValidator that builds a ngram dictionary
dynamically. |
POSTaggerCrossValidator(String languageCode,
TrainingParameters trainParam,
POSTaggerFactory factory,
POSTaggerEvaluationMonitor... listeners)
Creates a
POSTaggerCrossValidator using the given
POSTaggerFactory . |
Modifier and Type | Method and Description |
---|---|
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.
|
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 void evaluate(ObjectStream<POSSample> samples, int nFolds) throws IOException
samples
- the data to train and testnFolds
- number of foldsIOException
public double getWordAccuracy()
public long getWordCount()
Copyright © 2017 The Apache Software Foundation. All rights reserved.