summaryrefslogtreecommitdiff
path: root/gi
diff options
context:
space:
mode:
authortrevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-19 22:32:22 +0000
committertrevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-19 22:32:22 +0000
commitcdbc2bf5591dd597f5adc6f5d4084f73fda4c07d (patch)
treea96681bc5504c7c840ce5f91405f8f5b494c3ef3 /gi
parenta14894ec4dcf70a841130a93543839f489c4ce0e (diff)
Fixed command line
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@325 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi')
-rw-r--r--gi/posterior-regularisation/prjava/src/phrase/Trainer.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/gi/posterior-regularisation/prjava/src/phrase/Trainer.java b/gi/posterior-regularisation/prjava/src/phrase/Trainer.java
index ec1a5804..afc80724 100644
--- a/gi/posterior-regularisation/prjava/src/phrase/Trainer.java
+++ b/gi/posterior-regularisation/prjava/src/phrase/Trainer.java
@@ -21,6 +21,7 @@ public class Trainer
OptionParser parser = new OptionParser();
parser.accepts("help");
parser.accepts("in").withRequiredArg().ofType(File.class);
+ parser.accepts("test").withRequiredArg().ofType(File.class);
parser.accepts("out").withRequiredArg().ofType(File.class);
parser.accepts("start").withRequiredArg().ofType(File.class);
parser.accepts("parameters").withRequiredArg().ofType(File.class);
@@ -163,10 +164,10 @@ public class Trainer
try {
PrintStream ps = FileUtil.printstream(outfile);
List<Edge> test;
- if (!options.has("test"))
+ if (!options.has("test")) // just use the training
test = corpus.getEdges();
else
- {
+ { // if --test supplied, load up the file
infile = (File) options.valueOf("test");
System.out.println("Reading testing concordance from " + infile);
test = corpus.readEdges(FileUtil.reader(infile));