public class Document extends SparseIntFV
values| Constructor and Description |
|---|
Document(Corpus corpus) |
Document(int vocabularySize) |
| Modifier and Type | Method and Description |
|---|---|
int |
countUniqueWords() |
int |
length()
Get the length of this vector
|
void |
setWordCount(int word,
int count)
sets a word in the document's count.
|
asciiHeader, asDoubleFV, asDoubleVector, binaryHeader, concatenate, concatenate, getAsDouble, getVector, newInstance, normaliseFV, normaliseFV, normaliseFV, normaliseFV, readASCII, readBinary, setFromDouble, writeASCII, writeBinarypublic Document(Corpus corpus)
corpus - documents from the same corpus share the same vocabulary sizepublic Document(int vocabularySize)
vocabularySize - the number of words in this vocabularypublic int countUniqueWords()
public int length()
FeatureVectorlength in interface FeatureVectorlength in class SparseIntFVpublic void setWordCount(int word, int count)
word - count -