Package edu.ucla.sspace.dependency

Examples of edu.ucla.sspace.dependency.CoNLLDependencyExtractor


        // If the evaluation type is for semEval, use a
        // SemEvalDependencyContextExtractor.
        if (argOptions.hasOption('E'))
            return new SemEvalDependencyContextExtractor(
                    new CoNLLDependencyExtractor(), generator);

        // If the evaluation type is for pseudoWord, use a
        // PseudoWordDependencyContextExtractor.
        if (argOptions.hasOption('P'))
            return new PseudoWordDependencyContextExtractor(
                    new CoNLLDependencyExtractor(),
                    generator, getPseudoWordMap());

        // Otherwise return the normal extractor.
        return new DependencyContextExtractor(
                        new CoNLLDependencyExtractor(), generator,
                        argOptions.hasOption('h'));
    }
View Full Code Here


        String format = argOptions.getStringOption(
            "dependencyParseFormat", "CoNLL");

        if (format.equals("CoNLL")) {
            DependencyExtractor e = (argOptions.hasOption('G'))
                ? new CoNLLDependencyExtractor(argOptions.getStringOption('G'),
                                               filter, stemmer)
                : new CoNLLDependencyExtractor(filter, stemmer);
            DependencyExtractorManager.addExtractor("CoNLL", e, true);
        } else if (format.equals("WaCKy")) {
            if (argOptions.hasOption('G'))
                throw new IllegalArgumentException(
                    "WaCKy does not support configuration with -G");
View Full Code Here

                "dependencyParseFormat", "CoNLL");

        // setup the dependency extractor.
        DependencyExtractor e = null;
        if (format.equals("CoNLL"))
            e = new CoNLLDependencyExtractor(filter, stemmer);
        else if (format.equals("WaCKy"))
            e = new WaCKyDependencyExtractor(filter, stemmer);

        DepTokenCounter counter = new DepTokenCounter(doLowerCasing, doPos, e);
View Full Code Here

        PrintWriter writer = null;
        try {
          writer = new PrintWriter(args[1]);
          StringBuilder builder = new StringBuilder();
          DependencyExtractor extractor = new CoNLLDependencyExtractor();
          while (ukWacIter.hasNext()) {
              BufferedReader doc = ukWacIter.next().reader();
              for (DependencyTreeNode[] tree = null;
                   (tree = extractor.readNextTree(doc)) != null; ) {
                  for (DependencyTreeNode node : tree)
                      builder.append(node.word()).append(" ");
              }
              writer.println(builder.toString());
              builder = new StringBuilder();
View Full Code Here

        TokenFilter filter = (options.hasOption("tokenFilter"))
            ? TokenFilter.loadFromSpecification(options.getStringOption('F'))
            : null;

        // 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(
View Full Code Here

        TokenFilter filter = (options.hasOption("tokenFilter"))
            ? TokenFilter.loadFromSpecification(options.getStringOption('F'))
            : null;

        // 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(
View Full Code Here

TOP

Related Classes of edu.ucla.sspace.dependency.CoNLLDependencyExtractor

Copyright © 2018 www.massapicom. 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.