Package opennlp.tools.sentdetect
Class SDCrossValidator
- java.lang.Object
-
- opennlp.tools.sentdetect.SDCrossValidator
-
public class SDCrossValidator extends Object
A cross validator forsentence detectors
.
-
-
Constructor Summary
Constructors Constructor Description SDCrossValidator(String languageCode, TrainingParameters params, SentenceDetectorFactory sdFactory, SentenceDetectorEvaluationMonitor... listeners)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
evaluate(ObjectStream<SentenceSample> samples, int nFolds)
Starts the evaluation.FMeasure
getFMeasure()
-
-
-
Constructor Detail
-
SDCrossValidator
public SDCrossValidator(String languageCode, TrainingParameters params, SentenceDetectorFactory sdFactory, SentenceDetectorEvaluationMonitor... listeners)
-
-
Method Detail
-
evaluate
public void evaluate(ObjectStream<SentenceSample> samples, int nFolds) throws IOException
Starts the evaluation.- Parameters:
samples
- the data to train and testnFolds
- number of folds- Throws:
IOException
- Thrown if IO errors occurred during processing.
-
getFMeasure
public FMeasure getFMeasure()
-
-