new DefaultOptionBuilder() .hasArg() .withLongOpt("conf") .withDescription("configuration file") .create("c"), new DefaultOptionBuilder() .hasArg() .withLongOpt("threads") .withDescription("the maximum number of threads that should be used") .create("h"), new DefaultOptionBuilder() .hasArg() .withLongOpt("languages") .withDescription("the set of languages to process, separated by commas or 'LOADED'") .create("l"), new DefaultOptionBuilder() .hasArg() .withLongOpt("base-dir") .withDescription("the base directory used to resolve relative directories") .create(), new DefaultOptionBuilder() .hasArg() .withLongOpt("tmp-dir") .withDescription("the temporary directory") .create() }; for (Option o : toAdd) {
/** * Create an Option using the current settings * * @return the Option instance * * @throws IllegalArgumentException if <code>longOpt</code> has not been set. */ public Option create() throws IllegalArgumentException { if (longopt == null) { throw new IllegalArgumentException("must specify longopt"); } return create(null); }
/** * Create an Option using the current settings and with * the specified Option <code>char</code>. * * @param opt the character representation of the Option * * @return the Option instance * * @throws IllegalArgumentException if <code>opt</code> is not * a valid character. See Option. */ public Option create(char opt) throws IllegalArgumentException { return create(String.valueOf(opt)); }
public static void main(String args[]) throws ConfigurationException, IOException, java.text.ParseException { Options options = new Options(); options.addOption( new DefaultOptionBuilder() .hasArgs() .withLongOpt("directories") .withDescription("list of directories to compare") .create("d")); options.addOption( new DefaultOptionBuilder() .withLongOpt("gold") .hasArg() .withValueSeparator(',') .withDescription("gold standard name (for use with -n)") .create("g")); options.addOption( new DefaultOptionBuilder() .withLongOpt("number") .hasArg() .withValueSeparator(',') .withDescription("list of run numbers to compare") .create("b")); EnvBuilder.addStandardOptions(options);
/** * Create an Option using the current settings * * @return the Option instance * * @throws IllegalArgumentException if <code>longOpt</code> has not been set. */ public Option create() throws IllegalArgumentException { if (longopt == null) { throw new IllegalArgumentException("must specify longopt"); } return create(null); }
public static void main(String args[]) throws IOException, ConfigurationException { Options options = new Options(); options.addOption( new DefaultOptionBuilder() .hasArg() .isRequired() .withLongOpt("input") .withDescription("corpus input directory") .create("i")); options.addOption( new DefaultOptionBuilder() .hasArg() .isRequired() .withLongOpt("output") .withDescription("corpus output directory (existing data will be lost)") .create("o")); options.addOption( new DefaultOptionBuilder() .hasArg() .withLongOpt("minCount") .withDescription("minimum frequency for unigrams that should be collapsed") .create("m")); options.addOption( new DefaultOptionBuilder() .hasArg() .withLongOpt("maxngram") .withDescription("maximum number of words that should be concatenated together") .create("g")); EnvBuilder.addStandardOptions(options);
/** * Create an Option using the current settings and with * the specified Option <code>char</code>. * * @param opt the character representation of the Option * * @return the Option instance * * @throws IllegalArgumentException if <code>opt</code> is not * a valid character. See Option. */ public Option create(char opt) throws IllegalArgumentException { return create(String.valueOf(opt)); }
public static void main(String args[]) throws Exception { Options options = new Options(); options.addOption( new DefaultOptionBuilder() .withLongOpt("port") .hasArg() .withDescription("Server port number") .create("p")); options.addOption( new DefaultOptionBuilder() .hasArg() .withLongOpt("listeners") .withDescription("Size of listener queue") .create("q")); new DefaultOptionBuilder() .withLongOpt("metric") .hasArg() .withDescription("Semantic relatedness metric") .create("m")); new DefaultOptionBuilder() .withLongOpt("vmetric") .hasArg() .withDescription("Vector-based semantic relatedness metric") .create("v"));
public static void main(String args[]) throws ConfigurationException, IOException, DaoException { Options options = new Options(); options.addOption( new DefaultOptionBuilder() .hasArg() .isRequired() .withLongOpt("output") .withDescription("model output file") .create("o")); options.addOption( new DefaultOptionBuilder() .hasArg() .isRequired() .withLongOpt("input") .withDescription("corpus input directory (as generated by WikiTextCorpusCreator)") .create("i")); options.addOption( new DefaultOptionBuilder() .hasArg() .withLongOpt("layer1size") .withDescription("size of the layer 1 neural network") .create("z")); options.addOption( new DefaultOptionBuilder() .hasArg() .withLongOpt("window") .withDescription("size of the sliding window") .create("w")); options.addOption( new DefaultOptionBuilder()
public static void main(String args[]) throws ConfigurationException, IOException { Options options = new Options(); options.addOption( new DefaultOptionBuilder() .withLongOpt("bundles") .withDescription("bundle file with tab separated phrases") .hasArg() .create("b")); options.addOption( new DefaultOptionBuilder() .withLongOpt("topk") .withDescription("number neighbors per phrase") .hasArg() .create("k")); EnvBuilder.addStandardOptions(options);
new DefaultOptionBuilder() .withDescription("Layer group") .isRequired() .hasArg() .create("y")); new DefaultOptionBuilder() .withDescription("Dataset name") .isRequired() .hasArg() .create("n"));
public static void main(String[] args) throws ConfigurationException, WikiBrainException, IOException, InterruptedException { Options options = new Options(); options.addOption( new DefaultOptionBuilder() .hasArg() .withLongOpt("output") .withDescription("Path to output file.") .create("o")); options.addOption( new DefaultOptionBuilder() .hasArg() .withLongOpt("input") .withDescription("Path to input tsv file.") .create("i"));
new DefaultOptionBuilder() .withDescription("Layer group") .isRequired() .hasArg() .create("y")); new DefaultOptionBuilder() .withDescription("Dataset name") .isRequired() .hasArg() .create("n"));
public static void main(String args[]) throws ConfigurationException, IOException, DaoException { Options options = new Options(); options.addOption( new DefaultOptionBuilder() .hasArg() .isRequired() .withLongOpt("input") .withDescription("input output file (existing data will be lost)") .create("i")); options.addOption( new DefaultOptionBuilder() .hasArg() .isRequired() .withLongOpt("output") .withDescription("corpus output directory (existing data will be lost)") .create("o")); options.addOption( new DefaultOptionBuilder() .hasArg() .withLongOpt("max-articles") .withDescription("Maximum number of articles to process") .create("x"));
public static void main(String args[]) throws ConfigurationException, DaoException, IOException, WikiBrainException, InterruptedException { Options options = new Options(); options.addOption( new DefaultOptionBuilder() .hasArg() .isRequired() .withLongOpt("output") .withDescription("corpus output directory (existing data will be lost)") .create("o"));
public static void main(String args[]) throws ConfigurationException, DaoException, IOException, WikiBrainException, InterruptedException { Options options = new Options(); options.addOption( new DefaultOptionBuilder() .hasArg() .isRequired() .withLongOpt("output") .withDescription("corpus output directory (existing data will be lost)") .create("o"));
new DefaultOptionBuilder() .hasArg() .withLongOpt("max-results") .withDescription("maximum number of results") .create("r")); new DefaultOptionBuilder() .hasArgs() .withLongOpt("gold") .withDescription("the set of gold standard datasets to train on") .create("g")); new DefaultOptionBuilder() .hasArg() .withLongOpt("delete") .withDescription("delete all existing SR data for the metric and its submetrics (true or false, default is true)") .create("d")); new DefaultOptionBuilder() .hasArg() .withLongOpt("metric") .withDescription("set a local metric") .create("m")); new DefaultOptionBuilder() .hasArg() .withLongOpt("rowids") .withDescription("page ids for rows of cosimilarity matrices (implies -s)") .create("p"));
public static void main(String args[]) throws ConfigurationException, IOException, DaoException { Options options = new Options(); options.addOption( new DefaultOptionBuilder() .hasArg() .isRequired() .withLongOpt("output") .withDescription("corpus output directory (existing data will be lost)") .create("o")); options.addOption( new DefaultOptionBuilder() .hasArg() .withLongOpt("max-articles") .withDescription("Maximum number of articles to process") .create("x"));
new DefaultOptionBuilder() .hasArg() .withLongOpt("output-dir") .withDescription("directory to output concept mapping to") .create("d")); new DefaultOptionBuilder() .hasArg() .withLongOpt("max-concepts") .withDescription("maximum number of concepts") .create("x"));
public static void main(String args[]) throws ConfigurationException, WikiBrainException, IOException, DaoException { Options options = new Options(); options.addOption( new DefaultOptionBuilder() .withLongOpt("drop-indexes") .withDescription("drop and recreate all indexes") .create("d")); options.addOption( new DefaultOptionBuilder() .hasArgs() .withValueSeparator(',') .withLongOpt("namespaces") .withDescription("the set of namespaces to index, separated by commas") .create("p")); options.addOption( new DefaultOptionBuilder() .hasArgs() .withValueSeparator(',') .withLongOpt("indexes") .withDescription("the types of indexes to store, separated by commas") .create("i")); EnvBuilder.addStandardOptions(options);