String argString = "o:c:q:i:gd:s:b:";
featdim = parseFeatDim(args, argString);
dist = parseChunkDist(args, argString, featdim);
parseCommands(args, argString);
Getopt opt = new Getopt("HMMComposer", args, argString);
opt.setOpterr(false);
int c = -1;
while ((c =opt.getopt()) != -1)
{
switch(c)
{
case 'o':
outFileName = opt.getOptarg();
break;
case 'g':
debug = true;
break;
case 'q':
cbSize = Integer.parseInt(opt.getOptarg());
break;
case 'b':
beatsPerCodeword = Integer.parseInt(opt.getOptarg());
break;
case 's':
sequenceLength = Integer.parseInt(opt.getOptarg());
break;
case 'c': // already handled above
break;
case 'd': // already handled above
break;
case 'i': // already handled above
break;
case '?':
printUsageAndExit();
break;
default:
System.out.print("getopt() returned " + c + "\n");
}
}
// parse arguments
int ind = opt.getOptind();
if(ind > args.length)
printUsageAndExit();
trainFile = new FeatFile(args[args.length-1]);
outFile = new EDLFile(outFileName);