/****Argumentsforrunningconceptextractionusingcommandlineoptions**/staticclassConceptExtractionOptions{publicstaticCommandLineparseArguments(String[]args){CommandLinecommandLine=null;// Manually define short options and their long equivalent onesOptionsoptions=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");// Parse optionsCommandLineParserparser=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: