DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
ArgumentBuilder abuilder = new ArgumentBuilder();
GroupBuilder gbuilder = new GroupBuilder();
Option pathOpt = obuilder.withLongName("path").withRequired(true).withArgument(
abuilder.withName("path").withMinimum(1).withMaximum(1).create()).withDescription(
"The local file system path").withShortName("m").create();
Option classifyOpt = obuilder.withLongName("classify").withRequired(true).withArgument(
abuilder.withName("classify").withMinimum(1).withMaximum(1).create()).withDescription(
"The doc to classify").withShortName("").create();
Option encodingOpt = obuilder.withLongName("encoding").withRequired(true).withArgument(
abuilder.withName("encoding").withMinimum(1).withMaximum(1).create()).withDescription(
"The file encoding. Default: UTF-8").withShortName("e").create();
Option analyzerOpt = obuilder.withLongName("analyzer").withRequired(true).withArgument(
abuilder.withName("analyzer").withMinimum(1).withMaximum(1).create()).withDescription(
"The Analyzer to use").withShortName("a").create();
Option defaultCatOpt = obuilder.withLongName("defaultCat").withRequired(true).withArgument(
abuilder.withName("defaultCat").withMinimum(1).withMaximum(1).create()).withDescription(
"The default category").withShortName("d").create();
Option gramSizeOpt = obuilder.withLongName("gramSize").withRequired(true).withArgument(
abuilder.withName("gramSize").withMinimum(1).withMaximum(1).create()).withDescription(
"Size of the n-gram").withShortName("ng").create();
Option typeOpt = obuilder.withLongName("classifierType").withRequired(true).withArgument(
abuilder.withName("classifierType").withMinimum(1).withMaximum(1).create()).withDescription(
"Type of classifier").withShortName("type").create();
Option dataSourceOpt = obuilder.withLongName("dataSource").withRequired(true).withArgument(
abuilder.withName("dataSource").withMinimum(1).withMaximum(1).create()).withDescription(
"Location of model: hdfs").withShortName("source").create();
Group options = gbuilder.withName("Options").withOption(pathOpt).withOption(classifyOpt).withOption(
encodingOpt).withOption(analyzerOpt).withOption(defaultCatOpt).withOption(gramSizeOpt).withOption(