Class Tr4FieldLexiconEntry
- java.lang.Object
-
- org.terrier.structures.LexiconEntry
-
- org.terrier.structures.restructure.Tr4BasicLexiconEntry
-
- org.terrier.structures.restructure.Tr4FieldLexiconEntry
-
- All Implemented Interfaces:
java.io.Serializable
,org.apache.hadoop.io.Writable
,BitFilePosition
,BitIndexPointer
,EntryStatistics
,FieldEntryStatistics
,Pointer
public class Tr4FieldLexiconEntry extends Tr4BasicLexiconEntry implements FieldEntryStatistics
A LexiconEntry with field support- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Tr4FieldLexiconEntry.Factory
Factory for a LexiconEntry
-
Field Summary
Fields Modifier and Type Field Description protected int[]
fieldFrequencies
-
Fields inherited from class org.terrier.structures.restructure.Tr4BasicLexiconEntry
maxtf, n_t, startBitOffset, startOffset, termId, TF
-
Fields inherited from interface org.terrier.structures.BitIndexPointer
BIT_MASK, FILE_SHIFT, MAX_FILE_ID
-
-
Constructor Summary
Constructors Constructor Description Tr4FieldLexiconEntry(int fieldCount)
Construct an instance of the class withTr4FieldLexiconEntry(int[] _fieldFrequencies)
Construct an instance of the class with
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(EntryStatistics le)
increment this lexicon entry by anotherint[]
getFieldFrequencies()
Return the frequencies (total numbers of occurrences) of the term for each field.void
readFields(java.io.DataInput in)
void
setFieldFrequencies(int[] _fieldFrequencices)
Set the frequencies for each fieldjava.lang.String
toString()
returns a string representation of this lexicon entryvoid
write(java.io.DataOutput out)
-
Methods inherited from class org.terrier.structures.restructure.Tr4BasicLexiconEntry
getDocumentFrequency, getFileNumber, getFrequency, getMaxFrequencyInDocuments, getNumberOfEntries, getOffset, getOffsetBits, getTermId, pointerToString, setBitIndexPointer, setDocumentFrequency, setFileNumber, setFrequency, setMaxFrequencyInDocuments, setNumberOfEntries, setOffset, setOffset, setPointer, setStatistics, setTermId, subtract
-
Methods inherited from class org.terrier.structures.LexiconEntry
equals, getWritableEntryStatistics, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.terrier.structures.EntryStatistics
getDocumentFrequency, getFrequency, getMaxFrequencyInDocuments, getTermId, getWritableEntryStatistics, setDocumentFrequency, setFrequency, setMaxFrequencyInDocuments, subtract
-
-
-
-
Method Detail
-
getFieldFrequencies
public int[] getFieldFrequencies()
Return the frequencies (total numbers of occurrences) of the term for each field.- Specified by:
getFieldFrequencies
in interfaceFieldEntryStatistics
- Returns:
- the frequencies (total numbers of occurrences) of the term for each field.
-
setFieldFrequencies
public void setFieldFrequencies(int[] _fieldFrequencices)
Set the frequencies for each field
-
readFields
public void readFields(java.io.DataInput in) throws java.io.IOException
Description copied from class:Tr4BasicLexiconEntry
- Specified by:
readFields
in interfaceorg.apache.hadoop.io.Writable
- Overrides:
readFields
in classTr4BasicLexiconEntry
- Throws:
java.io.IOException
-
write
public void write(java.io.DataOutput out) throws java.io.IOException
Description copied from class:Tr4BasicLexiconEntry
- Specified by:
write
in interfaceorg.apache.hadoop.io.Writable
- Overrides:
write
in classTr4BasicLexiconEntry
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
Description copied from class:Tr4BasicLexiconEntry
returns a string representation of this lexicon entry- Overrides:
toString
in classTr4BasicLexiconEntry
-
add
public void add(EntryStatistics le)
Description copied from class:Tr4BasicLexiconEntry
increment this lexicon entry by another- Specified by:
add
in interfaceEntryStatistics
- Overrides:
add
in classTr4BasicLexiconEntry
- Parameters:
le
- the other object whose statistics are used to increment the statistics of this object.
-
-