public class VocabWord extends SequenceElement implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected java.lang.Long |
affinityId |
protected java.lang.Long |
vocabId |
codeLength, codes, elementFrequency, index, init, isLabel, points, sequencesCount, special, storageId
Constructor and Description |
---|
VocabWord() |
VocabWord(double wordFrequency,
java.lang.String word) |
VocabWord(double wordFrequency,
java.lang.String word,
long storageId) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Equals method override should be properly implemented for any extended class, otherwise it will be based on label equality
|
java.lang.String |
getLabel()
This method should return string representation of this SequenceElement, so it can be used for
|
java.lang.String |
getWord() |
int |
hashCode()
hashCode method override should be properly implemented for any extended class, otherwise it will be based on label hashCode
|
static VocabWord |
none() |
void |
setWord(java.lang.String word) |
java.lang.String |
toJSON() |
java.lang.String |
toString() |
compareTo, getCodeLength, getCodes, getElementFrequency, getGradient, getHistoricalGradient, getIndex, getLongHash, getPoints, getSequencesCount, getStorageId, increaseElementFrequency, incrementElementFrequency, incrementSequencesCount, incrementSequencesCount, isLabel, mapper, markAsLabel, setCodeLength, setCodes, setElementFrequency, setHistoricalGradient, setIndex, setPoints, setPoints, setSequencesCount
protected java.lang.Long vocabId
protected java.lang.Long affinityId
public VocabWord(double wordFrequency, @NonNull java.lang.String word)
wordFrequency
- count of the wordpublic VocabWord(double wordFrequency, @NonNull java.lang.String word, long storageId)
public VocabWord()
public static VocabWord none()
public java.lang.String getLabel()
SequenceElement
getLabel
in class SequenceElement
public java.lang.String getWord()
public void setWord(java.lang.String word)
public boolean equals(java.lang.Object o)
SequenceElement
equals
in class SequenceElement
public int hashCode()
SequenceElement
hashCode
in class SequenceElement
public java.lang.String toString()
toString
in class SequenceElement
public java.lang.String toJSON()
toJSON
in class SequenceElement