Examples of numPositionalArgs()


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

        // setup the dependency extractor.
        DependencyExtractor e = new CoNLLDependencyExtractor(filter, null);
        DepSemTokenCounter counter = new DepSemTokenCounter(e);

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

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

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

        // Process the options and emit errors if any required options are
        // missing.
        options.parseOptions(args);
        if ((!options.hasOption("fileList") &&
             !options.hasOption("baseChildesDirectory")) ||
             options.numPositionalArgs() != 2) {
            System.out.println(
                    "usage: java ChildesParser [options] " +
                    "<outfile> <pos-file>\n" +
                    options.prettyPrint());
            return;
View Full Code Here

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

                          "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

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

        // setup the dependency extractor.
        DependencyExtractor e = new CoNLLDependencyExtractor(filter, null);
        DepPsdTokenCounter counter = new DepPsdTokenCounter(e);

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

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

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

//         opts.addOption('n', "saveNthSolutions", "Saves only every nth solution"+
//                        " when -a is used", true, "INT", "Program 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

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

        options.addOption('v', "verbose",
                          "Print verbose output about counting status",
                          false, null, "Program Options");
        options.parseOptions(args);

        if (options.numPositionalArgs() < 3) {
            System.out.println("usage: java BigramExtractor [options] " +
                               "<OutputFile> " +
                               "<SignificanceTest> " +
                               "<InputFile> [<InputFile>...]\n" +
                               " significance test options: " +
View Full Code Here

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

        try {
            BigramExtractor be = new BigramExtractor(1000000); // 1M
            String testStr = options.getPositionalArg(1).toUpperCase();
            SignificanceTest test = SignificanceTest.valueOf(testStr);
            PrintWriter output = new PrintWriter(options.getPositionalArg(0));
            int numArgs = options.numPositionalArgs();
            // Process each of the input files
            for (int i = 2; i < numArgs; ++i) {
                String inputFile = options.getPositionalArg(i);
                BufferedReader br = new BufferedReader(
                    new FileReader(inputFile));
View Full Code Here

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

        if (options.hasOption('S')) {
            SerializableUtil.save(nnf, new File(options.getStringOption('S')));
        }

        int numWords = options.numPositionalArgs();
        for (int i = 0; i < numWords; ++i) {
            String term = options.getPositionalArg(i);
            long start = System.currentTimeMillis();           
            MultiMap<Double,String> m = nnf.getMostSimilar(term, 10);
            if (m == null) {
View Full Code Here

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

        options.addOption('w', "outputFormat", "Output matrix file format",
                          true, "STRING", "Program Options");

        options.parseOptions(args);

        if (options.numPositionalArgs() == 0 || options.hasOption("help")) {
            usage(options);
            return;
        }

        // Load and sanity check the options prior to computing the SVD
View Full Code Here

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

                          true, "high|med|low", "Required");
        options.parseOptions(args);

        if ((!options.hasOption('n') && !options.hasOption('w')) ||
            !options.hasOption('t') ||
            options.numPositionalArgs() != 2)
            usage(options);

        usePos = options.hasOption('P');

        List<Map<String, Double>> wordScores = loadScores(
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.