Class MemoryFieldsLexiconEntry
- java.lang.Object
-
- org.terrier.structures.LexiconEntry
-
- org.terrier.realtime.memory.MemoryLexiconEntry
-
- org.terrier.realtime.memory.fields.MemoryFieldsLexiconEntry
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.hadoop.io.Writable,MemoryPointer,EntryStatistics,FieldEntryStatistics,Pointer
public class MemoryFieldsLexiconEntry extends MemoryLexiconEntry implements FieldEntryStatistics
Lexicon entry (fields).- Since:
- 4.0
- Author:
- Stuart Mackie
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MemoryFieldsLexiconEntry(int termid)Constructor (termid).MemoryFieldsLexiconEntry(int df, int tf, int[] fields)Constructor (df, tf, fields).MemoryFieldsLexiconEntry(int termid, int df, int tf, int[] fields)Constructor (termid, df, tf, fields).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(EntryStatistics le)Increment the statistics of this object by that of another.int[]getFieldFrequencies()Return the frequencies (total numbers of occurrences) of the term for each field.voidsubtract(EntryStatistics le)Decrement the statistics of this object by that of another.-
Methods inherited from class org.terrier.realtime.memory.MemoryLexiconEntry
clone, getDocumentFrequency, getFrequency, getMaxFrequencyInDocuments, getNumberOfEntries, getPointer, getTermId, pointerToString, readFields, setDocumentFrequency, setFrequency, setMaxFrequencyInDocuments, setNumberOfEntries, setPointer, setStatistics, setTermId, write
-
Methods inherited from class org.terrier.structures.LexiconEntry
equals, getWritableEntryStatistics, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.terrier.structures.EntryStatistics
getDocumentFrequency, getFrequency, getMaxFrequencyInDocuments, getTermId, getWritableEntryStatistics, setDocumentFrequency, setFrequency, setMaxFrequencyInDocuments
-
-
-
-
Constructor Detail
-
MemoryFieldsLexiconEntry
public MemoryFieldsLexiconEntry(int termid, int df, int tf, int[] fields)Constructor (termid, df, tf, fields).
-
MemoryFieldsLexiconEntry
public MemoryFieldsLexiconEntry(int df, int tf, int[] fields)Constructor (df, tf, fields).
-
MemoryFieldsLexiconEntry
public MemoryFieldsLexiconEntry(int termid)
Constructor (termid).
-
-
Method Detail
-
getFieldFrequencies
public int[] getFieldFrequencies()
Return the frequencies (total numbers of occurrences) of the term for each field.- Specified by:
getFieldFrequenciesin interfaceFieldEntryStatistics- Returns:
- the frequencies (total numbers of occurrences) of the term for each field.
-
add
public void add(EntryStatistics le)
Increment the statistics of this object by that of another.- Specified by:
addin interfaceEntryStatistics- Overrides:
addin classMemoryLexiconEntry- Parameters:
le- the other object whose statistics are used to increment the statistics of this object.
-
subtract
public void subtract(EntryStatistics le)
Decrement the statistics of this object by that of another.- Specified by:
subtractin interfaceEntryStatistics- Overrides:
subtractin classMemoryLexiconEntry- Parameters:
le- the other object whose statistics are used to decrement the statistics of this object.
-
-