From 7119e77fb655b2822a79087734c4fc11de604865 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 5 Feb 2016 19:46:02 +0100 Subject: [PATCH] * Fix Matcher.pipe --- spacy/matcher.pyx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spacy/matcher.pyx b/spacy/matcher.pyx index 25b8494bd..c85dbd989 100644 --- a/spacy/matcher.pyx +++ b/spacy/matcher.pyx @@ -249,9 +249,10 @@ cdef class Matcher: doc.ents = [(e.label, e.start, e.end) for e in doc.ents] + filtered return matches - def pipe(self, texts, batch_size=1000, n_threads=2): - for text in texts: - yield self(text) + def pipe(self, docs, batch_size=1000, n_threads=2): + for doc in docs: + self(doc) + yield doc cdef class PhraseMatcher: