negspacy not working #11252
Unanswered
cangainuren
asked this question in
Help: Coding & Implementations
Replies: 1 comment
-
Your code works fine for me - can you confirm you have the latest version of negspaCy installed? Check the output of Also, note that negspaCy is a third party project not developed by us, and it may be better to ask questions at their repo. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm having problem running the following example. I have spacy 3.4 and latest negspacy.
import spacy
from negspacy.negation import Negex
nlp = spacy.load("en_core_web_sm")
nlp.add_pipe("negex", config={"ent_types":["PERSON","ORG"]})
ValueError: [E002] Can't find factory for 'negex' for language English (en). This usually happens when spaCy calls
nlp.create_pipe
with a custom component name that's not registered on the current language class. If you're using a Transformer, make sure to install 'spacy-transformers'. If you're using a custom component, make sure you've added the decorator@Language.component
(for function components) or@Language.factory
(for class components).Beta Was this translation helpful? Give feedback.
All reactions