summaryrefslogtreecommitdiff
path: root/gi/posterior-regularisation/prjava/src/test
diff options
context:
space:
mode:
authortrevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-09 16:42:01 +0000
committertrevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-09 16:42:01 +0000
commit0d1d84630a08f1c901cf09b4bcc9356c4165302f (patch)
tree934647a40407956f541d640deb893b72ff75d3a8 /gi/posterior-regularisation/prjava/src/test
parent6a862cec42c8197919e3ef1250c58ac2b4260e10 (diff)
Make
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@203 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/posterior-regularisation/prjava/src/test')
-rw-r--r--gi/posterior-regularisation/prjava/src/test/HMMModelStats.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/gi/posterior-regularisation/prjava/src/test/HMMModelStats.java b/gi/posterior-regularisation/prjava/src/test/HMMModelStats.java
index dbf517fd..d54525c8 100644
--- a/gi/posterior-regularisation/prjava/src/test/HMMModelStats.java
+++ b/gi/posterior-regularisation/prjava/src/test/HMMModelStats.java
@@ -3,6 +3,9 @@ package test;
import hmm.HMM;
import hmm.POS;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
@@ -39,7 +42,13 @@ public class HMMModelStats {
- PrintStream ps=io.FileUtil.openOutFile(statsFilename);
+ PrintStream ps = null;
+ try {
+ ps = io.FileUtil.printstream(new File(statsFilename));
+ } catch (IOException e) {
+ e.printStackTrace();
+ System.exit(1);
+ }
double [][] emit=hmm.getEmitProb();
for(int i=0;i<emit.length;i++){