Returns the next previous word in the sentence with the given type.
430477
def previous(self, type=None):
        
        i = self.index - 1
        s = self.sentence
        while i > 0:
            if type in (s[i].type, None):
                return s[i]
            i -= 1
265342
def next(self, match, predicate=None, index=None):
        
        current = match.start + 1
        while current <= self._max_end:
            next_matches = self.starting(current)
            if next_matches:
                return filter_index(next_matches, predicate, index)
            current += 1
        return filter_index(_BaseMatches._base(), predicate, index)
922172
def next(self, type=None):
        
        i = self.stop
        s = self.sentence
        while i < len(s):
            if s[i].chunk is not None and type in (s[i].chunk.type, None):
                return s[i].chunk
            i += 1
268039
def next(self):
        """"""
        if self._current_index < len(self._collection):
            value = self._collection[self._current_index]
            self._current_index += 1
            return value
        elif self._next_cursor:
            self.__fetch_next()
            return self.next()
        else:
            self._current_index = 0
            raise StopIteration
717174
def next(self):
        
        if self._current < len(self._record_list):
            rec = self._record_list[self._current]
            key = rec['name']
            self._current += 1
            return key
        else:
            raise StopIteration
1261521
def next_tokens_in_sequence(observed, current):
    
    idx = 0
    for word in current:
        if observed[idx:].count(word) != 0:
            found_pos = observed.index(word, idx)
            idx = max(idx + 1, found_pos)
        # otherwise, don't increment idx
    if idx < len(observed):
        return observed[idx:]
    else:
        return []
91488
def next(self):
        """"""
        _LOGGER.debug("reading next")
        if self.closed:
            _LOGGER.debug("stream is closed")
            raise StopIteration()

        line = self.readline()
        if not line:
            _LOGGER.debug("nothing more to read")
            raise StopIteration()

        return line
994469
def next(self):
        
        try:
            result = self.data[self.index]
        except IndexError:
            self.index = 0
            raise StopIteration
        self.index += 1
        return result
1251398
def next(self):
        
        if self.col < self.data.num_attributes:
            index = self.col
            self.col += 1
            return self.data.attribute(index)
        else:
            raise StopIteration()
1034605
def advance(parser):
    # type: (Parser) -> None
    """"""
    prev_end = parser.token.end
    parser.prev_end = prev_end
    parser.token = parser.lexer.next_token(prev_end)
108424
@Override
  public String getNext() {
    try {
      int nextTok = st.nextToken();
      switch (nextTok) {
        case java.io.StreamTokenizer.TT_EOL:
          return eolString;
        case java.io.StreamTokenizer.TT_EOF:
          return null;
        case java.io.StreamTokenizer.TT_WORD:
          return st.sval;
        case java.io.StreamTokenizer.TT_NUMBER:
          return Double.toString(st.nval);
        default:
          char[] t = { (char) nextTok };    // (array initialization)
          return new String(t);
      }
    } catch (IOException ioe) {
      // do nothing, return null
      return null;
    }
  }
1177610
def get_next(self):
        
        self._counter_curr += 1

        suffix = self._separator + "%s" % str(self._counter_curr)

        return self._base_name + suffix
455200
def typeseq(types):
    
    ret = ""
    for t in types:
        ret += termcap.get(fmttypes[t])
    
    return ret
205766
public Annotation next(@NonNull AnnotationType type) {
      return document() == null ? Fragments.detachedEmptyAnnotation() : document().getAnnotationSet().next(this, type);
   }
573638
@Override
    public DataSet next(int num) {
        if (num <= cachedWindow.size())
            return fromCached(num);
        //no more sentences, return the left over
        else if (num >= cachedWindow.size() && !iter.hasNext())
            return fromCached(cachedWindow.size());

        //need the next sentence
        else {
            while (cachedWindow.size() < num && iter.hasNext()) {
                String sentence = iter.nextSentence();
                if (sentence.isEmpty())
                    continue;
                List<Window> windows = Windows.windows(sentence, vec.getTokenizerFactory(), vec.getWindow(), vec);
                if (windows.isEmpty() && !sentence.isEmpty())
                    throw new IllegalStateException("Empty window on sentence");
                for (Window w : windows)
                    w.setLabel(iter.currentLabel());
                cachedWindow.addAll(windows);
            }

            return fromCached(num);
        }

    }
1229257
protected IWord getNextPunctuationPairWord(int c, int pos) throws IOException
    {
        IWord w = null, w2 = null;
        String text = getPairPunctuationText(c);
        
        //handle the punctuation.
        String str = String.valueOf((char)c);
        if ( ! ( config.CLEAR_STOPWORD 
                && dic.match(ILexicon.STOP_WORD, str) ) ) {
            w = new Word(str, IWord.T_PUNCTUATION);
            w.setPartSpeech(IWord.PUNCTUATION);
            w.setPosition(pos);
        }
        
        //handle the pair text.
        if ( text != null && text.length() > 0
                && ! ( config.CLEAR_STOPWORD 
                        && dic.match(ILexicon.STOP_WORD, text) ) ) {
            w2 = new Word( text, ILexicon.CJK_WORD );
            w2.setPartSpeech(IWord.PPT_POSPEECH);
            w2.setPosition(pos+1);
            
            if ( w == null ) w = w2;
            else wordPool.add(w2);
        }
        
        /* here: 
         * 1. the punctuation is clear.
         * 2. the pair text is null or being cleared.
         * @date 2013-09-06
        */
        if ( w == null && w2 == null ) {
            return null;
        }
        
        return w;
    }
220892
def next(self):
        
        if self._cur_item is not None:
            res = self._cur_item
            self._cur_item = None
            return res
        
        return next(self._ex_context)