From 40a21147727a2f1c77ee4796fd8c648160e3b555 Mon Sep 17 00:00:00 2001 From: "trevor.cohn" Date: Mon, 19 Jul 2010 22:32:22 +0000 Subject: Fixed command line git-svn-id: https://ws10smt.googlecode.com/svn/trunk@325 ec762483-ff6d-05da-a07a-a48fb63a330f --- gi/posterior-regularisation/prjava/src/phrase/Trainer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gi/posterior-regularisation/prjava/src/phrase') 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 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)); -- cgit v1.2.3