Package opennlp.tools.parser
Klasse ParserCrossValidator
java.lang.Object
opennlp.tools.parser.ParserCrossValidator
Cross validator for a
Parser
.-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungParserCrossValidator
(String languageCode, TrainingParameters params, HeadRules rules, ParserType parserType, ParserEvaluationMonitor... monitors) Initializes aParserCrossValidator
instance via given parameters. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
evaluate
(ObjectStream<Parse> samples, int nFolds) Starts the evaluation.
-
Konstruktordetails
-
ParserCrossValidator
public ParserCrossValidator(String languageCode, TrainingParameters params, HeadRules rules, ParserType parserType, ParserEvaluationMonitor... monitors) Initializes aParserCrossValidator
instance via given parameters.- Parameter:
languageCode
- An ISO conform language code.params
- TheTrainingParameters
for the context of cross validation.rules
- TheHeadRules
for the context of cross validation.parserType
- TheParserType
for the context of cross validation.monitors
- 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.IllegalStateException
- Thrown if the currently activeParserType
is not supported.
-
getFMeasure
-