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 |
TopicalNGrams(int numberOfTopics)
|
TopicalNGrams(int numberOfTopics,
double alphaSum,
double beta,
double gamma,
double delta,
double delta1,
double delta2)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TopicalNGrams
public TopicalNGrams(int numberOfTopics)
TopicalNGrams
public TopicalNGrams(int numberOfTopics,
double alphaSum,
double beta,
double gamma,
double delta,
double delta1,
double delta2)
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)