Package edu.stanford.nlp.trees

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


      } 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.