Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/opennlp/ccg/WebCCG.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@
*/
public class WebCCG {
/** Main method for tccg. */
public static void main(String[] args) throws IOException, LexException {
String usage = "java opennlp.ccg.WebCCG " +
"[-showall] [-showderivs] [-showsem] [-showfeats] [-visualize FILE] GRAMMARDIR\n" +
public static void main(String[] args) throws IOException, LexException {
String usage = "java opennlp.ccg.WebCCG " +
"[-prompt SIGN] [-showall] [-showderivs] [-showsem] [-showfeats] [-visualize FILE] GRAMMARDIR\n" +
"\n" +
"-prompt specify a prompt sign (defaults to the empty string).\n" +
"-showall shows all parses rather than just the first one.\n" +
"-showderivs shows the derivation history of each parse.\n" +
"-showsem shows the logical form of each parse.\n" +
Expand All @@ -73,14 +74,17 @@ public static void main(String[] args) throws IOException, LexException {

// args
//String prefsfile = null;
String prompt = "";
boolean showall = false;
boolean showderivs = false;
boolean showsem = false;
boolean showfeats = false;
String visfile = null;
int i;
for (i = 0; i < args.length; i++) {
if (args[i].equals("-showall"))
if (args[i].equals("-prompt"))
prompt = args[++i];
else if (args[i].equals("-showall"))
showall = true;
else if (args[i].equals("-showderivs"))
showderivs = true;
Expand Down Expand Up @@ -113,6 +117,8 @@ else if (args[i].equals("-visualize"))

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while (true) {
if ("" != prompt)
System.out.print(prompt + " ");
String input = br.readLine();
if (input == null) break; // EOF
input = input.trim();
Expand Down