Examples of parseTree()


Examples of edu.stanford.nlp.parser.lexparser.LexicalizedParser.parseTree()

        System.out.println("Processing sentence file " + sentFileName);
        for  (String line; (line = reader.readLine()) != null; ) {
          System.out.println("Processing sentence: " + line);
          PTBTokenizer<Word> ptb = PTBTokenizer.newPTBTokenizer(new StringReader(line));
          List<Word> words = ptb.tokenize();
          Tree parseTree = lp.parseTree(words);
          tb.add(parseTree);
        }
        reader.close();
      } catch (Exception e) {
        throw new RuntimeException("Exception reading key file " + sentFileName, e);
View Full Code Here

Examples of edu.stanford.nlp.parser.lexparser.LexicalizedParser.parseTree()

    //    System.out.println("Preterminals:" + preterminals);
    System.out.println("Testing...");
    for (Tree gold : testTreebank) {
      Tree tree;
      try {
        tree = lp.parseTree(gold.yieldHasWord());
        if (tree == null) {
          System.out.println("Failed to parse " + gold.yieldHasWord());
          continue;
        }
      } catch (Exception e) {
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

  public List<DiffEntry> scan(AnyObjectId a, AnyObjectId b)
      throws IOException {
    assertHaveRepository();

    RevWalk rw = new RevWalk(reader);
    return scan(rw.parseTree(a), rw.parseTree(b));
  }

  /**
   * Determine the differences between two trees.
   *
 
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

  public List<DiffEntry> scan(AnyObjectId a, AnyObjectId b)
      throws IOException {
    assertHaveRepository();

    RevWalk rw = new RevWalk(reader);
    return scan(rw.parseTree(a), rw.parseTree(b));
  }

  /**
   * Determine the differences between two trees.
   *
 
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

  public List<DiffEntry> scan(AnyObjectId a, AnyObjectId b)
      throws IOException {
    assertHaveRepository();

    RevWalk rw = new RevWalk(reader);
    return scan(rw.parseTree(a), rw.parseTree(b));
  }

  /**
   * Determine the differences between two trees.
   *
 
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

  public List<DiffEntry> scan(AnyObjectId a, AnyObjectId b)
      throws IOException {
    assertHaveRepository();

    RevWalk rw = new RevWalk(reader);
    return scan(rw.parseTree(a), rw.parseTree(b));
  }

  /**
   * Determine the differences between two trees.
   *
 
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

    try {
      treeWalk.addTree(new DirCacheIterator(repo.readDirCache()));
      ObjectId headID = repo.resolve(Constants.HEAD);
      if (headID != null) {
        revWalk = new RevWalk(repo);
        treeWalk.addTree(revWalk.parseTree(headID));
        revWalk.dispose();
        revWalk = null;
      }

      treeWalk.setFilter(TreeFilter.ANY_DIFF);
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

        aTree = null;
        bTree = null;

      } else {
        if (patchList.getOldId() != null) {
          aTree = rw.parseTree(patchList.getOldId());
        } else {
          final RevCommit p = bCommit.getParent(0);
          rw.parseHeaders(p);
          aTree = p.getTree();
        }
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

    final DirCache dc = DirCache.newInCore();
    final DirCacheBuilder b = dc.builder();
    b.addTree(new byte[0], // no prefix path
        DirCacheEntry.STAGE_0, // standard stage
        pdb.newObjectReader(), rw.parseTree(branch.getObjectId()));
    b.finish();
    return dc;
  }

  private static void logAndThrowSubmoduleException(final String errorMsg,
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

    final Repository db = update.getRepository();

    reader = db.newObjectReader();
    inserter = db.newObjectInserter();
    final RevWalk rw = new RevWalk(reader);
    final RevTree tree = revision != null ? rw.parseTree(revision) : null;
    newTree = readTree(tree);
    return new BatchMetaDataUpdate() {
      AnyObjectId src = revision;
      AnyObjectId srcTree = tree;
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.