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 | 937ca2c2786665c8fc531f66803fedd84aceaef3 (patch) | |
tree | 5d288af552b42ba55594dd56b6d3753cc05f7398 /gi/posterior-regularisation/prjava/src/phrase | |
parent | ffd9800a8ed78f818debb0e02a9f379b166f3de9 (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++)
|