You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the matcher to the following:
self.matcher = PhraseMatcher(nlp.vocab, attr="LOWER") # set the LOWER attrib instead of ORTH
The failure is the following:
ValueError: [E109] Component 'rest_countries' could not be run. Did you forget to call initialize()?
File /databricks/python/lib/python3.10/site-packages/spacy/language.py:1049, in Language.call(self, text, disable, component_cfg)
1048 try:
-> 1049 doc = proc(doc, **component_cfg.get(name, {})) # type: ignore[call-arg]
1050 except KeyError as e:
1051 # This typically happens if a component is not initialized
File /databricks/python/lib/python3.10/site-packages/spacy/language.py:1052, in Language.call(self, text, disable, component_cfg)
1049 doc = proc(doc, **component_cfg.get(name, {})) # type: ignore[call-arg]
1050 except KeyError as e:
1051 # This typically happens if a component is not initialized
-> 1052 raise ValueError(Errors.E109.format(name=name)) from e
1053 except Exception as e:
1054 error_handler(name, proc, [doc], e)
How to reproduce the behaviour
Using the example provided in https://spacy.io/usage/processing-pipelines#custom-components-attributes for RESCountriesComponents.
Update the matcher to the following:
self.matcher = PhraseMatcher(nlp.vocab, attr="LOWER") # set the LOWER attrib instead of ORTH
The failure is the following:
ValueError: [E109] Component 'rest_countries' could not be run. Did you forget to call
initialize()
?File /databricks/python/lib/python3.10/site-packages/spacy/language.py:1049, in Language.call(self, text, disable, component_cfg)
1048 try:
-> 1049 doc = proc(doc, **component_cfg.get(name, {})) # type: ignore[call-arg]
1050 except KeyError as e:
1051 # This typically happens if a component is not initialized
File /databricks/python/lib/python3.10/site-packages/spacy/language.py:1052, in Language.call(self, text, disable, component_cfg)
1049 doc = proc(doc, **component_cfg.get(name, {})) # type: ignore[call-arg]
1050 except KeyError as e:
1051 # This typically happens if a component is not initialized
-> 1052 raise ValueError(Errors.E109.format(name=name)) from e
1053 except Exception as e:
1054 error_handler(name, proc, [doc], e)
Your Environment
spaCy version: 3.7.2
The text was updated successfully, but these errors were encountered: