public static void main(String[] args) { final CommandLine cmd = CommandLine .parser() .withName("morphit-converter") .withHeader("Convert Morph-It dataset to be compliant with fstan") .withOption("i", "input", "input file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("o", "output", "output file", "FILE", CommandLine.Type.FILE, true, false, true) .withOption("f", "fstan-command", "fstan TextPro command", "COMMAND", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("m", "fstan-model", "fstan TextPro model", "MODEL FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption(null, "no-fstan", "Do not use fstan for initial population") .withOption(null, "use-spaces", "Use spaces (instead of tabs) as separator") .withLogger(LoggerFactory.getLogger("eu.fbk.dh")).parse(args);
.withName("./ecb-evaluator") .withHeader("Evaluator event extractor") .withOption("n", "input-naf", "Input NAF folder", "FOLDER", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("i", "input-csv", "Input CSV file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("g", "output-gold", "Output gold file", "FILE", CommandLine.Type.FILE, true, false, true) .withOption("b", "output-baseline", "Output baseline file", "FILE", CommandLine.Type.FILE, true, false, true) .withOption("o", "output", "Output file", "FILE", CommandLine.Type.FILE, true, false, true) .withOption("l", "input-lemmas", "Lemmas CSV file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, false) .withOption("a", "input-all-lemmas", "Lemmas CSV file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, false) .withOption("c", "check-gold", "Use only events annotated in gold standard") .withOption("s", "add-single", "Add single clusters") .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args);
.withName("./ecb-evaluator") .withHeader("Evaluator event extractor") .withOption("n", "input-naf", "Input NAF folder", "FOLDER", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("i", "input-csv", "Input CSV file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("g", "output-gold", "Output gold file", "FILE", CommandLine.Type.FILE, true, false, true) .withOption("b", "output-baseline", "Output baseline file", "FILE", CommandLine.Type.FILE, true, false, true) .withOption("o", "output", "Output file", "FILE", CommandLine.Type.FILE, true, false, true) .withOption("l", "input-lemmas", "Lemmas CSV file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, false) .withOption("a", "input-all-lemmas", "Lemmas CSV file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, false) .withOption("c", "check-gold", "Use only events annotated in gold standard") .withOption("s", "add-single", "Add single clusters") .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args);
cmd = CommandLine .parser() .withName("eu.fbk.dkm.pikes.resources.mpqa-annotator") .withHeader("Annotated files with MPQA annotations") .withOption("i", "input-path", "the J-M dataset input dir", "DIR", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("o", "output-path", "the NAF dir", "DIR", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args);
.withName("./ecb-evaluator") .withHeader("Evaluator event extractor") .withOption("n", "input-naf", "Input NAF folder", "FOLDER", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("i", "input-csv", "Input CSV file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("g", "output-gold", "Output gold file", "FILE", CommandLine.Type.FILE, true, false, true) .withOption("b", "output-baseline", "Output baseline file", "FILE", CommandLine.Type.FILE, true, false, true) .withOption("o", "output", "Output file", "FILE", CommandLine.Type.FILE, true, false, true) .withOption("l", "input-lemmas", "Lemmas CSV file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, false) .withOption("c", "check-gold", "Use only events annotated in gold standard") .withOption("s", "add-single", "Add single clusters") .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args);
final CommandLine cmd = CommandLine .parser() .withName("./create-pos-training") .withHeader("Create training for Stanford POS tagger") .withOption("i", "input", "Input file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("o", "output", "Output file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("t", "only-tokens", "Output file for tokens", "FILE", CommandLine.Type.FILE_EXISTING, true, false, false) .withOption("p", "only-pos", "Output file for pos", "FILE", CommandLine.Type.FILE_EXISTING, true, false, false) .withOption("x", "text", "Output text", "FILE", CommandLine.Type.FILE_EXISTING, true, false, false) .withOption("c", "conll", "Output in CoNLL format", "FILE", CommandLine.Type.FILE_EXISTING, true, false, false) .withOption(null, "column", String.format("Column for POS (default %d)", DEFAULT_COL), "NUM", CommandLine.Type.INTEGER, true, false, false) .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args);
final CommandLine cmd = CommandLine .parser() .withName("eu.fbk.dkm.pikes.resources.darmstadt-loader") .withHeader("Load eu.fbk.dkm.pikes.resources.darmstadt-service-review-corpus") .withOption("i", "input-folder", "the folder of the corpus", "DIR", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("f", "force", "Force opinion") .withLogger(LoggerFactory.getLogger("eu.fbk.fssa")).parse(args);
cmd = CommandLine .parser() .withName("eu.fbk.dkm.pikes.resources.mpqa-annotator") .withHeader("Annotated files with MPQA annotations") .withOption("i", "input-path", "the base path of the MPQA corpus", "DIR", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("o", "output", String.format("the output path where to load and save produced files, default [basedir]/%s", DEFAULT_NAF_PARSED_DIR), "DIR", CommandLine.Type.DIRECTORY_EXISTING, true, false, false) .withOption("a", "annotation", String.format("the annotation file, default [basedir]/%s", CorpusPreprocessor.DEFAULT_ANNOTATION_TSV), "FILE", CommandLine.Type.FILE_EXISTING, true, false, false) .withOption("e", "extensions", String.format("Input extensions (default %s)", DEFAULT_NAF_EXTENSIONS), "EXTS", CommandLine.Type.STRING, true, true, false) .withOption("t", "test", "test only on this file", "FILE", CommandLine.Type.STRING, true, false, false) .withOption("f", "force", "Force opinion") .withOption("F", "fake", "Fake mode, do not write to files") .withOption("s", "exclude-source-local-null", "Exclude opinion if source is null") .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args); } catch (Throwable ex) { CommandLine.fail(ex);
.withName("./create-parse-training") .withHeader("Create training for Stanford Parser") .withOption("i", "input", "Input file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("o", "output", "Output file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption(null, "column", String.format("Column for POS (default %d)", DEFAULT_POS_COL), "NUM", CommandLine.Type.INTEGER, true, false, false) .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args);
final CommandLine cmd = CommandLine .parser() .withName("yamcha-extractor") .withHeader("Check ESWC dataset with Darmstadt") .withOption("i", "input-folder", "the folder of the NAF corpus", "DIR", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("o", "output-file", "output file", "FILE", CommandLine.Type.FILE, true, false, true) .withOption("l", "label", "opinion label", "STRING", CommandLine.Type.STRING, true, false, true) .withOption("n", "numeric", "use numeric values for IDs") .withOption(null, "list", "use list of file to sort", "FILE", CommandLine.Type.FILE_EXISTING, true, false, false) .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args);
final CommandLine cmd = CommandLine .parser() .withName("eu.fbk.dkm.pikes.resources.goodbadfor-annotator") .withHeader("Annotated files with goodFor/badFor annotations") .withOption("i", "input-path", "the base path of the corpus", "DIR", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("t", "test", "test only on this file", "FILE", CommandLine.Type.STRING, true, false, false) .withOption("f", "force", "Force opinion") .withOption("s", "skip", "Skip writing files and show them") .withLogger(LoggerFactory.getLogger("eu.fbk.fssa")).parse(args);
final CommandLine cmd = CommandLine .parser() .withName("eu.fbk.dkm.pikes.resources.goodbadfor-loader") .withHeader("Load goodFor/badFor library") .withOption("i", "input-path", "the base path of the corpus", "DIR", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("n", "namespace", String.format("the namespace for generating document URIs, default %s", DEFAULT_NAMESPACE), "NS", CommandLine.Type.STRING, true, false, false) .withOption("t", "test", "test only on this file", "FILE", CommandLine.Type.STRING, true, false, false) .withLogger(LoggerFactory.getLogger("eu.fbk.fssa")).parse(args);
.withName("./ecb-evaluator") .withHeader("Evaluator event extractor") .withOption("n", "input-naf", "Input NAF folder", "FOLDER", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("i", "input-csv", "Input CSV file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("l", "input-lemmas", "Lemmas CSV file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, false) .withOption("r", "remove-alone", "Remove alone clusters") .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args);
final CommandLine cmd = CommandLine .parser() .withName("./ecbplus-merger") .withHeader("Add mentions to NAF folder for ECB resource") .withOption("i", "input-xml", "Input XML folder", "FOLDER", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("n", "input-naf", "Input NAF folder", "FOLDER", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("o", "output", "Output folder", "FOLDER", CommandLine.Type.DIRECTORY, true, false, true) .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args);
final CommandLine cmd = CommandLine .parser() .withName("./evaluate-tanl") .withHeader("Calculate NER evaluation for Tanl") .withOption("t", "tanl", "Input file from Tanl", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("g", "gold-standard", "Input gold standard file", "FILE", CommandLine.Type.FILE, true, false, true) .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args);
final CommandLine cmd = CommandLine .parser() .withName("eu.fbk.dkm.pikes.resources.darmstadt-loader") .withHeader("Load Boxer corpus and split it") .withOption("i", "input-folder", "input folder", "DIR", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("a", "annotation", "annotation file", "DIR", CommandLine.Type.FILE_EXISTING, true, false, true) .withLogger(LoggerFactory.getLogger("eu.fbk.fssa")).parse(args);
final CommandLine cmd = CommandLine .parser() .withName("./taol-extractor") .withHeader("Convert file from Treccani XML to NAF") .withOption("i", "input", "Input folder", "FOLDER", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("o", "output", "Output folder", "FOLDER", CommandLine.Type.DIRECTORY, true, false, true) .withOption("p", "prefix", String.format("Prefix (default %s)", DEFAULT_PREFIX), "PREFIX", CommandLine.Type.STRING, true, false, false) .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args);
final CommandLine cmd = CommandLine .parser() .withName("corpus-preprocessor") .withHeader( "Produces NAF files starting from the MPQA v.2 corpus preprocessed by Johansson/Moschitti.") .withOption("i", "input-path", "the base path of the Johansson MPQA corpus", "DIR", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("o", "output", "the output path where to save produced files", "DIR", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("n", "namespace", String.format("the namespace for generating document URIs, default %s", DEFAULT_NAMESPACE), "NS", CommandLine.Type.STRING, true, false, false) .withOption("doc", "doc", "Check only one document", "URL", CommandLine.Type.STRING, true, false, false) .withLogger(LoggerFactory.getLogger("eu.fbk.fssa")).parse(args);
public static void main(String[] args) { try { final CommandLine cmd = CommandLine.parser().withName("experiment-list") .withOption("i", "vectors", "Input file with vectors", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("e", "experiments", "Input file with experiments", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("o", "output", "Output file", "FILE", CommandLine.Type.FILE, true, false, true) .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args);
cmd = CommandLine .parser() .withName("corpus-postprocessor") .withHeader( "Add opinion layers to the parsed NAFs") .withOption("i", "input-path", "the base EN path of the corpus", "DIR", CommandLine.Type.DIRECTORY_EXISTING, true, false, true) .withOption("f", "force", "Force opinion") .withLogger(LoggerFactory.getLogger("eu.fbk.fssa")).parse(args);