From 937ca2c2786665c8fc531f66803fedd84aceaef3 Mon Sep 17 00:00:00 2001 From: desaicwtf Date: Fri, 9 Jul 2010 21:17:55 +0000 Subject: context->phrase fix a bug git-svn-id: https://ws10smt.googlecode.com/svn/trunk@212 ec762483-ff6d-05da-a07a-a48fb63a330f --- gi/posterior-regularisation/prjava/src/phrase/C2F.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gi/posterior-regularisation/prjava/src/phrase') diff --git a/gi/posterior-regularisation/prjava/src/phrase/C2F.java b/gi/posterior-regularisation/prjava/src/phrase/C2F.java index 63dad2ab..3456c953 100644 --- a/gi/posterior-regularisation/prjava/src/phrase/C2F.java +++ b/gi/posterior-regularisation/prjava/src/phrase/C2F.java @@ -63,7 +63,7 @@ public class C2F { public static void main(String args[]){ String in="../pdata/canned.con"; String out="../pdata/posterior.out"; - int numCluster=5; + int numCluster=25; Corpus corpus = null; File infile = new File(in); try { @@ -88,8 +88,8 @@ public class C2F { try { PrintStream ps = FileUtil.printstream(outfile); c2f.displayPosterior(ps); - ps.println(); - c2f.displayModelParam(ps); + // ps.println(); + // c2f.displayModelParam(ps); ps.close(); } catch (IOException e) { System.err.println("Failed to open output file: " + outfile); @@ -153,7 +153,7 @@ public class C2F { public double[] posterior(Corpus.Edge edge) { - double[] prob=Arrays.copyOf(pi[edge.getPhraseId()], K); + double[] prob=Arrays.copyOf(pi[edge.getContextId()], K); TIntArrayList phrase = edge.getPhrase(); for(int tag=0;tag