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 voidadd(EntryStatistics e)Not implemented.LexiconEntry[]getChildren()Return LexiconEntry's.intgetDocumentFrequency()Return the number of documents that the term occurs in.intgetFrequency()Return the frequency (total number of occurrences) of the term.intgetMaxFrequencyInDocuments()Return the maximum in-document term frequency of the term among all documents the terms appears in.intgetNumberOfEntries()Pointer implementation: how many entries in the inverted index.intgetTermId()Not implemented.java.lang.StringpointerToString()Not implemented.voidreadFields(java.io.DataInput arg0)Not implemented.voidsetDocumentFrequency(int nt)Set the number of documents that the term occurs in.voidsetFrequency(int F)Set the frequency (total number of occurrences) of the term.voidsetMaxFrequencyInDocuments(int max)Set the maximum in-document term frequency of the term among all documents the terms appears in.voidsetNumberOfEntries(int n)Not implemented.voidsetPointer(Pointer p)Not implemented.voidsetStatistics(int n_t, int TF)Not implemented.voidsetTermId(int newTermId)Not implemented.voidsubtract(EntryStatistics e)Not implemented.voidwrite(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:
getNumberOfEntriesin interfacePointer- Overrides:
getNumberOfEntriesin 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:
setNumberOfEntriesin interfacePointer- Overrides:
setNumberOfEntriesin classLexiconEntry- Parameters:
n- the number of "things" that the pointer refers to.
-
pointerToString
public java.lang.String pointerToString()
Not implemented.- Specified by:
pointerToStringin interfacePointer- Overrides:
pointerToStringin classLexiconEntry
-
setPointer
public void setPointer(Pointer p)
Not implemented.- Specified by:
setPointerin interfacePointer- Overrides:
setPointerin classLexiconEntry- Parameters:
p- other pointer to update the pointer in this object.
-
readFields
public void readFields(java.io.DataInput arg0) throws java.io.IOExceptionNot implemented.- Throws:
java.io.IOException
-
write
public void write(java.io.DataOutput arg0) throws java.io.IOExceptionNot implemented.- Throws:
java.io.IOException
-
setTermId
public void setTermId(int newTermId)
Not implemented.- Specified by:
setTermIdin classLexiconEntry
-
setStatistics
public void setStatistics(int n_t, int TF)Not implemented.- Specified by:
setStatisticsin classLexiconEntry
-
getMaxFrequencyInDocuments
public int getMaxFrequencyInDocuments()
Description copied from interface:EntryStatisticsReturn 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:EntryStatisticsSet 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:EntryStatisticsSet 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:EntryStatisticsSet the number of documents that the term occurs in.- Parameters:
nt- the number of documents that the term occurs in.
-
-