diff options
author | trevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-19 22:32:22 +0000 |
---|---|---|
committer | trevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-19 22:32:22 +0000 |
commit | 40a21147727a2f1c77ee4796fd8c648160e3b555 (patch) | |
tree | 92768560f63e5b6b52b7fc9f9e5bf291bfbaac6e /gi/posterior-regularisation/prjava/src | |
parent | 5a8ea689c8a4e9cf3e72f88a253b08153bf32dde (diff) |
Fixed command line
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@325 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/posterior-regularisation/prjava/src')
-rw-r--r-- | gi/posterior-regularisation/prjava/src/phrase/Trainer.java | 5 |
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)); |