From 4e37402323c3227e90a89345387834e149732b5c Mon Sep 17 00:00:00 2001 From: "trevor.cohn" Date: Fri, 9 Jul 2010 16:42:01 +0000 Subject: Make git-svn-id: https://ws10smt.googlecode.com/svn/trunk@203 ec762483-ff6d-05da-a07a-a48fb63a330f --- .../prjava/src/test/HMMModelStats.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gi/posterior-regularisation/prjava/src/test') 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