private static void setArgs(String[] args) {
		Options opts = new Options();
		opts.addOption("t", "threadNum", true, "Thread Number");
		opts.addOption("p", "pattern", true, "use Prefix Patterns");
		opts.addOption("s", "svm", true, "use SVM results");
		opts.addOption("h", "help", false, "show help");
		org.apache.commons.cli.BasicParser parser = new org.apache.commons.cli.BasicParser();
		org.apache.commons.cli.CommandLine cl;
		HelpFormatter help = new HelpFormatter();

		try {
			cl = parser.parse(opts, args);
			if (cl.hasOption("t")) {
				try {
					threadNum = Integer.parseInt(cl.getOptionValue("t"));
				} catch (NumberFormatException e) {
					help.printHelp("extractCausal [options] [file]", opts);
					System.exit(1);
				}
				if (threadNum <= 0) {
					help.printHelp("extractCausal [options] [file]", opts);
					System.exit(1);
				}
			}
			if (cl.hasOption("h")) {
				help.printHelp("extractCausal [options] [file]", opts);
				System.exit(1);
			}
			if (cl.hasOption("s")) {
				CausalExtraction.setSvmHash(FileUtilities.readSvmResults(cl.getOptionValue("s")));
				CausalExtraction.svmFlag = true;
			}
			if (cl.hasOption("p")) {
				patternFilePath = cl.getOptionValue("p");
				patternFlag = true;
			}
			
			if (cl.getArgs().length != 1) {
				help.printHelp("extractCausal [options] [file]", opts);
				System.exit(1);
			}
			filePath = cl.getArgs()[0];
		} catch (ParseException e1) {
			help.printHelp("extractCausal [options] [file]", opts);
			System.exit(1);
		}
	}