Package cc.mallet.topics
Class TopicalNGrams
- java.lang.Object
-
- cc.mallet.topics.TopicalNGrams
-
public class TopicalNGrams extends java.lang.Object
Like Latent Dirichlet Allocation, but with integrated phrase discovery.- Author:
- Andrew McCallum mccallum@cs.umass.edu based on C code by Xuerui Wang.
-
-
Constructor Summary
Constructors Constructor Description TopicalNGrams(int numberOfTopics)
TopicalNGrams(int numberOfTopics, double alphaSum, double beta, double gamma, double delta, double delta1, double delta2)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
estimate(InstanceList documents, int numIterations, int showTopicsInterval, int outputModelInterval, java.lang.String outputModelFilename, Randoms r)
static void
main(java.lang.String[] args)
void
printDocumentTopics(java.io.File f)
void
printDocumentTopics(java.io.PrintWriter pw)
void
printDocumentTopics(java.io.PrintWriter pw, double threshold, int max)
void
printState(java.io.File f)
void
printState(java.io.PrintWriter pw)
void
printTopWords(int numWords, boolean useNewLines)
void
write(java.io.File f)
-
-
-
Method Detail
-
estimate
public void estimate(InstanceList documents, int numIterations, int showTopicsInterval, int outputModelInterval, java.lang.String outputModelFilename, Randoms r)
-
printTopWords
public void printTopWords(int numWords, boolean useNewLines)
-
printDocumentTopics
public void printDocumentTopics(java.io.File f) throws java.io.IOException
- Throws:
java.io.IOException
-
printDocumentTopics
public void printDocumentTopics(java.io.PrintWriter pw)
-
printDocumentTopics
public void printDocumentTopics(java.io.PrintWriter pw, double threshold, int max)
-
printState
public void printState(java.io.File f) throws java.io.IOException
- Throws:
java.io.IOException
-
printState
public void printState(java.io.PrintWriter pw)
-
write
public void write(java.io.File f)
-
main
public static void main(java.lang.String[] args)
-
-