|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.knowceans.corpus.Document
public class Document
wrapper for a document in LDA
lda-c reference: struct document in lda.h. Here the distinction between term and word is used, changing API nomenclature. TODO automatic length tracking
Constructor Summary | |
---|---|
Document()
|
|
Document(Document d)
copy constructor |
|
Document(int length)
|
Method Summary | |
---|---|
void |
addDocument(Document d)
add all terms to the end of this document, filling the parBounds field. |
void |
compile()
|
int |
getCount(int index)
|
int[] |
getCounts()
|
int |
getNumTerms()
|
int |
getNumWords()
|
int[] |
getParBounds()
|
int |
getTerm(int index)
|
int[] |
getTerms()
|
void |
mergeDocument(Document d)
merge all terms and add the document or null. |
void |
setCount(int index,
int count)
|
void |
setCounts(int[] is)
|
void |
setNumTerms(int i)
|
void |
setNumWords(int i)
|
void |
setParBounds(int[] parBounds)
|
void |
setTerm(int index,
int term)
|
void |
setWords(int[] is)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Document()
public Document(int length)
public Document(Document d)
document
- Method Detail |
---|
public void compile()
public int[] getCounts()
public int getCount(int index)
index
-
public void setCount(int index, int count)
count
- index
- public int getNumTerms()
public int getNumWords()
public int[] getTerms()
public int getTerm(int index)
index
-
public void setTerm(int index, int term)
term
- index
- public void setCounts(int[] is)
is
- public void setNumTerms(int i)
i
- public void setNumWords(int i)
i
- public void setWords(int[] is)
is
- public void addDocument(Document d)
d
- public void mergeDocument(Document d)
d
- public int[] getParBounds()
public void setParBounds(int[] parBounds)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |