Package opennlp.tools.chunker
Class ChunkerCrossValidator
java.lang.Object
opennlp.tools.chunker.ChunkerCrossValidator
Cross validator for
Chunker
.-
Constructor Summary
ConstructorDescriptionChunkerCrossValidator
(String languageCode, TrainingParameters params, ChunkerFactory factory, ChunkerEvaluationMonitor... listeners) Initializes aChunkerCrossValidator
instance via given parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
evaluate
(ObjectStream<ChunkSample> samples, int nFolds) Starts the evaluation.
-
Constructor Details
-
ChunkerCrossValidator
public ChunkerCrossValidator(String languageCode, TrainingParameters params, ChunkerFactory factory, ChunkerEvaluationMonitor... listeners) Initializes aChunkerCrossValidator
instance via given parameters.- Parameters:
languageCode
- An ISO conform language code.factory
- TheChunkerFactory
for creating related objects.params
- TheTrainingParameters
for the context of cross validation.listeners
- theevaluation listeners
.
-
-
Method Details
-
evaluate
Starts the evaluation.- Parameters:
samples
- TheObjectStream
ofsamples
to train and test with.nFolds
- Number of folds. It must be greater than zero.- Throws:
IOException
- Thrown if IO errors occurred.
-
getFMeasure
-