Pseudo negation pattern not catched
julienduquesne opened this issue · comments
Description
In the sentence "Le résultat ne permet pas d'exclure un SMD", SMD shouldn't be flagged negative
How to reproduce the bug
import spacy
nlp = spacy.blank("eds")
nlp.add_pipe("eds.sentences")
# Dummy matcher
nlp.add_pipe(
"eds.matcher",
config=dict(terms=dict(smd="SMD")),
)
nlp.add_pipe("eds.negation")
text = "Le résultat ne permet pas d'exclure un SMD"
doc = nlp(text)
doc.ents[0]._.negation
returns True
Your Environment
- Operating System: MacOS Ventura 13.5.2
- Python Version Used: 3.10
- spaCy Version Used: 3.5.2
- EDS-NLP Version Used: 0.10.2
Proposed solution:
Add all combinations of "ne permet pas de" + negation verbs to pseudo patterns (I can do a PR if ok)
Thank you for reporting this, I've taken the liberty to fix this in #249 and have put you as a co-author to the relevant commit.
Thank you for reporting this, I've taken the liberty to fix this in #249 and have put you as a co-author to the relevant commit.
Thank you !