* Fix Matcher.pipe

This commit is contained in:
Matthew Honnibal 2016-02-05 19:46:02 +01:00
parent 1cf0100bf6
commit 7119e77fb6
1 changed files with 4 additions and 3 deletions

View File

@ -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: