      buf = []
      try:
          while True:
              for i in range(random.randint(1, bufsize-len(buf))):
                  buf.append(iterable.next())
              random.shuffle(buf)
              for i in range(random.randint(1, bufsize)):
                  if buf:
                      yield buf.pop()
                  else:
 
</s> remove         i = 0
        for loc in self.dev_locs:
            gold_tuples = read_json_file(loc)
            for item in gold_tuples:
                yield item
                i += len(item[1])
                if self.limit and i >= self.limit:
                    break
 </s> add         locs = (self.tmp_dir / 'dev').iterdir()
        yield from self.read_tuples(locs, limit=self.limit)
   
    @property
    def train_tuples(self):
        locs = (self.tmp_dir / 'train').iterdir()
        yield from self.read_tuples(locs, limit=self.limit) </s> remove                 if self.limit and i >= self.limit:
 </s> add                 if limit and i >= limit: </s> remove         for loc in self.train_locs:
            gold_tuples = read_json_file(loc)
 </s> add         for loc in locs:
            loc = util.ensure_path(loc)
            if loc.parts[-1].endswith('json'):
                gold_tuples = read_json_file(loc)
            elif loc.parts[-1].endswith('msg'):
                with loc.open('rb') as file_:
                    gold_tuples = msgpack.load(file_, encoding='utf8')
            else:
                msg = "Cannot read from file: %s. Supported formats: .json, .msg"
                raise ValueError(msg % loc) </s> remove         for doc in stream:
            self(doc)
            yield doc
 </s> add         if as_tuples:
            for doc, context in stream:
                matches = self(doc)
                if return_matches:
                    yield ((doc, matches), context)
                else:
                    yield (doc, context)
        else:
            for doc in stream:
                matches = self(doc)
                if return_matches:
                    yield (doc, matches) 
                else:
                    yield doc
                buf.append(next(iterable))
      buf = []
      try:
          while True:
              for i in range(random.randint(1, bufsize-len(buf))):
                buf.append(next(iterable))
              random.shuffle(buf)
              for i in range(random.randint(1, bufsize)):
                  if buf:
                      yield buf.pop()
                  else:
keep keep keep keep replace keep keep keep keep keep
 Revert "Merge branch 'develop' of https://github.com/explosion/spaCy into develop"

This reverts commit c9ba3d3c2dc7067cf8bd55f878cec45a8c6d73d4, reversing
changes made to 92c26a35d425d4e8ca1b805ea776ea10f5ded3df. 
spacy/util.py