Class MemoryBiGramDictionary

  extended by com.sun.labs.minion.indexer.dictionary.MemoryDictionary
      extended by com.sun.labs.minion.indexer.dictionary.MemoryBiGramDictionary
All Implemented Interfaces:
Dictionary, java.lang.Iterable<QueryEntry>

public class MemoryBiGramDictionary
extends MemoryDictionary

Nested Class Summary
Nested classes/interfaces inherited from class com.sun.labs.minion.indexer.dictionary.MemoryDictionary
MemoryDictionary.IDMap, MemoryDictionary.MemoryDictionaryIterator, MemoryDictionary.Renumber
Field Summary
protected static java.lang.String logTag
Fields inherited from class com.sun.labs.minion.indexer.dictionary.MemoryDictionary
entryClass, id, idMap, map, part
Constructor Summary
          Creates a bigram dictionary.
MemoryBiGramDictionary(Entry[] e)
          Creates and populates a bigram dictionary from a set of dictionary entries.
Method Summary
 void add(Entry entry)
          Adds an entry from another dictionary to the bigram dictionary.
Methods inherited from class com.sun.labs.minion.indexer.dictionary.MemoryDictionary
clear, dump, dump, dumpPrepare, get, getEntryClass, getIdMap, getKeys, getMaxId, getPartition, getSize, iterator, newEntry, processEntry, put, remove, setPartition, simpleNewEntry, size, sort
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected static java.lang.String logTag
Constructor Detail


public MemoryBiGramDictionary()
Creates a bigram dictionary. Such a dictionary will be populated a term at a time.


public MemoryBiGramDictionary(Entry[] e)
Creates and populates a bigram dictionary from a set of dictionary entries. Note that the names of these entries are assumed to be instances of String.

e - Entries whose names should be added to the dictionary.
Method Detail


public void add(Entry entry)
Adds an entry from another dictionary to the bigram dictionary. This will break the name of the entry into bigrams and add those bigrams to the dictionary.

entry - The entry whose name should be added to the bigram dictionary.