mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-11 09:00:36 +03:00
Update DocBin
This commit is contained in:
parent
0a8b6631a2
commit
652f31d3ee
|
@ -14,7 +14,6 @@ ALL_ATTRS = (
|
|||
"TAG",
|
||||
"HEAD",
|
||||
"DEP",
|
||||
"SENT_START",
|
||||
"ENT_IOB",
|
||||
"ENT_TYPE",
|
||||
"LEMMA",
|
||||
|
@ -112,8 +111,7 @@ class DocBin(object):
|
|||
for i in range(len(self.tokens)):
|
||||
tokens = self.tokens[i]
|
||||
spaces = self.spaces[i]
|
||||
words = [vocab.strings[orth] for orth in tokens[:, orth_col]]
|
||||
doc = Doc(vocab, words=words, spaces=spaces)
|
||||
doc = Doc(vocab, words=tokens[:, orth_col], spaces=spaces)
|
||||
doc = doc.from_array(self.attrs, tokens)
|
||||
doc.cats = self.cats[i]
|
||||
if self.store_user_data:
|
||||
|
|
Loading…
Reference in New Issue
Block a user