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
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-391-3e5e0b5647da> in <module>
17 from spacy_readability import Readability
18 nlp = spacy.load("en_core_web_sm")
---> 19 nlp.add_pipe(Readability())
20
21 nltk.download('punkt')
~/.local/lib/python3.8/site-packages/spacy/language.py in add_pipe(self, factory_name, name, before, after, first, last, source, config, raw_config, validate)
767 bad_val = repr(factory_name)
768 err = Errors.E966.format(component=bad_val, name=name)
--> 769 raise ValueError(err)
770 name = name if name is not None else factory_name
771 if name in self.component_names:
ValueError: [E966] `nlp.add_pipe` now takes the string name of the registered component factory, not a callable component. Expected string, but got <spacy_readability.Readability object at 0x7f06e6ac7ee0> (name: 'None').
- If you created your component with `nlp.create_pipe('name')`: remove nlp.create_pipe and call `nlp.add_pipe('name')` instead.
- If you passed in a component like `TextCategorizer()`: call `nlp.add_pipe` with the string name instead, e.g. `nlp.add_pipe('textcat')`.
- If you're using a custom component: Add the decorator `@Language.component` (for function components) or `@Language.factory` (for class components / factories) to your custom component and assign it a name, e.g. `@Language.component('your_name')`. You can then run `nlp.add_pipe('your_name')` to add it to the pipeline.
The text was updated successfully, but these errors were encountered:
Description
Just trying to use
spacy_readability
. The docs are outdated, and the init commands break.What I Did
The text was updated successfully, but these errors were encountered: