|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terrier.structures.Lexicon<KEY>
KEY - the type of the key. Usually String to denote a term.public abstract class Lexicon<KEY>
Abstract Lexicon implementation. The Lexicon class typically represents
the list of terms (dictionary) in the index, together with their statistics
(see EntryStatistics) and the pointer (Pointer) to the
offset of that term's postings in the InvertedIndex. The
EntryStatistics and Pointer are combined in a single
LexiconEntry object.
EntryStatistics,
Pointer| Constructor Summary | |
|---|---|
Lexicon()
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.io.Closeable |
|---|
close |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Constructor Detail |
|---|
public Lexicon()
| Method Detail |
|---|
public abstract int numberOfEntries()
public abstract LexiconEntry getLexiconEntry(KEY term)
term - key to lookup the lexicon with
public abstract Map.Entry<KEY,LexiconEntry> getLexiconEntry(int termid)
termid - the term id to lookup in the lexicon
public abstract Map.Entry<KEY,LexiconEntry> getIthLexiconEntry(int index)
index - the entry number to lookup in the lexicon
public 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||