Package opennlp.tools.ml
Class AbstractTrainer
java.lang.Object
opennlp.tools.ml.AbstractTrainer
- All Implemented Interfaces:
- Trainer
- Direct Known Subclasses:
- AbstractEventModelSequenceTrainer,- AbstractEventTrainer
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractTrainer(TrainingParameters trainParams) Initializes aAbstractTrainerviaTrainingParameters.
- 
Method SummaryModifier and TypeMethodDescriptionintintvoidinit(TrainingParameters trainParams, Map<String, String> reportMap) voidvalidate()Checks the configuredparameters.
- 
Constructor Details- 
AbstractTrainerpublic AbstractTrainer()
- 
AbstractTrainerInitializes aAbstractTrainerviaTrainingParameters.- Parameters:
- trainParams- The- TrainingParametersto use.
 
 
- 
- 
Method Details- 
init- Specified by:
- initin interface- Trainer
- Parameters:
- trainParams- The- TrainingParametersto use.
- reportMap- The- Mapinstance used as report map.
 
- 
getAlgorithm- Returns:
- Retrieves the configured TrainingParameters.ALGORITHM_PARAMvalue.
 
- 
getCutoffpublic int getCutoff()- Returns:
- Retrieves the configured TrainingParameters.CUTOFF_PARAMvalue.
 
- 
getIterationspublic int getIterations()- Returns:
- Retrieves the configured TrainingParameters.ITERATIONS_PARAMvalue.
 
- 
validatepublic void validate()Checks the configuredparameters. If a subclass overrides this, it should callsuper.validate();.- Throws:
- IllegalArgumentException- Thrown if default training parameters are invalid.
 
 
-