KEY - the type of the key. Usually String to denote a term.public abstract class Lexicon<KEY> extends Object implements Closeable, Iterable<Map.Entry<KEY,LexiconEntry>>
EntryStatistics) and the pointer (Pointer) to the
offset of that term's postings in the PostingIndex returned by Index.getInvertedIndex(). The
EntryStatistics and Pointer are combined in a single
LexiconEntry object.EntryStatistics,
Pointer| Constructor and Description |
|---|
Lexicon() |
| Modifier and Type | Method and Description |
|---|---|
abstract Map.Entry<KEY,LexiconEntry> |
getIthLexiconEntry(int index)
Get the term and LexiconEntry (contains statistics and a pointer) for
the entry in the lexicon with the specified index.
|
abstract Map.Entry<KEY,LexiconEntry> |
getLexiconEntry(int termid)
Get the term and LexiconEntry (contains statistics and a pointer) for
a given term id.
|
abstract LexiconEntry |
getLexiconEntry(KEY term)
Get the LexiconEntry (contains statistics and a pointer) for the given term.
|
abstract Iterator<Map.Entry<KEY,LexiconEntry>> |
getLexiconEntryRange(KEY from,
KEY to)
Returns an iterator over a set of LexiconEntries within a range of
entries in the lexicon.
|
abstract int |
numberOfEntries()
Return the number of entries in the lexicon
|
public abstract int numberOfEntries()
public abstract LexiconEntry getLexiconEntry(KEY term)
term - key to lookup the lexicon withpublic abstract Map.Entry<KEY,LexiconEntry> getLexiconEntry(int termid)
termid - the term id to lookup in the lexiconpublic abstract Map.Entry<KEY,LexiconEntry> getIthLexiconEntry(int index)
index - the entry number to lookup in the lexiconpublic abstract Iterator<Map.Entry<KEY,LexiconEntry>> getLexiconEntryRange(KEY from, KEY to)
from - low endpoint term in the subset, inclusive.to - high endpoint term in the subset, exclusive.Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow