Package org.terrier.structures
Interface EntryStatistics
-
- All Superinterfaces:
java.io.Serializable
- All Known Subinterfaces:
BlockEntryStatistics
,FieldEntryStatistics
,NgramEntryStatistics
- All Known Implementing Classes:
BasicLexiconEntry
,BasicTermStatsLexiconEntry
,FieldLexiconEntry
,LexiconEntry
,MemoryFieldsLexiconEntry
,MemoryLexiconEntry
,MultiLexiconEntry
,SimpleNgramEntryStatistics
,Tr3BlockFieldLexiconEntry
,Tr3BlockLexiconEntry
,Tr4BasicLexiconEntry
,Tr4BasicTermStatsLexiconEntry
,Tr4FieldLexiconEntry
public interface EntryStatistics extends java.io.Serializable
An interface for basic statistics about a lexicon entry.- Since:
- 3.0
- Author:
- Craig Macdonald
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(EntryStatistics e)
Increment the statistics of this object by that of another.int
getDocumentFrequency()
Return the number of documents that the term occurs in.int
getFrequency()
Return the frequency (total number of occurrences) of the term.int
getMaxFrequencyInDocuments()
Return the maximum in-document term frequency of the term among all documents the terms appears in.int
getTermId()
Return the id of the term.EntryStatistics
getWritableEntryStatistics()
Copy this entry statistics to one that can be reused.void
setDocumentFrequency(int nt)
Set the number of documents that the term occurs in.void
setFrequency(int F)
Set the frequency (total number of occurrences) of the term.void
setMaxFrequencyInDocuments(int max)
Set the maximum in-document term frequency of the term among all documents the terms appears in.void
subtract(EntryStatistics e)
Decrement the statistics of this object by that of another.
-
-
-
Method Detail
-
getFrequency
int getFrequency()
Return the frequency (total number of occurrences) of the term.- Returns:
- the frequency (total number of occurrences) of the entry (term).
-
setFrequency
void setFrequency(int F)
Set the frequency (total number of occurrences) of the term.- Parameters:
F
- the frequency (total number of occurrences) of the entry (term).
-
getDocumentFrequency
int getDocumentFrequency()
Return the number of documents that the term occurs in.- Returns:
- the number of documents that the term occurs in.
-
setDocumentFrequency
void setDocumentFrequency(int nt)
Set the number of documents that the term occurs in.- Parameters:
nt
- the number of documents that the term occurs in.
-
getTermId
int getTermId()
Return the id of the term.- Returns:
- the id of the term.
-
getMaxFrequencyInDocuments
int getMaxFrequencyInDocuments()
Return the maximum in-document term frequency of the term among all documents the terms appears in.- Returns:
- the maximum in-document term frequency of the term among all documents the terms appears in.
-
setMaxFrequencyInDocuments
void setMaxFrequencyInDocuments(int max)
Set the maximum in-document term frequency of the term among all documents the terms appears in.- Parameters:
max
- the maximum in-document term frequency of the term among all documents the terms appears in.
-
add
void add(EntryStatistics e)
Increment the statistics of this object by that of another.- Parameters:
e
- the other object whose statistics are used to increment the statistics of this object.
-
subtract
void subtract(EntryStatistics e)
Decrement the statistics of this object by that of another.- Parameters:
e
- the other object whose statistics are used to decrement the statistics of this object.
-
getWritableEntryStatistics
EntryStatistics getWritableEntryStatistics()
Copy this entry statistics to one that can be reused. Kind of like a clone.- Returns:
- an identical entry statistics, but which can be reused.
- Since:
- 3.6
-
-