cc.mallet.topics
Class TopicalNGrams

java.lang.Object
  extended by 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)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TopicalNGrams

public TopicalNGrams(int numberOfTopics)

TopicalNGrams

public TopicalNGrams(int numberOfTopics,
                     double alphaSum,
                     double beta,
                     double gamma,
                     double delta,
                     double delta1,
                     double delta2)
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)