summaryrefslogtreecommitdiff
path: root/gi/posterior-regularisation/prjava/src/test
diff options
context:
space:
mode:
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++){