py collocations.py
Traceback (most recent call last):
File "D:\Collocations\collocations.py", line 12, in
nlp.add_pipe(collie)
File "C:\Users\ADMIN\AppData\Roaming\Python\Python311\site-packages\spacy\language.py", line 810, in add_pipe
raise ValueError(err)
ValueError: [E966] nlp.add_pipe now takes the string name of the registered component factory, not a callable component. Expected string, but got <collocater.collocater.Collocater object at 0x000001FDDAE5F490> (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.
py collocations.py
Traceback (most recent call last):
File "D:\Collocations\collocations.py", line 12, in
nlp.add_pipe(collie)
File "C:\Users\ADMIN\AppData\Roaming\Python\Python311\site-packages\spacy\language.py", line 810, in add_pipe
raise ValueError(err)
ValueError: [E966]
nlp.add_pipenow takes the string name of the registered component factory, not a callable component. Expected string, but got <collocater.collocater.Collocater object at 0x000001FDDAE5F490> (name: 'None').If you created your component with
nlp.create_pipe('name'): remove nlp.create_pipe and callnlp.add_pipe('name')instead.If you passed in a component like
TextCategorizer(): callnlp.add_pipewith 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 runnlp.add_pipe('your_name')to add it to the pipeline.