Examples of grammaticalStructureFactory()


Examples of edu.stanford.nlp.trees.PennTreebankLanguagePack.grammaticalStructureFactory()

        return outData;
    }

    private void parseRelations(Tree parsedTree, ParsedData outData) {
        TreebankLanguagePack tlp = new PennTreebankLanguagePack();
        GrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();
        GrammaticalStructure gs = gsf.newGrammaticalStructure(parsedTree);
        List<TypedDependency> tdl = gs.typedDependenciesCCprocessed();
        String reln;
        int governerIndex;
        int dependentIndex;
View Full Code Here

Examples of edu.stanford.nlp.trees.PennTreebankLanguagePack.grammaticalStructureFactory()

      } else {
        // System.err.println(leaf + " is not a CoreLabel.");
      }
    }
    TreebankLanguagePack tlp = new PennTreebankLanguagePack();
    GrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();

    GrammaticalStructure gs = gsf.newGrammaticalStructure(tree);
    Collection<TypedDependency> deps = gs.typedDependenciesCCprocessed(true);
    // System.out.println(deps);
View Full Code Here

Examples of edu.stanford.nlp.trees.TreebankLanguagePack.grammaticalStructureFactory()

        return outData;
    }

    private void parseRelations(Tree parsedTree, ParsedData outData) {
        TreebankLanguagePack tlp = new PennTreebankLanguagePack();
        GrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();
        GrammaticalStructure gs = gsf.newGrammaticalStructure(parsedTree);
        List<TypedDependency> tdl = gs.typedDependenciesCCprocessed();
        String reln;
        int governerIndex;
        int dependentIndex;
View Full Code Here

Examples of edu.stanford.nlp.trees.TreebankLanguagePack.grammaticalStructureFactory()

    this.maxSentenceLength = maxSent;
    this.treeMap = treeMap;
    this.maxParseTime = 0;
    if (this.BUILD_GRAPHS) {
      TreebankLanguagePack tlp = parser.getTLPParams().treebankLanguagePack();
      this.gsf = tlp.grammaticalStructureFactory(tlp.punctuationWordRejectFilter(), parser.getTLPParams().typedDependencyHeadFinder());
    } else {
      this.gsf = null;
    }
    this.nThreads = 1;
    this.saveBinaryTrees = false;
View Full Code Here

Examples of edu.stanford.nlp.trees.TreebankLanguagePack.grammaticalStructureFactory()

    }

    if (this.BUILD_GRAPHS) {
      TreebankLanguagePack tlp = parser.getTLPParams().treebankLanguagePack();
      // TODO: expose keeping punctuation as an option to the user?
      this.gsf = tlp.grammaticalStructureFactory(tlp.punctuationWordRejectFilter(), parser.getTLPParams().typedDependencyHeadFinder());
    } else {
      this.gsf = null;
    }

    this.nThreads = PropertiesUtils.getInt(props, annotatorName + ".nthreads", PropertiesUtils.getInt(props, "nthreads", 1));
View Full Code Here

Examples of edu.stanford.nlp.trees.TreebankLanguagePack.grammaticalStructureFactory()

      } else {
        // System.err.println(leaf + " is not a CoreLabel.");
      }
    }
    TreebankLanguagePack tlp = new PennTreebankLanguagePack();
    GrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();

    GrammaticalStructure gs = gsf.newGrammaticalStructure(tree);
    Collection<TypedDependency> deps = gs.typedDependenciesCCprocessed(true);
    // System.out.println(deps);
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.