Package opennlp.tools.ml.model
Schnittstelle DataIndexer
- Alle bekannten Implementierungsklassen:
AbstractDataIndexer
,OnePassDataIndexer
,OnePassRealValueDataIndexer
,TwoPassDataIndexer
public interface DataIndexer
Represents an indexer which compresses events in memory and performs feature selection.
- Siehe auch:
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint[][]
int
int[]
String[]
int[]
int[]
String[]
float[][]
void
index
(ObjectStream<Event> eventStream) Performs the data indexing.void
init
(TrainingParameters trainParams, Map<String, String> reportMap) Sets parameters used during the data indexing.
-
Methodendetails
-
getContexts
int[][] getContexts()- Gibt zurück:
- Retrieves a 2-dimensional array whose first dimension is the event index and array this refers to contains the contexts for that event.
-
getNumTimesEventsSeen
int[] getNumTimesEventsSeen()- Gibt zurück:
- Retrieves an array indexed by the event index indicating the number of times a particular event was seen.
-
getOutcomeList
int[] getOutcomeList()- Gibt zurück:
- Retrieves an array indicating the outcome index for each event.
-
getPredLabels
String[] getPredLabels()- Gibt zurück:
- Retrieves an array of predicate/context names indexed by context index.
These indices are the value of the array returned by
getContexts()
.
-
getPredCounts
int[] getPredCounts()- Gibt zurück:
- Retrieves an array of the count of each predicate in the events.
-
getOutcomeLabels
String[] getOutcomeLabels()- Gibt zurück:
- Retrieves an array of outcome names indexed by outcome index.
-
getValues
float[][] getValues()- Gibt zurück:
- Retrieves the values associated with each event context or
null
if integer values are to be used.
-
getNumEvents
int getNumEvents()- Gibt zurück:
- Retrieves the number of total events indexed.
-
init
Sets parameters used during the data indexing.- Parameter:
trainParams
- TheTrainingParameters
to be used.reportMap
- TheMap
used for reporting.
-
index
Performs the data indexing.Note: Make sure the
init(TrainingParameters, Map)
method is called first.- Parameter:
eventStream
- AObjectStream<Event>
of events used as input.- Löst aus:
IOException
- Thrown if IO errors occurred during indexing.
-