.requiredIf("train", "process").availableIf("train", "evaluate", "compare", "process").withRequiredArg().ofType(Module.class);
OptionSpec<Module> startModuleOption = parser.accepts("startModule", "where to start analysis (or evaluation): " + Arrays.toString(Module.values()))
.availableIf("analyse", "evaluate").withRequiredArg().ofType(Module.class);
OptionSpec<Module> endModuleOption = parser.accepts("endModule", "where to end analysis: " + Arrays.toString(Module.values())).availableIf("analyse")
.withRequiredArg().ofType(Module.class);
OptionSpec<Mode> modeOption = parser.accepts("mode", "execution mode: " + Arrays.toString(Mode.values())).availableIf("analyse").withRequiredArg()
.ofType(Mode.class);
OptionSpec<Integer> portOption = parser.accepts("port", "which port to listen on").availableIf("analyse").withRequiredArg().ofType(Integer.class);
"for analyse and process: if true, and inFile is a directory," + " outFile will be generated as a directory"
+ " and the inFile directory structure will be maintained")
.availableIf("analyse", "process").availableIf(inFileOption).withRequiredArg().ofType(Boolean.class);
OptionSpec<String> evalPatternOption = parser.accepts("evalPattern", "input pattern for evaluation").availableIf("evaluate", "compare").withRequiredArg()
.ofType(String.class);
OptionSpec<File> evalPatternFileOption = parser.accepts("evalPatternFile", "input pattern file for evaluation").availableUnless(evalPatternOption)
.availableIf("analyse").withRequiredArg().ofType(String.class);
"If true, the input file is processed from the very start (e.g. TXT files)."
+ "If false, we wait until a text filter tells us to start processing (e.g. XML files).")
.availableIf("analyse").withRequiredArg().ofType(Boolean.class);
.availableIf("analyse").withRequiredArg().ofType(Integer.class);
OptionSpec<Integer> crossValidationSizeOption = parser.accepts("crossValidationSize", "number of cross-validation folds").availableIf("train", "evaluate")
.withRequiredArg().ofType(Integer.class);
OptionSpec<Integer> includeIndexOption = parser.accepts("includeIndex", "cross-validation index to include for evaluation").availableIf("evaluate")