/** * * Arguments for running concept extraction using command line options * */
staticclassConceptExtractionOptions{publicstaticCommandLineparseArguments(String[]args){CommandLinecommandLine=null;//Manuallydefineshortoptionsandtheirlongequivalentones
Optionsoptions=newOptions();options.addOption("r","recursive",false,"Recursively processing (only for processing a directory)");options.addOption("c","clean",false,"Clean and remove all previous processing data");options.addOption("h","help",false,"Print this usage information");options.addOption("f","inputFile",true,"Extracting concepts from a file");options.addOption("t","text",true,"Extracting concepts from a text");options.addOption("d","inputDirectory",true,"Extracting concepts from a directory");options.addOption("o","output",true,"Output file/directory");//ParseoptionsCommandLineParserparser=newBasicParser();try{commandLine=parser.parse(options,args);}catch(ParseExceptione){e.printStackTrace();}returncommandLine;}}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link: