Package opennlp.tools.ml
Class AbstractEventTrainer
java.lang.Object
opennlp.tools.ml.AbstractTrainer
opennlp.tools.ml.AbstractEventTrainer
- All Implemented Interfaces:
- Trainer,- EventTrainer
- Direct Known Subclasses:
- GISTrainer,- NaiveBayesTrainer,- PerceptronTrainer,- QNTrainer
A basic 
EventTrainer implementation.- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface opennlp.tools.ml.EventTrainerEVENT_VALUE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract MaxentModeldoTrain(DataIndexer indexer) getDataIndexer(ObjectStream<Event> events) abstract booleanfinal MaxentModeltrain(DataIndexer indexer) Trains aMaxentModelfor givenevents.final MaxentModeltrain(ObjectStream<Event> events) Trains aMaxentModelfor givenevents.voidvalidate()Checks the configuredparameters.Methods inherited from class opennlp.tools.ml.AbstractTrainergetAlgorithm, getCutoff, getIterations, getTrainingConfiguration, init, init
- 
Field Details- 
DATA_INDEXER_PARAM- See Also:
 
- 
DATA_INDEXER_ONE_PASS_VALUE- See Also:
 
- 
DATA_INDEXER_TWO_PASS_VALUE- See Also:
 
- 
DATA_INDEXER_ONE_PASS_REAL_VALUE- See Also:
 
 
- 
- 
Constructor Details- 
AbstractEventTrainerpublic AbstractEventTrainer()
- 
AbstractEventTrainer
 
- 
- 
Method Details- 
validatepublic void validate()Description copied from class:AbstractTrainerChecks the configuredparameters. If a subclass overrides this, it should callsuper.validate();.- Overrides:
- validatein class- AbstractTrainer
 
- 
isSortAndMergepublic abstract boolean isSortAndMerge()
- 
getDataIndexer- Throws:
- IOException
 
- 
doTrain- Throws:
- IOException
 
- 
trainDescription copied from interface:EventTrainerTrains aMaxentModelfor givenevents.- Specified by:
- trainin interface- EventTrainer
- Parameters:
- indexer- The input- indexerto use.
- Returns:
- The trained MaxentModel.
- Throws:
- IOException- Thrown if IO errors occurred.
 
- 
trainDescription copied from interface:EventTrainerTrains aMaxentModelfor givenevents.- Specified by:
- trainin interface- EventTrainer
- Parameters:
- events- The input- events.
- Returns:
- The trained MaxentModel.
- Throws:
- IOException- Thrown if IO errors occurred.
 
 
-