public class MemoryLexicon extends MapLexicon<String,org.apache.hadoop.io.Text> implements Serializable
MapLexicon.Id2EntryIndexLookup, MapLexicon.IdIsIndex
Lexicon.LexiconFileEntry<KEY2>
keyFactory, map, modificationLock
Constructor and Description |
---|
MemoryLexicon()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
gnu.trove.TIntObjectHashMap<ArrayList<Map.Entry<String,LexiconEntry>>> |
getTopTermBins(int binsize,
int minDf) |
Iterator<Map.Entry<String,LexiconEntry>> |
iterator()
Lexicon iterator.
|
protected void |
setK2(String key,
org.apache.hadoop.io.Text instance) |
int |
term(String term,
EntryStatistics es)
Add new term, or update existing term.
|
int |
term(String term,
EntryStatistics es,
int termid) |
protected String |
toK1(org.apache.hadoop.io.Text key) |
int |
trimLexicon(int cutoff) |
close, getIthLexiconEntry, getLexiconEntry, getLexiconEntry, getLexiconEntryRange, numberOfEntries, setTermIdLookup
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public int term(String term, EntryStatistics es)
public int term(String term, EntryStatistics es, int termid)
public int trimLexicon(int cutoff)
public gnu.trove.TIntObjectHashMap<ArrayList<Map.Entry<String,LexiconEntry>>> getTopTermBins(int binsize, int minDf)
public Iterator<Map.Entry<String,LexiconEntry>> iterator()
iterator
in interface Iterable<Map.Entry<String,LexiconEntry>>
protected String toK1(org.apache.hadoop.io.Text key)
toK1
in class MapLexicon<String,org.apache.hadoop.io.Text>
protected void setK2(String key, org.apache.hadoop.io.Text instance)
setK2
in class MapLexicon<String,org.apache.hadoop.io.Text>
Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow