opennlp.model
Class OnePassRealValueDataIndexer

java.lang.Object
  extended by opennlp.model.AbstractDataIndexer
      extended by opennlp.model.OnePassDataIndexer
          extended by opennlp.model.OnePassRealValueDataIndexer
All Implemented Interfaces:
DataIndexer

public class OnePassRealValueDataIndexer
extends OnePassDataIndexer

An indexer for maxent model data which handles cutoffs for uncommon contextual predicates and provides a unique integer index for each of the predicates and maintains event values.


Constructor Summary
OnePassRealValueDataIndexer(EventStream eventStream, int cutoff)
          Two argument constructor for DataIndexer.
OnePassRealValueDataIndexer(EventStream eventStream, int cutoff, boolean sort)
           
 
Method Summary
 float[][] getValues()
          Returns the values associated with each event context or null if integer values are to be used.
 
Methods inherited from class opennlp.model.AbstractDataIndexer
getContexts, getNumEvents, getNumTimesEventsSeen, getOutcomeLabels, getOutcomeList, getPredCounts, getPredLabels
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnePassRealValueDataIndexer

public OnePassRealValueDataIndexer(EventStream eventStream,
                                   int cutoff,
                                   boolean sort)
                            throws IOException
Throws:
IOException

OnePassRealValueDataIndexer

public OnePassRealValueDataIndexer(EventStream eventStream,
                                   int cutoff)
                            throws 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:
IOException
Method Detail

getValues

public float[][] getValues()
Description copied from interface: DataIndexer
Returns the values associated with each event context or null if integer values are to be used.

Specified by:
getValues in interface DataIndexer
Overrides:
getValues in class AbstractDataIndexer
Returns:
the values associated with each event context.


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.