diff --git a/spacy/language.py b/spacy/language.py index 3079249f6..6d97f41fe 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -387,7 +387,12 @@ class Language(object): docs = list(docs) golds = list(golds) for pipe in self.pipeline: - docs = pipe.pipe(docs) + if not hasattr(pipe, 'pipe'): + for doc in docs: + pipe(doc) + else: + docs = list(pipe.pipe(docs)) + assert len(docs) == len(golds) for doc, gold in zip(docs, golds): scorer.score(doc, gold) doc.tensor = None