Terrier IR Platform
2.2.1

uk.ac.gla.terrier.structures
Class LexiconEntry

java.lang.Object
  extended by uk.ac.gla.terrier.structures.LexiconEntry

public class LexiconEntry
extends java.lang.Object

Contains all the information about one entry in the Lexicon. Created to make thread-safe lookups in the Lexicon easier.


Field Summary
 byte endBitOffset
          the end bit offset of the entry in the inverted index
 long endOffset
          the end offset of the entry in the inverted index
 int n_t
          the number of document that this entry occurs in
 byte startBitOffset
          the start bit offset of the entry in the inverted index
 long startOffset
          the start offset of the entry in the inverted index
 java.lang.String term
          the term of this entry
 int termId
          the termid of this entry
 int TF
          the total number of occurrences of the term in the index
 
Constructor Summary
LexiconEntry()
          Create an empty LexiconEntry
LexiconEntry(java.lang.String t, int tid, int n_t, int TF)
          Create a lexicon entry with the following information.
 
Method Summary
 void add(LexiconEntry le)
          increment this lexicon entry by another
 void subtract(LexiconEntry le)
          alter this lexicon entry to subtract another lexicon entry
 java.lang.String toString()
          returns a string representation of this lexicon entry
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

term

public java.lang.String term
the term of this entry


termId

public int termId
the termid of this entry


n_t

public int n_t
the number of document that this entry occurs in


TF

public int TF
the total number of occurrences of the term in the index


startOffset

public long startOffset
the start offset of the entry in the inverted index


startBitOffset

public byte startBitOffset
the start bit offset of the entry in the inverted index


endOffset

public long endOffset
the end offset of the entry in the inverted index


endBitOffset

public byte endBitOffset
the end bit offset of the entry in the inverted index

Constructor Detail

LexiconEntry

public LexiconEntry()
Create an empty LexiconEntry


LexiconEntry

public LexiconEntry(java.lang.String t,
                    int tid,
                    int n_t,
                    int TF)
Create a lexicon entry with the following information.

Parameters:
t - the term
tid - the term id
n_t - the number of documents the term occurs in (document frequency)
TF - the total count of therm t in the collection
Method Detail

add

public void add(LexiconEntry le)
increment this lexicon entry by another


subtract

public void subtract(LexiconEntry le)
alter this lexicon entry to subtract another lexicon entry


toString

public java.lang.String toString()
returns a string representation of this lexicon entry

Overrides:
toString in class java.lang.Object

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow