docs: public static void main(String[] args) throws Exception {
  
  		Options opt = new Options();
  
  		opt.addOption("h", false, "Print help for this application");
  		opt.addOption("iter", true, "iterative num, default 50");
  		opt.addOption("c", true, "parameters C in PA algorithm, default 0.8");
  		opt.addOption("train", false,
  				"switch to training mode(Default: test model");
  		opt.addOption("retrain", false,
  				"switch to retraining mode(Default: test model");
  		opt.addOption("margin", false, "use hamming loss as margin threshold");
  		opt.addOption("interim", false, "save interim model file");
  		opt.addOption("haslabel", false, "test file has includes label or not");
  
  		BasicParser parser = new BasicParser();
  		CommandLine cl;
  		try {
  			cl = parser.parse(opt, args);
  		} catch (Exception e) {
  			System.err.println("Parameters format error");
  			return;
  		}
  
  		if (args.length == 0 || cl.hasOption('h')) {
  			HelpFormatter f = new HelpFormatter();
  			f.printHelp(
  					"Tagger:\n"
  							+ "tagger [option] -train templet_file train_file model_file [test_file];\n"
  							+ "tagger [option] -retrain train_file model_file newmodel_file [test_file];\n"
  							+ "tagger [option] -label model_file test_file output_file\n",
  							opt);
  			return;
  		}
  		Tagger tagger = new Tagger();
  		tagger.iterNum = Integer.parseInt(cl.getOptionValue("iter", "50"));
  		tagger.c = Float.parseFloat(cl.getOptionValue("c", "0.8"));
  		tagger.useLoss = cl.hasOption("margin");
  		tagger.interim = cl.hasOption("interim");
  		tagger.hasLabel = cl.hasOption("haslabel");
  
  		String[] arg = cl.getArgs();
  		if (cl.hasOption("train") && arg.length == 3) {
  			tagger.templateFile = arg[0];
  			tagger.train = arg[1];
  			tagger.model = arg[2];
  			System.out.println("Training model ...");
  			tagger.train();
  		} else if (cl.hasOption("train") && arg.length == 4) {
  			tagger.templateFile = arg[0];
  			tagger.train = arg[1];
  			tagger.model = arg[2];
  			tagger.testfile = arg[3];
  			System.out.println("Training model ...");
  			tagger.train();
  		} else if (cl.hasOption("train") && arg.length == 5) {
  			tagger.templateFile = arg[0];
  			tagger.train = arg[1];
  			tagger.model = arg[2];
  			tagger.testfile = arg[3];
  			System.out.println("Training model ...");
  			tagger.train();
  			System.gc();
  			tagger.output = arg[4];
  			tagger.test();
  		} else if (cl.hasOption("retrain") && arg.length == 3) {
  			tagger.train = arg[0];
  			tagger.model = arg[1];
  			tagger.newmodel = arg[2];
  			System.out.println("Re-Training model ...");
  			tagger.loadFrom(tagger.model);
  			tagger.train();
  		} else if (cl.hasOption("retrain") && arg.length == 4) {
  			tagger.train = arg[0];
  			tagger.model = arg[1];
  			tagger.newmodel = arg[2];
  			tagger.testfile = arg[3];
  			System.out.println("Re-Training model ...");
  			tagger.loadFrom(tagger.model);
  			tagger.train();
  		} else if (cl.hasOption("retrain") && arg.length == 5) {
  			tagger.train = arg[0];
  			tagger.model = arg[1];
  			tagger.newmodel = arg[2];
  			tagger.testfile = arg[3];
  			System.out.println("Re-Training model ...");
  			tagger.loadFrom(tagger.model);
  			tagger.train();
  			System.gc();
  			tagger.output = arg[4];
  			tagger.test();
  		} else if (arg.length == 3) {
  			tagger.model = arg[0];
  			tagger.testfile = arg[1];
  			tagger.output = arg[2];
  			tagger.test();
  		} else if (arg.length == 2) {
  			tagger.model = arg[0];
  			tagger.testfile = arg[1];
  			tagger.test();
  		} else {
  			System.err.println("paramenters format error!");
  			System.err.println("Print option \"-h\" for help.");
  			return;
  		}
  
  		System.gc();
  
  	}