Package edu.stanford.nlp.trees

Examples of edu.stanford.nlp.trees.TreeReader


    File tree1Path = new File(args[0]);
    File tree2Path = new File(args[1]);

    try {
      TreeReaderFactory trf = new LabeledScoredTreeReaderFactory();
      TreeReader tR1 = trf.newTreeReader(new BufferedReader(new FileReader(tree1Path)));
      TreeReader tR2 = trf.newTreeReader(new BufferedReader(new FileReader(tree2Path)));

      Tree t1 = tR1.readTree();
      Tree t2 = tR2.readTree();

      Set<Constituent> t1Diff = markDiff(t1,t2);
      System.out.println(t2.pennString());
      System.out.println();
      for(Constituent c : t1Diff)
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.trees.TreeReader

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.