Fix size limits in training data
@@ -160,7 +160,7 @@ class GoldCorpus(object):
yield item
i += len(item[1])
if limit and i >= limit:
- break
+ return
@property
def dev_tuples(self):
@@ -180,7 +180,7 @@ class GoldCorpus(object):
n += len(sent_tuples[1])
if self.limit and i >= self.limit:
break
- i += len(paragraph_tuples)
+ i += 1
return n
def train_docs(self, nlp, gold_preproc=False, max_length=None,
