diff options
author | desaicwtf <desaicwtf@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-09 21:17:55 +0000 |
---|---|---|
committer | desaicwtf <desaicwtf@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-09 21:17:55 +0000 |
commit | 2f18ef81afaed06ab7a1214b4e367db49c9c7606 (patch) | |
tree | 85960f26df54813a58909bc026e7c3b9774ddeb7 /gi/posterior-regularisation/prjava/src/phrase | |
parent | 406f8775c704df9e288ca2896b2b596c49538178 (diff) |
context->phrase fix a bug
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@212 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/posterior-regularisation/prjava/src/phrase')
-rw-r--r-- | gi/posterior-regularisation/prjava/src/phrase/C2F.java | 8 |
1 files changed, 4 insertions, 4 deletions
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<K;tag++)
|