mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-03 20:00:21 +03:00
Update spacy/training/corpus.py
Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
This commit is contained in:
parent
d4fa60cc8a
commit
e8b03412f9
|
@ -314,8 +314,6 @@ class PlainTextCorpus:
|
|||
continue
|
||||
elif self.max_length >= 1 and len(doc) > self.max_length:
|
||||
continue
|
||||
words = [w.text for w in doc]
|
||||
spaces = [bool(w.whitespace_) for w in doc]
|
||||
# We don't *need* an example here, but it seems nice to
|
||||
# make it match the Corpus signature.
|
||||
yield Example(doc, Doc(nlp.vocab, words=words, spaces=spaces))
|
||||
yield Example(doc, doc.copy())
|
||||
|
|
Loading…
Reference in New Issue
Block a user