Package opennlp.tools.tokenize
Klasse TokenizerCrossValidator
java.lang.Object
opennlp.tools.tokenize.TokenizerCrossValidator
A cross validator for
tokenizers
.-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungTokenizerCrossValidator
(TrainingParameters params, TokenizerFactory factory, TokenizerEvaluationMonitor... listeners) Creates aTokenizerCrossValidator
using the givenTokenizerFactory
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
evaluate
(ObjectStream<TokenSample> samples, int nFolds) Starts the evaluation.
-
Konstruktordetails
-
TokenizerCrossValidator
public TokenizerCrossValidator(TrainingParameters params, TokenizerFactory factory, TokenizerEvaluationMonitor... listeners) Creates aTokenizerCrossValidator
using the givenTokenizerFactory
.- Parameter:
params
- TheTrainingParameters
for the context of cross validation.factory
- TheTokenizerFactory
to be used.listeners
- Theevaluation listeners
.
-
-
Methodendetails
-
evaluate
Starts the evaluation.- Parameter:
samples
- TheObjectStream
ofsamples
to train and test with.nFolds
- Number of folds. It must be greater than zero.- Löst aus:
IOException
- Thrown if IO errors occurred during evaluation.
-
getFMeasure
-