Package opennlp.tools.parser
Class ParserCrossValidator
java.lang.Object
opennlp.tools.parser.ParserCrossValidator
Cross validator for a 
Parser.- 
Constructor SummaryConstructorsConstructorDescriptionParserCrossValidator(String languageCode, TrainingParameters params, HeadRules rules, ParserType parserType, ParserEvaluationMonitor... monitors) Initializes aParserCrossValidatorinstance via given parameters.
- 
Method SummaryModifier and TypeMethodDescriptionvoidevaluate(ObjectStream<Parse> samples, int nFolds) Starts the evaluation.
- 
Constructor Details- 
ParserCrossValidatorpublic ParserCrossValidator(String languageCode, TrainingParameters params, HeadRules rules, ParserType parserType, ParserEvaluationMonitor... monitors) Initializes aParserCrossValidatorinstance via given parameters.- Parameters:
- languageCode- An ISO conform language code.
- params- The- TrainingParametersfor the context of cross validation.
- rules- The- HeadRulesfor the context of cross validation.
- parserType- The- ParserTypefor the context of cross validation.
- monitors- the- evaluation listeners.
 
 
- 
- 
Method Details- 
evaluateStarts the evaluation.- Parameters:
- samples- The- ObjectStreamof- samplesto train and test with.
- nFolds- Number of folds. It must be greater than zero.
- Throws:
- IOException- Thrown if IO errors occurred.
- IllegalStateException- Thrown if the currently active- ParserTypeis not supported.
 
- 
getFMeasure
 
-