public class BasicTermStatsLexiconEntry extends LexiconEntry
Modifier and Type | Field and Description |
---|---|
protected int |
n_t |
protected int |
termId |
protected int |
TF |
Constructor and Description |
---|
BasicTermStatsLexiconEntry()
Constructs an instance of the BasicTermStatsLexiconEntry.
|
BasicTermStatsLexiconEntry(int _TF,
int _n_t,
int _termId)
Constructs an instance of the BasicTermStatsLexiconEntry.
|
Modifier and Type | Method and Description |
---|---|
void |
add(EntryStatistics le)
Increment the statistics of this object by that of another
|
int |
getDocumentFrequency()
The number of documents that the entry (term) occurred in
|
int |
getFrequency()
The frequency (total number of occurrences) of the entry (term).
|
int |
getNumberOfEntries()
Returns number of "things" that this pointer refers to
|
long |
getOffset()
Get the offset (bytes)
|
byte |
getOffsetBits()
Get the number of bits for the offset
|
int |
getTermId()
The id of the term
|
String |
pointerToString()
Returns a textual representation of the pointer alone
|
void |
readFields(DataInput in) |
void |
setAll(int _TF,
int _n_t,
int _termId)
Sets the term frequency, document frequency and term id for this term
|
void |
setBitIndexPointer(BitIndexPointer pointer)
Sets the bit index pointer to this LexiconEntry
|
void |
setDocumentFrequency(int _n_t)
Sets the document frequency
|
void |
setFrequency(int _TF)
Sets the frequency for this term
|
void |
setNumberOfEntries(int n)
Set the number of "things that the pointer refers to
|
void |
setOffset(BitFilePosition pos)
Sets the offset using a BitFilePosition
|
void |
setOffset(long bytes,
byte bits)
Set the offset in terms of bits and bytes
|
void |
setPointer(Pointer p)
Sets the pointer within this object to that represented by
the specified pointer
|
void |
setStatistics(int _n_t,
int _TF)
Set the document frequency and term frequency
|
void |
setTermId(int _termId)
Set the term ID
|
void |
subtract(EntryStatistics le)
Decrement the statistics of this object by that of another
|
void |
write(DataOutput out) |
equals, getWritableEntryStatistics, hashCode, toString
public BasicTermStatsLexiconEntry()
public BasicTermStatsLexiconEntry(int _TF, int _n_t, int _termId)
_TF
- _n_t
- _termId
- public int getDocumentFrequency()
public void setDocumentFrequency(int _n_t)
public int getFrequency()
public void setFrequency(int _TF)
public int getTermId()
public void setTermId(int _termId)
setTermId
in class LexiconEntry
public void setAll(int _TF, int _n_t, int _termId)
public int getNumberOfEntries()
getNumberOfEntries
in interface Pointer
getNumberOfEntries
in class LexiconEntry
public byte getOffsetBits()
public long getOffset()
public void setOffset(long bytes, byte bits)
public void setBitIndexPointer(BitIndexPointer pointer)
public void setOffset(BitFilePosition pos)
public void readFields(DataInput in) throws IOException
IOException
public void write(DataOutput out) throws IOException
IOException
public void add(EntryStatistics le)
public void subtract(EntryStatistics le)
public void setNumberOfEntries(int n)
setNumberOfEntries
in interface Pointer
setNumberOfEntries
in class LexiconEntry
public String pointerToString()
pointerToString
in interface Pointer
pointerToString
in class LexiconEntry
public void setPointer(Pointer p)
setPointer
in interface Pointer
setPointer
in class LexiconEntry
p
- other pointer to update the pointer in this objectpublic void setStatistics(int _n_t, int _TF)
LexiconEntry
setStatistics
in class LexiconEntry
Terrier 4.0. Copyright © 2004-2014 University of Glasgow