Class AbstractEventTrainer<P extends opennlp.tools.util.Parameters>
java.lang.Object
opennlp.tools.ml.AbstractTrainer<P>
opennlp.tools.ml.AbstractEventTrainer<P>
- All Implemented Interfaces:
opennlp.tools.commons.Trainer<P>, opennlp.tools.ml.EventTrainer<P>
public abstract class AbstractEventTrainer<P extends opennlp.tools.util.Parameters>
extends AbstractTrainer<P>
implements opennlp.tools.ml.EventTrainer<P>
A basic
EventTrainer implementation.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface opennlp.tools.ml.EventTrainer
EVENT_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract opennlp.tools.ml.model.MaxentModelopennlp.tools.ml.model.DataIndexer<P> getDataIndexer(opennlp.tools.util.ObjectStream<opennlp.tools.ml.model.Event> events) abstract booleanfinal opennlp.tools.ml.model.MaxentModelfinal opennlp.tools.ml.model.MaxentModeltrain(opennlp.tools.util.ObjectStream<opennlp.tools.ml.model.Event> events) voidvalidate()Checks the configuredparameters.Methods inherited from class AbstractTrainer
getAlgorithm, getCutoff, getIterations, getTrainingConfiguration, init, initMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface opennlp.tools.commons.Trainer
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
-
AbstractEventTrainer
public AbstractEventTrainer() -
AbstractEventTrainer
-
-
Method Details
-
validate
public void validate()Description copied from class:AbstractTrainerChecks the configuredparameters. If a subclass overrides this, it should callsuper.validate();.- Overrides:
validatein classAbstractTrainer<P extends opennlp.tools.util.Parameters>
-
isSortAndMerge
public abstract boolean isSortAndMerge() -
getDataIndexer
public opennlp.tools.ml.model.DataIndexer<P> getDataIndexer(opennlp.tools.util.ObjectStream<opennlp.tools.ml.model.Event> events) throws IOException - Throws:
IOException
-
doTrain
public abstract opennlp.tools.ml.model.MaxentModel doTrain(opennlp.tools.ml.model.DataIndexer<P> indexer) throws IOException - Throws:
IOException
-
train
public final opennlp.tools.ml.model.MaxentModel train(opennlp.tools.ml.model.DataIndexer<P> indexer) throws IOException - Specified by:
trainin interfaceopennlp.tools.ml.EventTrainer<P extends opennlp.tools.util.Parameters>- Throws:
IOException
-
train
public final opennlp.tools.ml.model.MaxentModel train(opennlp.tools.util.ObjectStream<opennlp.tools.ml.model.Event> events) throws IOException - Specified by:
trainin interfaceopennlp.tools.ml.EventTrainer<P extends opennlp.tools.util.Parameters>- Throws:
IOException
-