public class MultiLexicon extends Lexicon<String>
Properties
Modifier and Type | Class and Description |
---|---|
class |
MultiLexicon.LexiconEntryIterator |
Lexicon.LexiconFileEntry<KEY2>
Constructor and Description |
---|
MultiLexicon(Lexicon<String>[] lexicons,
int[] numTerms)
constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close all of the contained lexicons.
|
Lexicon<String> |
getIthLexicon(int index) |
Map.Entry<String,LexiconEntry> |
getIthLexiconEntry(int index)
This is an invalid method since a lexicon entry can appear in any number of
lexicons.
|
Map.Entry<String,LexiconEntry> |
getLexiconEntry(int termid)
Get the term and LexiconEntry (contains statistics and a pointer) for
a given term id.
|
LexiconEntry |
getLexiconEntry(String term)
Get the LexiconEntry (contains statistics and a pointer) for the given term.
|
Iterator<Map.Entry<String,LexiconEntry>> |
getLexiconEntryRange(String from,
String to)
Returns an iterator over a set of LexiconEntries within a range of
entries in the lexicon.
|
static int |
hashCode(String term) |
static char |
hashCodePrefix(int hashcode) |
Iterator<Map.Entry<String,LexiconEntry>> |
iterator()
Creates an iterator over the MultiLexicon structure.
|
int |
numberOfEntries()
Return the number of entries in the lexicon
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static int hashCode(String term)
public static char hashCodePrefix(int hashcode)
public int numberOfEntries()
numberOfEntries
in class Lexicon<String>
public LexiconEntry getLexiconEntry(String term)
getLexiconEntry
in class Lexicon<String>
term
- key to lookup the lexicon withpublic Map.Entry<String,LexiconEntry> getLexiconEntry(int termid)
getLexiconEntry
in class Lexicon<String>
termid
- the term id to lookup in the lexiconpublic Map.Entry<String,LexiconEntry> getIthLexiconEntry(int index)
getIthLexiconEntry
in class Lexicon<String>
index
- the entry number to lookup in the lexiconpublic Iterator<Map.Entry<String,LexiconEntry>> iterator()
public void close() throws IOException
IOException
public Iterator<Map.Entry<String,LexiconEntry>> getLexiconEntryRange(String from, String to)
Lexicon
getLexiconEntryRange
in class Lexicon<String>
from
- low endpoint term in the subset, inclusive.to
- high endpoint term in the subset, exclusive.Terrier Information Retrieval Platform 5.2. Copyright © 2004-2019, University of Glasgow