mirror of
https://github.com/explosion/spaCy.git
synced 2025-05-05 16:23:42 +03:00
Fix component check in self.factories (see #1911)
This commit is contained in:
parent
8901814248
commit
ce10d320c4
|
@ -239,7 +239,7 @@ class Language(object):
|
||||||
if not hasattr(component, '__call__'):
|
if not hasattr(component, '__call__'):
|
||||||
msg = ("Not a valid pipeline component. Expected callable, but "
|
msg = ("Not a valid pipeline component. Expected callable, but "
|
||||||
"got {}. ".format(repr(component)))
|
"got {}. ".format(repr(component)))
|
||||||
if component in self.factories.keys():
|
if component in self.factories:
|
||||||
msg += ("If you meant to add a built-in component, use "
|
msg += ("If you meant to add a built-in component, use "
|
||||||
"create_pipe: nlp.add_pipe(nlp.create_pipe('{}'))"
|
"create_pipe: nlp.add_pipe(nlp.create_pipe('{}'))"
|
||||||
.format(component))
|
.format(component))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user