mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-03 21:24:11 +03:00
Merge branch 'develop' of https://github.com/explosion/spaCy into develop
This commit is contained in:
commit
8ee6514ab8
|
@ -900,6 +900,11 @@ class DisabledPipes(list):
|
||||||
|
|
||||||
|
|
||||||
def _pipe(func, docs, kwargs):
|
def _pipe(func, docs, kwargs):
|
||||||
|
# We added some args for pipe that __call__ doesn't expect.
|
||||||
|
kwargs = dict(kwargs)
|
||||||
|
for arg in ["n_threads", "batch_size"]:
|
||||||
|
if arg in kwargs:
|
||||||
|
kwargs.pop(arg)
|
||||||
for doc in docs:
|
for doc in docs:
|
||||||
doc = func(doc, **kwargs)
|
doc = func(doc, **kwargs)
|
||||||
yield doc
|
yield doc
|
||||||
|
|
Loading…
Reference in New Issue
Block a user