Package opennlp.tools.ml.model
Class OnePassDataIndexer
- java.lang.Object
-
- opennlp.tools.ml.model.AbstractDataIndexer
-
- opennlp.tools.ml.model.OnePassDataIndexer
-
- All Implemented Interfaces:
DataIndexer
- Direct Known Subclasses:
OnePassRealValueDataIndexer
public class OnePassDataIndexer extends AbstractDataIndexer
An indexer for maxent model data which handles cutoffs for uncommon contextual predicates and provides a unique integer index for each of the predicates.
-
-
Constructor Summary
Constructors Constructor Description OnePassDataIndexer(ObjectStream<Event> eventStream)
One argument constructor for DataIndexer which calls the two argument constructor assuming no cutoff.OnePassDataIndexer(ObjectStream<Event> eventStream, int cutoff)
OnePassDataIndexer(ObjectStream<Event> eventStream, int cutoff, boolean sort)
Two argument constructor for DataIndexer.
-
Method Summary
-
Methods inherited from class opennlp.tools.ml.model.AbstractDataIndexer
getContexts, getNumEvents, getNumTimesEventsSeen, getOutcomeLabels, getOutcomeList, getPredCounts, getPredLabels, getValues
-
-
-
-
Constructor Detail
-
OnePassDataIndexer
public OnePassDataIndexer(ObjectStream<Event> eventStream) throws java.io.IOException
One argument constructor for DataIndexer which calls the two argument constructor assuming no cutoff.- Parameters:
eventStream
- An Event[] which contains the a list of all the Events seen in the training data.- Throws:
java.io.IOException
-
OnePassDataIndexer
public OnePassDataIndexer(ObjectStream<Event> eventStream, int cutoff) throws java.io.IOException
- Throws:
java.io.IOException
-
OnePassDataIndexer
public OnePassDataIndexer(ObjectStream<Event> eventStream, int cutoff, boolean sort) throws java.io.IOException
Two argument constructor for DataIndexer.- Parameters:
eventStream
- An Event[] which contains the a list of all the Events seen in the training data.cutoff
- The minimum number of times a predicate must have been observed in order to be included in the model.- Throws:
java.io.IOException
-
-