* Fix Matcher.pipe

This commit is contained in:
Matthew Honnibal 2016-02-05 19:46:02 +01:00
parent 1cf0100bf6
commit 7119e77fb6

View File

@ -249,9 +249,10 @@ cdef class Matcher:
doc.ents = [(e.label, e.start, e.end) for e in doc.ents] + filtered doc.ents = [(e.label, e.start, e.end) for e in doc.ents] + filtered
return matches return matches
def pipe(self, texts, batch_size=1000, n_threads=2): def pipe(self, docs, batch_size=1000, n_threads=2):
for text in texts: for doc in docs:
yield self(text) self(doc)
yield doc
cdef class PhraseMatcher: cdef class PhraseMatcher: