Package opennlp.tools.ml.model
Class AbstractDataIndexer
java.lang.Object
opennlp.tools.ml.model.AbstractDataIndexer
- All Implemented Interfaces:
- DataIndexer
- Direct Known Subclasses:
- OnePassDataIndexer,- TwoPassDataIndexer
Abstract 
DataIndexer implementation for collecting
 event and context counts used in training.- See Also:
- 
Field Details- 
SORT_PARAM- See Also:
 
- 
SORT_DEFAULTpublic static final boolean SORT_DEFAULT- See Also:
 
 
- 
- 
Constructor Details- 
AbstractDataIndexerpublic AbstractDataIndexer()
 
- 
- 
Method Details- 
initSets parameters used during the data indexing.- Specified by:
- initin interface- DataIndexer
- Parameters:
- indexingParameters- The- TrainingParametersto be used.
- reportMap- The- Mapused for reporting.
 
- 
getContextspublic int[][] getContexts()- Specified by:
- getContextsin interface- DataIndexer
- Returns:
- Retrieves a 2-dimensional array whose first dimension is the event index and array this refers to contains the contexts for that event.
 
- 
getNumTimesEventsSeenpublic int[] getNumTimesEventsSeen()- Specified by:
- getNumTimesEventsSeenin interface- DataIndexer
- Returns:
- Retrieves an array indexed by the event index indicating the number of times a particular event was seen.
 
- 
getOutcomeListpublic int[] getOutcomeList()- Specified by:
- getOutcomeListin interface- DataIndexer
- Returns:
- Retrieves an array indicating the outcome index for each event.
 
- 
getPredLabels- Specified by:
- getPredLabelsin interface- DataIndexer
- Returns:
- Retrieves an array of predicate/context names indexed by context index.
 These indices are the value of the array returned by DataIndexer.getContexts().
 
- 
getOutcomeLabels- Specified by:
- getOutcomeLabelsin interface- DataIndexer
- Returns:
- Retrieves an array of outcome names indexed by outcome index.
 
- 
getPredCountspublic int[] getPredCounts()- Specified by:
- getPredCountsin interface- DataIndexer
- Returns:
- Retrieves an array of the count of each predicate in the events.
 
- 
getNumEventspublic int getNumEvents()- Specified by:
- getNumEventsin interface- DataIndexer
- Returns:
- Retrieves the number of total events indexed.
 
- 
getValuespublic float[][] getValues()- Specified by:
- getValuesin interface- DataIndexer
- Returns:
- Retrieves the values associated with each event context or
         nullif integer values are to be used.
 
 
-