public class BasicTermStatsLexiconEntry extends LexiconEntry
Modifier and Type | Field and Description |
---|---|
protected int |
maxtf |
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 |
getMaxFrequencyInDocuments() |
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 nt)
Sets the document frequency
|
void |
setFrequency(int F) |
void |
setMaxFrequencyInDocuments(int max) |
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
protected int n_t
protected int TF
protected int termId
protected int maxtf
public BasicTermStatsLexiconEntry()
public BasicTermStatsLexiconEntry(int _TF, int _n_t, int _termId)
_TF
- _n_t
- _termId
- public int getDocumentFrequency()
public int getMaxFrequencyInDocuments()
public void setMaxFrequencyInDocuments(int max)
public int getFrequency()
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
public void setFrequency(int F)
public void setDocumentFrequency(int nt)
Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow