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
commit4e37402323c3227e90a89345387834e149732b5c (patch)
treed1ae6cc41076de10aa1d26b4f57d4c209877a5b8 /gi/posterior-regularisation/prjava/src/test
parenta5cbf679c4a78818e07fc7756d5e466450a5be15 (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++){