Package org.terrier.realtime.multi
Class MultiLexiconEntry
- java.lang.Object
-
- org.terrier.structures.LexiconEntry
-
- org.terrier.realtime.multi.MultiLexiconEntry
-
- All Implemented Interfaces:
java.io.Serializable
,org.apache.hadoop.io.Writable
,EntryStatistics
,Pointer
public class MultiLexiconEntry extends LexiconEntry
A Lexicon entry that spans multiple index shards. It wraps around multiple lexicon entries from different index shards.- Since:
- 4.0
- Author:
- Richard McCreadie, Stuart Mackie
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MultiLexiconEntry(LexiconEntry[] le, int hashcode)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(EntryStatistics e)
Not implemented.LexiconEntry[]
getChildren()
Return LexiconEntry's.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
getNumberOfEntries()
Pointer implementation: how many entries in the inverted index.int
getTermId()
Not implemented.java.lang.String
pointerToString()
Not implemented.void
readFields(java.io.DataInput arg0)
Not implemented.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
setNumberOfEntries(int n)
Not implemented.void
setPointer(Pointer p)
Not implemented.void
setStatistics(int n_t, int TF)
Not implemented.void
setTermId(int newTermId)
Not implemented.void
subtract(EntryStatistics e)
Not implemented.void
write(java.io.DataOutput arg0)
Not implemented.-
Methods inherited from class org.terrier.structures.LexiconEntry
equals, getWritableEntryStatistics, hashCode, toString
-
-
-
-
Constructor Detail
-
MultiLexiconEntry
public MultiLexiconEntry(LexiconEntry[] le, int hashcode)
Constructor.
-
-
Method Detail
-
getChildren
public LexiconEntry[] getChildren()
Return LexiconEntry's.
-
getFrequency
public int getFrequency()
Return the frequency (total number of occurrences) of the term.- Returns:
- the frequency (total number of occurrences) of the entry (term).
-
getDocumentFrequency
public int getDocumentFrequency()
Return the number of documents that the term occurs in.- Returns:
- the number of documents that the term occurs in.
-
getNumberOfEntries
public int getNumberOfEntries()
Pointer implementation: how many entries in the inverted index. Usually the same as getDocumentFrequency().- Specified by:
getNumberOfEntries
in interfacePointer
- Overrides:
getNumberOfEntries
in classLexiconEntry
- Returns:
- the number of "things" that this pointer refers to.
-
getTermId
public int getTermId()
Not implemented.- Returns:
- the id of the term.
-
add
public void add(EntryStatistics e)
Not implemented.- Parameters:
e
- the other object whose statistics are used to increment the statistics of this object.
-
subtract
public void subtract(EntryStatistics e)
Not implemented.- Parameters:
e
- the other object whose statistics are used to decrement the statistics of this object.
-
setNumberOfEntries
public void setNumberOfEntries(int n)
Not implemented.- Specified by:
setNumberOfEntries
in interfacePointer
- Overrides:
setNumberOfEntries
in classLexiconEntry
- Parameters:
n
- the number of "things" that the pointer refers to.
-
pointerToString
public java.lang.String pointerToString()
Not implemented.- Specified by:
pointerToString
in interfacePointer
- Overrides:
pointerToString
in classLexiconEntry
-
setPointer
public void setPointer(Pointer p)
Not implemented.- Specified by:
setPointer
in interfacePointer
- Overrides:
setPointer
in classLexiconEntry
- Parameters:
p
- other pointer to update the pointer in this object.
-
readFields
public void readFields(java.io.DataInput arg0) throws java.io.IOException
Not implemented.- Throws:
java.io.IOException
-
write
public void write(java.io.DataOutput arg0) throws java.io.IOException
Not implemented.- Throws:
java.io.IOException
-
setTermId
public void setTermId(int newTermId)
Not implemented.- Specified by:
setTermId
in classLexiconEntry
-
setStatistics
public void setStatistics(int n_t, int TF)
Not implemented.- Specified by:
setStatistics
in classLexiconEntry
-
getMaxFrequencyInDocuments
public int getMaxFrequencyInDocuments()
Description copied from interface:EntryStatistics
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
public void setMaxFrequencyInDocuments(int max)
Description copied from interface:EntryStatistics
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.
-
setFrequency
public void setFrequency(int F)
Description copied from interface:EntryStatistics
Set the frequency (total number of occurrences) of the term.- Parameters:
F
- the frequency (total number of occurrences) of the entry (term).
-
setDocumentFrequency
public void setDocumentFrequency(int nt)
Description copied from interface:EntryStatistics
Set the number of documents that the term occurs in.- Parameters:
nt
- the number of documents that the term occurs in.
-
-