public static void main(String[] args) throws IOException, IllegalAccessException, InstantiationException {
DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
ArgumentBuilder abuilder = new ArgumentBuilder();
GroupBuilder gbuilder = new GroupBuilder();
Option seqOpt = obuilder.withLongName("seqFileDir").withRequired(false).withArgument(
abuilder.withName("seqFileDir").withMinimum(1).withMaximum(1).create()).withDescription(
"The directory containing Sequence Files for the Clusters").withShortName("s").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 substringOpt = obuilder.withLongName("substring").withRequired(false).withArgument(
abuilder.withName("substring").withMinimum(1).withMaximum(1).create()).withDescription(
"The number of chars of the asFormatString() to print").withShortName("b").create();
Option numWordsOpt = obuilder.withLongName("numWords").withRequired(false).withArgument(
abuilder.withName("numWords").withMinimum(1).withMaximum(1).create()).withDescription(
"The number of top terms to print").withShortName("n").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 pointsOpt = obuilder.withLongName("pointsDir").withRequired(false).withArgument(
abuilder.withName("pointsDir").withMinimum(1).withMaximum(1).create()).withDescription(
"The directory containing points sequence files mapping input vectors to their cluster. "
+ "If specified, then the program will output the points associated with a cluster").withShortName(
"p").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 helpOpt = obuilder.withLongName("help").withDescription("Print out help").withShortName("h")
.create();
Group group = gbuilder.withName("Options").withOption(helpOpt).withOption(seqOpt).withOption(outputOpt)
.withOption(substringOpt).withOption(pointsOpt).withOption(centroidJSonOpt).withOption(dictOpt)
.withOption(dictTypeOpt).withOption(numWordsOpt).create();