Package opennlp.tools.sentdetect
Class SDCrossValidator
- java.lang.Object
-
- opennlp.tools.sentdetect.SDCrossValidator
-
public class SDCrossValidator extends Object
A cross validator for the sentence detector.
-
-
Constructor Summary
Constructors Constructor Description SDCrossValidator(String languageCode)
Deprecated.useSDCrossValidator(String, TrainingParameters, SentenceDetectorFactory, SentenceDetectorEvaluationMonitor...)
instead and pass in a TrainingParameters object.SDCrossValidator(String languageCode, TrainingParameters params)
SDCrossValidator(String languageCode, TrainingParameters params, SentenceDetectorEvaluationMonitor... listeners)
Deprecated.useSDCrossValidator(String, TrainingParameters, SentenceDetectorFactory, SentenceDetectorEvaluationMonitor...)
instead and pass in a TrainingParameters object.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)
-
SDCrossValidator
public SDCrossValidator(String languageCode, TrainingParameters params)
-
SDCrossValidator
public SDCrossValidator(String languageCode, TrainingParameters params, SentenceDetectorEvaluationMonitor... listeners)
Deprecated.useSDCrossValidator(String, TrainingParameters, SentenceDetectorFactory, SentenceDetectorEvaluationMonitor...)
instead and pass in a TrainingParameters object.
-
SDCrossValidator
public SDCrossValidator(String languageCode)
Deprecated.useSDCrossValidator(String, TrainingParameters, SentenceDetectorFactory, SentenceDetectorEvaluationMonitor...)
instead and pass in a TrainingParameters object.
-
-
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
-
getFMeasure
public FMeasure getFMeasure()
-
-