opennlp.maxent
Class OnePassDataIndexer

java.lang.Object
  extended by opennlp.maxent.AbstractDataIndexer
      extended by opennlp.maxent.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.

Version:
$Revision: 1.5 $, $Date: 2007/03/15 04:51:26 $
Author:
Jason Baldridge

Field Summary
 
Fields inherited from class opennlp.maxent.AbstractDataIndexer
contexts, numTimesEventsSeen, outcomeLabels, outcomeList, predCounts, predLabels
 
Constructor Summary
OnePassDataIndexer(EventStream eventStream)
          One argument constructor for DataIndexer which calls the two argument constructor assuming no cutoff.
OnePassDataIndexer(EventStream eventStream, int cutoff)
          Two argument constructor for DataIndexer.
 
Method Summary
protected  java.util.List index(gnu.trove.TLinkedList events, gnu.trove.TObjectIntHashMap predicateIndex)
           
 
Methods inherited from class opennlp.maxent.AbstractDataIndexer
getContexts, getNumTimesEventsSeen, getOutcomeLabels, getOutcomeList, getPredCounts, getPredLabels, getValues, sortAndMerge, toIndexedStringArray, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnePassDataIndexer

public OnePassDataIndexer(EventStream eventStream)
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.

OnePassDataIndexer

public OnePassDataIndexer(EventStream eventStream,
                          int cutoff)
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.
Method Detail

index

protected java.util.List index(gnu.trove.TLinkedList events,
                               gnu.trove.TObjectIntHashMap predicateIndex)


Copyright © 2005 Jason Baldridge, Gann Bierner, and Thomas Morton. All Rights Reserved.