public static void main(String[] args) throws IOException, InvalidDatastoreException {
DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
ArgumentBuilder abuilder = new ArgumentBuilder();
GroupBuilder gbuilder = new GroupBuilder();
Option pathOpt = obuilder.withLongName("model").withRequired(true).withArgument(
abuilder.withName("model").withMinimum(1).withMaximum(1).create()).withDescription(
"The path on HDFS as defined by the -source parameter").withShortName("m")
.create();
Option dirOpt = obuilder.withLongName("testDir").withRequired(true).withArgument(
abuilder.withName("testDir").withMinimum(1).withMaximum(1).create()).withDescription(
"The directory where test documents resides in").withShortName("d").create();
Option helpOpt = DefaultOptionCreator.helpOption();
Option encodingOpt = obuilder.withLongName("encoding").withArgument(
abuilder.withName("encoding").withMinimum(1).withMaximum(1).create()).withDescription(
"The file encoding. Defaults to UTF-8").withShortName("e").create();
Option defaultCatOpt = obuilder.withLongName("defaultCat").withArgument(
abuilder.withName("defaultCat").withMinimum(1).withMaximum(1).create()).withDescription(
"The default category Default Value: unknown").withShortName("default").create();
Option gramSizeOpt = obuilder.withLongName("gramSize").withRequired(false).withArgument(
abuilder.withName("gramSize").withMinimum(1).withMaximum(1).create()).withDescription(
"Size of the n-gram. Default Value: 1").withShortName("ng").create();
Option alphaOpt = obuilder.withLongName("alpha").withRequired(false).withArgument(
abuilder.withName("a").withMinimum(1).withMaximum(1).create()).withDescription(
"Smoothing parameter Default Value: 1.0").withShortName("a").create();
Option verboseOutputOpt = obuilder.withLongName("verbose").withRequired(false).withDescription(
"Output which values were correctly and incorrectly classified").withShortName("v").create();
Option typeOpt = obuilder.withLongName("classifierType").withRequired(false).withArgument(
abuilder.withName("classifierType").withMinimum(1).withMaximum(1).create()).withDescription(
"Type of classifier: bayes|cbayes. Default Value: bayes").withShortName("type").create();
Option dataSourceOpt = obuilder.withLongName("dataSource").withRequired(false).withArgument(
abuilder.withName("dataSource").withMinimum(1).withMaximum(1).create()).withDescription(
"Location of model: hdfs").withShortName("source").create();
Option methodOpt = obuilder.withLongName("method").withRequired(false).withArgument(
abuilder.withName("method").withMinimum(1).withMaximum(1).create()).withDescription(
"Method of Classification: sequential|mapreduce. Default Value: mapreduce").withShortName("method")
.create();
Option confusionMatrixOpt = obuilder.withLongName("confusionMatrix").withRequired(false).withArgument(
abuilder.withName("confusionMatrix").withMinimum(1).withMaximum(1).create()).withDescription(
"Export ConfusionMatrix as SequenceFile").withShortName("cm").create();
Group group = gbuilder.withName("Options").withOption(defaultCatOpt).withOption(dirOpt).withOption(
encodingOpt).withOption(gramSizeOpt).withOption(pathOpt).withOption(typeOpt).withOption(dataSourceOpt)