The main method.

@param args the arguments
10509
public static void main(String [] args){
		displayCopyright();        
        if (!checkArgs(args)) {
            displayHelp();
            return;
        }
        
      //get model dir
        String modelDir = args[1];
        CRFSegmenter segmenter = new CRFSegmenter(modelDir);
        
      //tagging
        try {
        	System.out.println(args[2]);
	        if (args[2].equalsIgnoreCase("-inputfile")){
	        	System.out.println(args[3]);
	        	File inputFile = new File(args[3]);
	        	BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(
	        			new FileOutputStream(inputFile.getPath() + ".wseg"), "UTF-8"));
	        	
	        	String result = segmenter.segmenting(inputFile);
	        	
	        	writer.write(result);
	        	writer.close();
	        }
	        else{ //input dir
	        	String inputDir = args[3];
	        	 if (inputDir.endsWith(File.separator)) {
		                inputDir = inputDir.substring(0, inputDir.length() - 1);
		            }
		            
		            File dir = new File(inputDir);
		            String[] children = dir.list(new FilenameFilter() {
		                public boolean accept(File dir, String name) {
		                    return name.endsWith(".tkn");
		                }
		            });    
		            
		            for (int i = 0; i < children.length; i++) {
		            	System.out.println("Segmenting " + children[i]);
		            	String filename = inputDir + File.separator + children[i];
			                if ((new File(filename)).isDirectory()) {
			                    continue;
			            }
			                
			            BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(
				        			new FileOutputStream(filename + ".wseg"), "UTF-8"));
			             
			            writer.write(segmenter.segmenting(new File(filename)));
			             
			            writer.close();
		            }
	        }
        }
        catch (Exception e){
        	System.out.println("Error while segmenting");
        	System.out.println(e.getMessage());
        	e.printStackTrace();
        }
	}
1127533
public static void main(String [] args ){
        if (args.length != 3){            
            printUsage();
            System.exit(1);
        }
        
        boolean label = (args[0].toLowerCase().trim().equals("-lbl"));
        
        try{
            String inputWhat = args[1].toLowerCase().trim();
        
            if (inputWhat.equals("-inputfile"))
            {
                BufferedReader in = new BufferedReader(new InputStreamReader(
                        new FileInputStream(args[2]), "UTF-8"));
                
                BufferedWriter out = new BufferedWriter(new OutputStreamWriter(
                        new FileOutputStream(args[2] + ".tagged"), "UTF-8"));

                String text = "", line = "";                
                while ((line = in.readLine()) != null){
                    text += "\n" + line;
                }
                text = text.trim();

                //text normalization 
                text = text.replaceAll("([\t\n\r ])+", "$1");                
                text = text.replaceAll("[\\[\\]]", "");                
                text = text.replaceAll("<[^<>]*>", "");
                    
                List MarkList = new ArrayList();
                
                ArrayList recordList =  (ArrayList) doFeatureGen(
                        new HashMap(), text , MarkList, label) ;

                for (int i = 0; i < recordList.size(); ++i){
                
                    out.write(recordList.get(i).toString());
                    
                    out.write("\n");
                
                }

                in.close();
                out.close();
            }

            else if (inputWhat.equals("-inputdir")){
                
                BufferedWriter out = new BufferedWriter(new OutputStreamWriter(
                        new FileOutputStream(args[2] + ".tagged"), "UTF-8"));

                File inputDir = new File(args[2]);
                File [] childrent = inputDir.listFiles();
                
                for (int i = 0; i <childrent.length; ++i)
                {
                    //go through all the file in the input file and do feagen
                    BufferedReader in = new BufferedReader(new InputStreamReader(
                            new FileInputStream(childrent[i]), "UTF-8"));

                    String text = "", line = "";                    
                    while ((line = in.readLine()) != null){
                        text += "\n" + line;
                    }                    
                    text = text.trim();
                    
                    //text normalization 
                    text = text.replaceAll("([\t\n\r ])+", "$1");                 
                    text = text.replaceAll("[\\[\\]{}]", "");                    
                    text = text.replaceAll("<[^<>]*>", "");

                    List MarkList = new ArrayList();
                    ArrayList recordList = (ArrayList) doFeatureGen(
                            new HashMap(), text , MarkList, label) ;

                    
                    for (int j = 0; j < recordList.size(); ++j){                    
                        out.write(recordList.get(j).toString());                    
                        out.write("\n");
                    }

                    in.close();                 
                }
                out.close();
            }
         
            else printUsage();
        }
        catch (Exception e)
        {
            System.out.println("In feature generator main : " + e.getMessage());
            return;
        }
        
    }
167022
protected static void main(String args[]) {
	int from = Integer.parseInt(args[0]);	
	int to = Integer.parseInt(args[1]);
	
	statistics(from,to);
}
1309754
public static void main(String[] args) {
    try {
      ToolRunner.run(new JobFilePartitioner(), args);
    } catch (Exception e) {
      LOG.error("Problem running: " + NAME, e);
    }
  }
65375
public static void main(final String[] args) {
        try {
            new Main().run(args);
        } catch (final JBakeException e) {
            System.err.println(e.getMessage());
            e.printStackTrace();
            System.exit(1);
        } catch (final Throwable e) {
            System.err.println("An unexpected error occurred: " + e.getMessage());
            e.printStackTrace();
            System.exit(2);
        }
    }
85411
public static void main(String [] args) {
		String result = run(args);
		if (result.length() != 0) {
			System.err.println(result);
			System.exit(1);
		}
	}
766586
public static void main(final String[] args) {
        Switch about = new Switch("a", "about", "display about message");
        Switch help = new Switch("h", "help", "display help message");
        FileListArgument inputFastqFiles = new FileListArgument("i", "input-fastq-files", "list of FASTQ input files", true);
        FileArgument outputFastqFile = new FileArgument("o", "output-fastq-file", "FASTQ output file, default stdout", false);

        ArgumentList arguments = new ArgumentList(about, help, inputFastqFiles, outputFastqFile);
        CommandLine commandLine = new CommandLine(args);

        MergeFastq mergeFastq = null;
        try {
            CommandLineParser.parse(commandLine, arguments);
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(USAGE, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            mergeFastq = new MergeFastq(inputFastqFiles.getValue(), outputFastqFile.getValue());
        }
        catch (CommandLineParseException e) {
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(USAGE, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            Usage.usage(USAGE, e, commandLine, arguments, System.err);
            System.exit(-1);
        }
        try {
            System.exit(mergeFastq.call());
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
75633
public static void main (String[] args) {
    try {
      h2omapper m = new h2omapper();
      m.run(null);
    }
    catch (Exception e) {
      e.printStackTrace();
    }
  }
243019
public static void main(String[] args) throws Exception {
      Shell shell = new ShellImpl();
      shell.init(args);
      shell.run();
      System.exit(0);
   }
694950
public static void main(String[] args) {
        try {
            if (args.length == 1 && args[0].endsWith(".properties")) {
                Properties properties = loadProperties(args[0]);
                new StanBench(properties).run();
            } else {
                new StanBench(args).run();
            }
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
        System.exit(0);
    }
952128
public static void main(String[] args)
	{
		try
	    {
	        if (args.length == 0)
	            printUsage();
	        else
	        {
	            Settings settings = parseCommandLine(args);
	            if (settings != null)
	            	new FFMQJMXConsole(settings,
	            			           System.in,
	            			           System.out,
	            			           System.err).run();
	        }
	        
	        System.exit(0);
	    }
	    catch (IllegalArgumentException e)
	    {
	        System.err.println(e.getMessage());
	        System.exit(-1);
	    }
	    catch (Throwable e)
	    {
	        e.printStackTrace();
	        System.exit(-2);
	    }
	}
767226
public static void main(String[] args) {

        DDLGenerationUtility util = new DDLGenerationUtility();

        // No task handlers since this is a single function script.
        // At least it is right now.
        int rc = util.runProgram(args);

        System.exit(rc);
    }
897684
public static void main(String[] args) {
        // Use the standard swing code to start this demo inside a swing thread.
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                // Create an instance of the demo.
                DurationDemo demo = new DurationDemo();
                // Make the demo visible on the screen.
                demo.setVisible(true);
            }
        });
    }
1125427
public static void main(final String args[]) {
        int exitCode = 1;
        final Setup setup = new Setup();
        try {
            setup.execute(args);
            exitCode = 0;
        } catch (Throwable exc) {
            System.err.println("ERROR: " + exc.getMessage());
        }
        System.exit(exitCode);
    }
108893
public static void main(String[] args) {
        DEBUG_MODE_V = DebugMode.SCREEN;
        Log.initScreen();
        printVerbose(null, null);
    }
418118
public static void main(String[] args) {
//		JK.print("Code", codeToJavaMapping);
		Set set = new HashSet<>(getTypeMappingsAsJKTypes());
		Object[] array = set.toArray();
		for (Object object : array) {
			JK.print(object);
		}
	}
421200
public static void main(String[] args) {
        Settings settings = new Settings();
        new JCommander(settings, args);

        if (!settings.isGuiSupressed()) {
            OkapiUI okapiUi = new OkapiUI();
            okapiUi.setVisible(true);
        } else {
            int returnValue;
            
            returnValue = commandLine(settings);
            
            if (returnValue != 0) {
                System.out.println("An error occurred");
            }
        }
    }