bugfix tok2vec

This commit is contained in:
svlandeg 2020-06-18 15:24:40 +02:00
parent 01f9ae774c
commit 64fc840a5d

View File

@ -59,10 +59,10 @@ class Tok2Vec(Pipe):
YIELDS (iterator): A sequence of `Doc` objects, in order of input.
"""
for docs in minibatch(stream, batch_size):
batch = list(batch)
docs = list(docs)
tokvecses = self.predict(docs)
self.set_annotations(docs, tokvecses)
yield from batch
yield from docs
def predict(self, docs):
"""Return a single tensor for a batch of documents.