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, writeBinary
public 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()
FeatureVector
length
in interface FeatureVector
length
in class SparseIntFV
public void setWordCount(int word, int count)
word
- count
-