package phrase; import io.FileUtil; import java.io.PrintStream; import java.util.Arrays; public class PhraseCluster { /**@brief number of clusters*/ public int K; private int n_phrase; private int n_words; public PhraseCorpus c; /**@brief * emit[tag][position][word] */ private double emit[][][]; private double pi[][]; public static int ITER=20; public static String postFilename="../pdata/posterior.out"; public static String phraseStatFilename="../pdata/phrase_stat.out"; private static int NUM_TAG=3; public static void main(String[] args) { PhraseCorpus c=new PhraseCorpus(PhraseCorpus.DATA_FILENAME); PhraseCluster cluster=new PhraseCluster(NUM_TAG,c); PhraseObjective.ps=FileUtil.openOutFile(phraseStatFilename); for(int i=0;i