public static void main(String[] args) throws IOException {
DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
ArgumentBuilder abuilder = new ArgumentBuilder();
GroupBuilder gbuilder = new GroupBuilder();
Option seqOpt = obuilder.withLongName("seqFile").withRequired(false).withArgument(
abuilder.withName("seqFile").withMinimum(1).withMaximum(1).create()).withDescription(
"The Sequence File containing the Vectors").withShortName("s").create();
Option vectorAsKeyOpt = obuilder.withLongName("useKey").withRequired(false).withDescription(
"If the Key is a vector, then dump that instead").withShortName("u").create();
Option printKeyOpt = obuilder.withLongName("printKey").withRequired(false).withDescription(
"Print out the key as well, delimited by a tab (or the value if useKey is true)").withShortName("p")
.create();
Option outputOpt = obuilder.withLongName("output").withRequired(false).withArgument(
abuilder.withName("output").withMinimum(1).withMaximum(1).create()).withDescription(
"The output file. If not specified, dumps to the console").withShortName("o").create();
Option dictOpt = obuilder.withLongName("dictionary").withRequired(false).withArgument(
abuilder.withName("dictionary").withMinimum(1).withMaximum(1).create()).withDescription(
"The dictionary file. ").withShortName("d").create();
Option dictTypeOpt = obuilder.withLongName("dictionaryType").withRequired(false).withArgument(
abuilder.withName("dictionaryType").withMinimum(1).withMaximum(1).create()).withDescription(
"The dictionary file type (text|sequencefile)").withShortName("dt").create();
Option centroidJSonOpt = obuilder.withLongName("json").withRequired(false).withDescription(
"Output the centroid as JSON. Otherwise it substitues in the terms for vector cell entries")
.withShortName("j").create();
Option helpOpt = obuilder.withLongName("help").withDescription("Print out help").withShortName("h")
.create();
Group group = gbuilder.withName("Options").withOption(seqOpt).withOption(outputOpt).withOption(
dictTypeOpt).withOption(dictOpt).withOption(centroidJSonOpt).withOption(vectorAsKeyOpt).withOption(
printKeyOpt).create();