Package edu.ucla.sspace.common

Examples of edu.ucla.sspace.common.ArgOptions.numPositionalArgs()


                       "of the significant motifs",
                       true, "DIR", "Output Options");

        opts.parseOptions(args);

        if (opts.numPositionalArgs() < 2 || opts.hasOption("help")) {
            usage(opts);
            return;
        }

        // If verbose output is enabled, update all the loggers in the S-Space
View Full Code Here


        options.addOption('o', "ouputFormat",
                          "the matrix format of the output matrix",
                          true, "STRING", "Required");
        options.parseOptions(args);

        if (options.numPositionalArgs() != 2 ||
            !options.hasOption('i') || !options.hasOption('o')) {
            System.out.println(
               "usage: java MatrixConverter [options] <int.mat> <out.mat>\n" +
               options.prettyPrint());
            System.exit(1);
View Full Code Here

                          true, "STR",
                          "Advanced Dependency Parsing");

        // Parse and validate the options.
        options.parseOptions(args);
        if (options.numPositionalArgs() < 2) {
            System.out.println(
                "usage: java DepTokenCounter"
                + " [options] <output-file> <input-file> [<input-file>]*\n"
                + options.prettyPrint()
                + "\n\n" + OptionDescriptions.TOKEN_FILTER_DESCRIPTION);
View Full Code Here

            e = new WaCKyDependencyExtractor(filter, stemmer);

        DepTokenCounter counter = new DepTokenCounter(doLowerCasing, doPos, e);

        // Process each of the input files
        for (int i = 1; i < options.numPositionalArgs(); ++i)
            counter.process(new DependencyFileDocumentIterator(
                        options.getPositionalArg(i), discardHeader));

        // Then write the results to disk
        PrintWriter pw = new PrintWriter(options.getPositionalArg(0));
View Full Code Here

                          false, null, "Optional");


        options.parseOptions(args);

        if (options.numPositionalArgs() != 2) {
            System.out.println("usage java [OPTIONS] <wikifile> <output-file>\n"
                               + options.prettyPrint());
            return;
        }
View Full Code Here

                          true, "INT", "Tokenizing Options");
        options.addOption('v', "verbose",
                          "Print verbose output about counting status",
                          false, null, "Optional");
        options.parseOptions(args);
        if (options.numPositionalArgs() < 2) {
            System.out.println(
                "usage: java TokenCounter"
                + " [options] <output-file> <input-file> [<input-file>]*\n"
                + options.prettyPrint()
                + "\n" + OptionDescriptions.COMPOUND_WORDS_DESCRIPTION
View Full Code Here

        IteratorFactory.setProperties(props);

        try {
            TokenCounter counter = new TokenCounter(doLowerCasing);
            // Process each of the input files
            for (int i = 1; i < options.numPositionalArgs(); ++i)
                counter.processFile(options.getPositionalArg(i));
            // Then write the results to disk
            PrintWriter pw = new PrintWriter(options.getPositionalArg(0));
            for (Map.Entry<String,Integer> e
                     : counter.tokenToCount.entrySet())
View Full Code Here

        // Set the verbosity
        if (options.hasOption('v'))
            LoggerUtil.setLevel(Level.FINE);
        if (options.hasOption('V'))
            LoggerUtil.setLevel(Level.FINER);
        if (options.numPositionalArgs() < 3 || options.hasOption("help")) {
            usage(options);
            return;
        }

        File termsFile = new File(options.getPositionalArg(0));
View Full Code Here

        Map<SignificanceTest,Double> tests =
            new HashMap<SignificanceTest,Double>();
        Map<SignificanceTest,PrintWriter> testWriters =
            new HashMap<SignificanceTest,PrintWriter>();

        int numArgs = options.numPositionalArgs();
        for (int i = 2; i < numArgs; ++i) {
            String testName = options.getPositionalArg(i);
            SignificanceTest test = getTest(testName);
            Double minWeight = null;
            if (i+1 < numArgs) {
View Full Code Here

                          "Print verbose output about counting status",
                          false, null, "Optional");

        // Parse and validate the options.
        options.parseOptions(args);
        if (options.numPositionalArgs() < 2) {
            System.out.println(
                "usage: java DepTokenCounter"
                + " [options] <output-file> <input-file> [<input-file>]*\n"
                + options.prettyPrint()
                + "\n\n" + OptionDescriptions.TOKEN_FILTER_DESCRIPTION);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.