Package opennlp.tools.ml.model
Class TwoPassDataIndexer
java.lang.Object
opennlp.tools.ml.model.AbstractDataIndexer
opennlp.tools.ml.model.TwoPassDataIndexer
- All Implemented Interfaces:
- DataIndexer
Collecting event and context counts by making two passes over the events.
 
The first pass determines which contexts will be used by the model, and the second pass creates the events in memory containing only the contexts which will be used. This greatly reduces the amount of memory required for storing the events. During the first pass a temporary event file is created which is read during the second pass.
- See Also:
- 
Field SummaryFields inherited from class opennlp.tools.ml.model.AbstractDataIndexerCUTOFF_DEFAULT, CUTOFF_PARAM, SORT_DEFAULT, SORT_PARAM
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidindex(ObjectStream<Event> eventStream) Performs the data indexing.Methods inherited from class opennlp.tools.ml.model.AbstractDataIndexergetContexts, getNumEvents, getNumTimesEventsSeen, getOutcomeLabels, getOutcomeList, getPredCounts, getPredLabels, getValues, init
- 
Constructor Details- 
TwoPassDataIndexerpublic TwoPassDataIndexer()
 
- 
- 
Method Details- 
indexPerforms the data indexing.Note: Make sure the DataIndexer.init(TrainingParameters, Map)method is called first.- Parameters:
- eventStream- A- ObjectStream<Event>of events used as input.
- Throws:
- IOException- Thrown if IO errors occurred during indexing.
 
 
-