Package opennlp.tools.ml.model
Interface DataIndexer
- All Known Implementing Classes:
- AbstractDataIndexer,- OnePassDataIndexer,- OnePassRealValueDataIndexer,- TwoPassDataIndexer
public interface DataIndexer
Represents an indexer which compresses events in memory and performs feature selection.
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionint[][]intint[]String[]int[]int[]String[]float[][]voidindex(ObjectStream<Event> eventStream) Performs the data indexing.voidinit(TrainingParameters trainParams, Map<String, String> reportMap) Sets parameters used during the data indexing.
- 
Method Details- 
getContextsint[][] getContexts()- Returns:
- Retrieves a 2-dimensional array whose first dimension is the event index and array this refers to contains the contexts for that event.
 
- 
getNumTimesEventsSeenint[] getNumTimesEventsSeen()- Returns:
- Retrieves an array indexed by the event index indicating the number of times a particular event was seen.
 
- 
getOutcomeListint[] getOutcomeList()- Returns:
- Retrieves an array indicating the outcome index for each event.
 
- 
getPredLabelsString[] getPredLabels()- Returns:
- Retrieves an array of predicate/context names indexed by context index.
 These indices are the value of the array returned by getContexts().
 
- 
getPredCountsint[] getPredCounts()- Returns:
- Retrieves an array of the count of each predicate in the events.
 
- 
getOutcomeLabelsString[] getOutcomeLabels()- Returns:
- Retrieves an array of outcome names indexed by outcome index.
 
- 
getValuesfloat[][] getValues()- Returns:
- Retrieves the values associated with each event context or
         nullif integer values are to be used.
 
- 
getNumEventsint getNumEvents()- Returns:
- Retrieves the number of total events indexed.
 
- 
initSets parameters used during the data indexing.- Parameters:
- trainParams- The- TrainingParametersto be used.
- reportMap- The- Mapused for reporting.
 
- 
indexPerforms the data indexing.Note: Make sure the 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.
 
 
-