public class VocabWord extends Object implements Comparable<VocabWord>, Serializable
Constructor and Description |
---|
VocabWord() |
VocabWord(double wordFrequency,
String word) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(VocabWord o) |
boolean |
equals(Object o) |
int |
getCodeLength() |
List<Integer> |
getCodes() |
double |
getGradient(int index,
double g) |
int |
getIndex() |
List<Integer> |
getPoints() |
String |
getWord() |
double |
getWordFrequency() |
int |
hashCode() |
void |
increment() |
void |
increment(int by) |
static VocabWord |
none() |
VocabWord |
read(DataInputStream dos) |
void |
setCodeLength(int codeLength) |
void |
setCodes(List<Integer> codes) |
void |
setIndex(int index) |
void |
setPoints(List<Integer> points) |
void |
setWord(String word) |
String |
toString() |
void |
write(DataOutputStream dos) |
public VocabWord(double wordFrequency, String word)
wordFrequency
- count of the wordpublic VocabWord()
public static VocabWord none()
public void write(DataOutputStream dos) throws IOException
IOException
public VocabWord read(DataInputStream dos) throws IOException
IOException
public String getWord()
public void setWord(String word)
public void increment()
public void increment(int by)
public int getIndex()
public void setIndex(int index)
public double getWordFrequency()
public int compareTo(VocabWord o)
compareTo
in interface Comparable<VocabWord>
public double getGradient(int index, double g)
public int getCodeLength()
public void setCodeLength(int codeLength)
Copyright © 2015. All rights reserved.