Examples of IntTuple


Examples of edu.stanford.nlp.util.IntTuple

        IndexedWord t = dependency.getNodeByWordPattern(word);

        for(Pair<GrammaticalRelation,IndexedWord> child : dependency.childPairs(t)){
          if(child.first().getShortName().equals("nsubj")) {
            int subjectIndex = child.second().index()// start from 1
            IntTuple headPosition = new IntTuple(2);
            headPosition.set(0, paragraph.size()-1 + paragraphOffset);
            headPosition.set(1, subjectIndex-1);
            if(mentionheadPositions.containsKey(headPosition)
                && mentionheadPositions.get(headPosition).nerString.startsWith("PER")) {
              speaker = Integer.toString(mentionheadPositions.get(headPosition).mentionID);
            }
          }
View Full Code Here

Examples of org.tmatesoft.hg.internal.IntTuple

    }
    s1.add(21,22,23);
    errorCollector.assertEquals(2, s1.size());
    s1.add(7, 8, 9);
    s1.set(1, 4, 5, 6);
    IntTuple l = s1.last();
    errorCollector.assertEquals(7, l.at(0));
    errorCollector.assertEquals(8, l.at(1));
    errorCollector.assertEquals(9, l.at(2));
    int v = 1, slice = 0;
    for (IntTuple t : s1) {
      for (int i = 0; i < t.size(); i++) {
        errorCollector.assertEquals(String.format("Slice %d, element %d", slice, i), v++, t.at(i));
      }
View Full Code Here

Examples of org.tmatesoft.hg.internal.IntTuple

           * and we try to consume p1 changes as soon as we see first p1's range
           */
          int s1TotalLines = s1To - s1From, s1ConsumedLines = 0, s1Start = s1From;
         
          for (Iterator<IntTuple> it = mergeRanges.iterator(); it.hasNext();) {
            IntTuple mergeRange = it.next();
            final int rangeOrigin = mergeRange.at(0);
            final int rangeStart = mergeRange.at(1);
            final int rangeLen = mergeRange.at(2);
            final boolean lastRange = it.hasNext();
            final int s1LinesLeft = s1TotalLines - s1ConsumedLines;
            // how many lines we may report as changed (don't use more than in range unless it's the very last range)
            final int s1LinesToBorrow = lastRange ? s1LinesLeft : Math.min(s1LinesLeft, rangeLen);
            if (s1LinesToBorrow > 0) {
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.