mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-11 17:10:36 +03:00
bugfix tok2vec
This commit is contained in:
parent
01f9ae774c
commit
64fc840a5d
|
@ -59,10 +59,10 @@ class Tok2Vec(Pipe):
|
||||||
YIELDS (iterator): A sequence of `Doc` objects, in order of input.
|
YIELDS (iterator): A sequence of `Doc` objects, in order of input.
|
||||||
"""
|
"""
|
||||||
for docs in minibatch(stream, batch_size):
|
for docs in minibatch(stream, batch_size):
|
||||||
batch = list(batch)
|
docs = list(docs)
|
||||||
tokvecses = self.predict(docs)
|
tokvecses = self.predict(docs)
|
||||||
self.set_annotations(docs, tokvecses)
|
self.set_annotations(docs, tokvecses)
|
||||||
yield from batch
|
yield from docs
|
||||||
|
|
||||||
def predict(self, docs):
|
def predict(self, docs):
|
||||||
"""Return a single tensor for a batch of documents.
|
"""Return a single tensor for a batch of documents.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user