Examples of taggedLabeledYield()


Examples of edu.stanford.nlp.trees.Tree.taggedLabeledYield()

        //Count MWE statistics
        TregexMatcher m = pMWE.matcher(t);
        while(m.findNextMatchingNode()) {
          Tree match = m.getMatch();
          String label = match.value();
          List<CoreLabel> yield = match.taggedLabeledYield();
          StringBuilder termYield = new StringBuilder();
          StringBuilder posYield = new StringBuilder();
          for(CoreLabel cl : yield) {
            termYield.append(cl.word()).append(" ");
            posYield.append(cl.tag()).append(" ");
View Full Code Here

Examples of edu.stanford.nlp.trees.Tree.taggedLabeledYield()

        if (treeReader != null) {
            Tree tree = treeReader.readTree();
            if (tree == null) {
              nextYield = null;
            } else {
              List<CoreLabel> mLabeledLeaves = tree.taggedLabeledYield();
              nextYield = new ArrayList<String>(mLabeledLeaves.size());
              for (CoreLabel label : mLabeledLeaves) {
                nextYield.add(label.tag());
              }
            }
View Full Code Here

Examples of edu.stanford.nlp.trees.Tree.taggedLabeledYield()

      TreeReader tr = trf.newTreeReader(in);

      // Tree reading will implicitly perform tree normalization for us
      while ((t = tr.readTree()) != null) {
        // Update tagger with this tree
        List<CoreLabel> yield = t.taggedLabeledYield();
        for (CoreLabel leafLabel : yield) {
          if (leafLabel.tag().equals(SpanishTreeNormalizer.MW_TAG))
            continue;

          unigramTagger.incrementCount(leafLabel.word(), leafLabel.tag());
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.