mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-02 19:03:14 +03:00
Fix Corpus
This commit is contained in:
parent
fedfabec80
commit
afe6ee4548
|
@ -72,7 +72,7 @@ class Corpus:
|
|||
i += 1
|
||||
return n
|
||||
|
||||
def train_dataset(self, nlp, shuffle=True):
|
||||
def train_dataset(self, nlp, shuffle=True, **kwargs):
|
||||
ref_docs = self.read_docbin(nlp.vocab, self.walk_corpus(self.train_loc))
|
||||
examples = self.make_examples(nlp, ref_docs)
|
||||
if shuffle:
|
||||
|
@ -80,7 +80,7 @@ class Corpus:
|
|||
random.shuffle(examples)
|
||||
yield from examples
|
||||
|
||||
def dev_dataset(self, nlp):
|
||||
def dev_dataset(self, nlp, **kwargs):
|
||||
ref_docs = self.read_docbin(nlp.vocab, self.walk_corpus(self.dev_loc))
|
||||
examples = self.make_examples(nlp, ref_docs)
|
||||
yield from examples
|
||||
|
|
Loading…
Reference in New Issue
Block a user