use of edu.illinois.cs.cogcomp.core.utilities.commands.CommandIgnore in project cogcomp-nlp by CogComp.
the class VerbSenseClassifierMain method main.
@CommandIgnore
public static void main(String[] arguments) throws Exception {
InteractiveShell<VerbSenseClassifierMain> shell = new InteractiveShell<>(VerbSenseClassifierMain.class);
if (arguments.length == 0) {
System.err.println("Usage: <config-file> command");
System.err.println("Required parameter config-file missing.");
shell.showDocumentation();
} else if (arguments.length == 1) {
System.err.println("Usage: <config-file> command");
shell.showDocumentation();
} else {
long start_time = System.currentTimeMillis();
try {
rm = new VerbSenseConfigurator().getDefaultConfig();
String[] args = new String[arguments.length - 1];
System.arraycopy(arguments, 1, args, 0, args.length);
shell.runCommand(args);
long runTime = (System.currentTimeMillis() - start_time) / 1000;
System.out.println("This experiment took " + runTime + " secs");
} catch (AssertionError e) {
e.printStackTrace();
System.exit(-1);
} catch (Exception e) {
e.printStackTrace();
}
}
}
Aggregations