diff --git a/spacy/pipeline.pyx b/spacy/pipeline.pyx index d43e6990c..ed4e4c066 100644 --- a/spacy/pipeline.pyx +++ b/spacy/pipeline.pyx @@ -449,7 +449,7 @@ class Tagger(Pipe): def predict(self, docs): if not any(len(doc) for doc in docs): # Handle case where there are no tokens in any docs. - return [self.model.ops.allocate((0, self.model.nO) for doc in docs] + return [self.model.ops.allocate((0, self.model.nO)) for doc in docs] tokvecs = self.model.tok2vec(docs) scores = self.model.softmax(tokvecs) guesses = []