Package opennlp.tools.ml
Class AbstractEventTrainer
- java.lang.Object
-
- opennlp.tools.ml.AbstractTrainer
-
- opennlp.tools.ml.AbstractEventTrainer
-
- All Implemented Interfaces:
EventTrainer
- Direct Known Subclasses:
GIS
,PerceptronTrainer
,QNTrainer
public abstract class AbstractEventTrainer extends AbstractTrainer implements EventTrainer
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DATA_INDEXER_ONE_PASS_VALUE
static java.lang.String
DATA_INDEXER_PARAM
static java.lang.String
DATA_INDEXER_TWO_PASS_VALUE
-
Fields inherited from class opennlp.tools.ml.AbstractTrainer
ALGORITHM_PARAM, CUTOFF_DEFAULT, CUTOFF_PARAM, ITERATIONS_DEFAULT, ITERATIONS_PARAM, TRAINER_TYPE_PARAM
-
Fields inherited from interface opennlp.tools.ml.EventTrainer
EVENT_VALUE
-
-
Constructor Summary
Constructors Constructor Description AbstractEventTrainer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract MaxentModel
doTrain(DataIndexer indexer)
DataIndexer
getDataIndexer(ObjectStream<Event> events)
abstract boolean
isSortAndMerge()
boolean
isValid()
MaxentModel
train(ObjectStream<Event> events)
-
Methods inherited from class opennlp.tools.ml.AbstractTrainer
getAlgorithm, getCutoff, getIterations, init
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface opennlp.tools.ml.EventTrainer
init
-
-
-
-
Field Detail
-
DATA_INDEXER_PARAM
public static final java.lang.String DATA_INDEXER_PARAM
- See Also:
- Constant Field Values
-
DATA_INDEXER_ONE_PASS_VALUE
public static final java.lang.String DATA_INDEXER_ONE_PASS_VALUE
- See Also:
- Constant Field Values
-
DATA_INDEXER_TWO_PASS_VALUE
public static final java.lang.String DATA_INDEXER_TWO_PASS_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isValid
public boolean isValid()
- Overrides:
isValid
in classAbstractTrainer
-
isSortAndMerge
public abstract boolean isSortAndMerge()
-
getDataIndexer
public DataIndexer getDataIndexer(ObjectStream<Event> events) throws java.io.IOException
- Throws:
java.io.IOException
-
doTrain
public abstract MaxentModel doTrain(DataIndexer indexer) throws java.io.IOException
- Throws:
java.io.IOException
-
train
public final MaxentModel train(ObjectStream<Event> events) throws java.io.IOException
- Specified by:
train
in interfaceEventTrainer
- Throws:
java.io.IOException
-
-