public static void main(String[] args) { try { final CommandLine cmd = CommandLine .parser() .withName("./ecbplus-splitter") .withHeader("Splits ECB+ results by folder") .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args); File inputFile = cmd.getOptionValue("input", File.class); File outputFolder = cmd.getOptionValue("output", File.class); CommandLine.fail(e);
public static void main(final String[] args) throws IOException, XMLStreamException { try { final CommandLine cmd = CommandLine .parser() .withName("corpus-preprocessor") .withHeader( .withLogger(LoggerFactory.getLogger("eu.fbk.fssa")).parse(args); final File inputPath = cmd.getOptionValue("i", File.class); if (cmd.hasOption("o")) { outputPath = cmd.getOptionValue("o", File.class); if (cmd.hasOption("f")) { filelist = cmd.getOptionValue("f", File.class); if (cmd.hasOption("n")) { namespace = cmd.getOptionValue("n", String.class); String checkOneDoc = cmd.getOptionValue("doc", String.class); CommandLine.fail(ex);
public static void main(String[] args) { final CommandLine cmd = CommandLine .parser() .withName("morphit-converter") .withHeader("Convert Morph-It dataset to be compliant with fstan") .withLogger(LoggerFactory.getLogger("eu.fbk.dh")).parse(args); final File inputPath = cmd.getOptionValue("i", File.class); final File outputPath = cmd.getOptionValue("o", File.class);
public static void main(String[] args) { final CommandLine cmd = CommandLine .parser() .withName("morphit-converter") .withHeader("Convert Morph-It dataset to be compliant with fstan") .withLogger(LoggerFactory.getLogger("eu.fbk.dh")).parse(args); final File inputPath = cmd.getOptionValue("i", File.class); final File outputPath = cmd.getOptionValue("o", File.class); final String fstanCommand = cmd.getOptionValue("f", String.class); final String fstanModel = cmd.getOptionValue("m", String.class); boolean useFstan = !cmd.hasOption("no-fstan"); boolean useSpaces = cmd.hasOption("use-spaces");
public static void main(String[] args) { final CommandLine cmd = CommandLine .parser() .withName("naf-offset-reader") .withHeader("Read offset from a file") .withLogger(LoggerFactory.getLogger("eu.fbk.fssa")).parse(args); final Integer start = cmd.getOptionValue("s", Integer.class); final Integer end = cmd.getOptionValue("e", Integer.class); final File nafFile = cmd.getOptionValue("n", File.class);
public static void main(final String... args) { try { final CommandLine cmd = CommandLine .parser() .withName("index-subjectivity-lexicon") .withHeader("Processes the original file of the subjectivity lexicon, " // + "producing a TSV file with an indexed version of it that can " // + "be used with the eu.fbk.dkm.pikes.resources.SubjectivityLexicon Java API class.") .withOption("i", "input", "the input file name", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("o", "output", "the output file name", "FILE", CommandLine.Type.FILE, true, false, true) // .withLogger(LoggerFactory.getLogger("eu.fbk")) // .parse(args); final File inputFile = cmd.getOptionValue("i", File.class); final File outputFile = cmd.getOptionValue("o", File.class); final SubjectivityLexicon lexicon = index(inputFile.getAbsolutePath()); lexicon.writeTo(outputFile.getAbsolutePath()); } catch (final Throwable ex) { CommandLine.fail(ex); } }
.parser() .withName("cr-extractor") .withHeader("Extract CR documents from TREC dataset and save them in NAF format") .parse(args); File inputDir = cmd.getOptionValue("input", File.class); if (cmd.hasOption("url-template")) { urlTemplate = cmd.getOptionValue("url-template", String.class); File outputDir = cmd.getOptionValue("output", File.class); if (!outputDir.exists()) { outputDir.mkdirs(); CommandLine.fail(e);
public static void main(String[] args) throws IOException { final CommandLine cmd = CommandLine .parser() .withName("file-test") .withHeader("Check eu.fbk.dkm.pikes.resources.mpqa file") .withOption("i", "input-file", "the MPQA file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withLogger(LoggerFactory.getLogger("eu.fbk.fssa")).parse(args); final File inputFile = cmd.getOptionValue("i", File.class); final RecordSet annotations = RecordSet.readFromFile(inputFile); for (Record record : annotations.getRecords()) { System.out.println(record.getName()); System.out.println(record.getSpan()); for (String attr : record.getValueMap().keySet()) { System.out.println(attr + " = " + record.getValueMap().get(attr)); } System.out.println(); } }
public static void main(String[] args) { try { final CommandLine cmd = CommandLine .parser() .withName("eu.fbk.dkm.pikes.resources.darmstadt-loader") .withHeader("Load Boxer corpus and split it") final File inputFile = cmd.getOptionValue("i", File.class); final File outputFolder = cmd.getOptionValue("o", File.class); CommandLine.fail(ex);
.parser() .withName("fbis-extractor") .withHeader("Extract FBIS documents from TREC dataset and save them in NAF format") .parse(args); File inputDir = cmd.getOptionValue("input", File.class); if (cmd.hasOption("url-template")) { urlTemplate = cmd.getOptionValue("url-template", String.class); File outputDir = cmd.getOptionValue("output", File.class); if (!outputDir.exists()) { outputDir.mkdirs(); CommandLine.fail(e);
public static void main(String[] args) { final CommandLine cmd = CommandLine .parser() .withName("convert-ecb-plus") .withHeader("Convert ECB+ files to NAF") .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args); final File inputPath = cmd.getOptionValue("i", File.class); final File outputPath = cmd.getOptionValue("o", File.class);
public static void main(String[] args) { try { final CommandLine cmd = CommandLine .parser() .withName("./tintop-client") .withHeader("Run the Tintop Client") .withOption("i", "input", "Input file", "FILE", CommandLine.Type.FILE_EXISTING, true, false, true) .withOption("s", "server", "Server address", "URL:PORT", CommandLine.Type.STRING, true, false, true) .withOption("t", "timeout", String.format("Timeout (default %d ms)", DEFAULT_TIMEOUT), "milliseconds", CommandLine.Type.INTEGER, true, false, false) .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args); String serverUrl = cmd.getOptionValue("server", String.class); File inputFile = cmd.getOptionValue("input", File.class); Integer timeout = cmd.getOptionValue("timeout", Integer.class, DEFAULT_TIMEOUT); URL url = new URL(serverUrl); TintopServer server = new TintopServer(url); TintopClient client = new TintopClient(server, timeout); String whole = FileUtils.readFileToString(inputFile); System.out.println(client.call(whole)); } catch (Exception e) { CommandLine.fail(e); } }
.parser() .withName("latimes-extractor") .withHeader("Extract LATIMES documents from TREC dataset and save them in NAF format") .parse(args); File inputDir = cmd.getOptionValue("input", File.class); if (cmd.hasOption("url-template")) { urlTemplate = cmd.getOptionValue("url-template", String.class); File outputDir = cmd.getOptionValue("output", File.class); if (!outputDir.exists()) { outputDir.mkdirs(); CommandLine.fail(e);
public static void main(String[] args) { final CommandLine cmd = CommandLine .parser() .withName("ner-extractor") .withHeader("Extractor for PER/ORG/LOC") .withLogger(LoggerFactory.getLogger("eu.fbk.fssa")).parse(args); final File formPagePath = cmd.getOptionValue("f", File.class); final File pageFormPath = cmd.getOptionValue("p", File.class); final File listPath = cmd.getOptionValue("l", File.class); final File outputPath = cmd.getOptionValue("o", File.class); final String label = cmd.getOptionValue("label", String.class);
public static void main(final String... args) { try { final CommandLine cmd = CommandLine .parser() .withName("index-senticnet-lexicon") .withHeader("Processes the RDF data of eu.fbk.dkm.pikes.resources.SenticNet, " // + "producing a TSV file with an indexed version of it that can " // + "be used with the eu.fbk.dkm.pikes.resources.SenticNet Java API class.") .withOption("i", "input", "the input file name", "FILE", Type.FILE_EXISTING, true, false, true) .withOption("o", "output", "the output file name", "FILE", Type.FILE, true, false, true) // .withLogger(LoggerFactory.getLogger("eu.fbk")) // .parse(args); final File inputFile = cmd.getOptionValue("i", File.class); final File outputFile = cmd.getOptionValue("o", File.class); final SenticNet lexicon = index(inputFile.getAbsolutePath()); lexicon.writeTo(outputFile.getAbsolutePath()); } catch (final Throwable ex) { CommandLine.fail(ex); } }
.parser() .withName("ft-extractor") .withHeader("Extract FT documents from TREC dataset and save them in NAF format") .parse(args); File inputDir = cmd.getOptionValue("input", File.class); if (cmd.hasOption("url-template")) { urlTemplate = cmd.getOptionValue("url-template", String.class); File outputDir = cmd.getOptionValue("output", File.class); if (!outputDir.exists()) { outputDir.mkdirs(); CommandLine.fail(e);
public static void main(String[] args) { try { final CommandLine cmd = CommandLine .parser() .withName("query-solr") .withHeader("Send WES queries to a Solr server") .parse(args); File outputFile = cmd.getOptionValue("output", File.class); File nafQueriesFile = cmd.getOptionValue("queries", File.class); String userAgent = cmd.getOptionValue("agent", String.class); String queryPattern = cmd.getOptionValue("pattern", String.class); CommandLine.fail(e);
.parser() .withName("fr94-extractor") .withHeader("Extract FR94 documents from TREC dataset and save them in NAF format") .parse(args); File inputDir = cmd.getOptionValue("input", File.class); if (cmd.hasOption("url-template")) { urlTemplate = cmd.getOptionValue("url-template", String.class); File outputDir = cmd.getOptionValue("output", File.class); if (!outputDir.exists()) { outputDir.mkdirs(); CommandLine.fail(e);
public static void main(String[] args) { try { final CommandLine cmd = CommandLine .parser() .withName("query-solr") .withHeader("Send WES queries to a Solr server") .parse(args); File outputFile = cmd.getOptionValue("output", File.class); File nafQueriesFile = cmd.getOptionValue("queries", File.class); String userAgent = cmd.getOptionValue("agent", String.class); String googleKey = cmd.getOptionValue("google-key", String.class); String googleCx = cmd.getOptionValue("google-cx", String.class); CommandLine.fail(e);
public static void main(String[] args) { try { final CommandLine cmd = CommandLine .parser() .withName("./convert-icab") .withHeader("Convert I-CAB dataset for Stanford training") .withLogger(LoggerFactory.getLogger("eu.fbk")).parse(args); File input = cmd.getOptionValue("input", File.class); File output = cmd.getOptionValue("output-stanford", File.class); File textOut = cmd.getOptionValue("output-text", File.class); File textTok = cmd.getOptionValue("output-text-br", File.class); boolean keepGpe = cmd.hasOption("keep-gpe"); writer.close(); } catch (Exception e) { CommandLine.fail(e);