public class VocabWord extends Object implements Comparable<VocabWord>, Serializable
Modifier and Type | Field and Description |
---|---|
static String |
PARENT_NODE |
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() |
int[] |
getCodes() |
int |
getIndex() |
double |
getLearningRate(int index,
double g) |
VocabWord |
getLeft() |
int[] |
getPoints() |
VocabWord |
getRight() |
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(int[] codes) |
void |
setIndex(int index) |
void |
setLeft(VocabWord left) |
void |
setParent(VocabWord parent) |
void |
setPoints(int[] points) |
void |
setRight(VocabWord right) |
void |
setWord(String word) |
String |
toString() |
void |
write(DataOutputStream dos) |
public static final String PARENT_NODE
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 int[] getCodes()
public void setCodes(int[] codes)
public void setParent(VocabWord parent)
public VocabWord getLeft()
public void setLeft(VocabWord left)
public VocabWord getRight()
public void setRight(VocabWord right)
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 getLearningRate(int index, double g)
public int[] getPoints()
public void setPoints(int[] points)
public int getCodeLength()
public void setCodeLength(int codeLength)
Copyright © 2014. All rights reserved.