-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Description
When the negation concerns the attribute of an entity and not the entity itself, the negation is not considered. For example, with the pipe eds.diabetes, if the patient has a diabetes but is not insulino-dependant, the assigned value will be "dependant", whereas it should rather be "non-insulino-dependant".
How to reproduce the bug
import edsnlp, edsnlp.pipes as eds
nlp = edsnlp.blank("eds")
nlp.add_pipe(eds.sentences())
nlp.add_pipe(
eds.normalizer(
accents=True,
lowercase=True,
quotes=True,
spaces=True,
pollution=dict(
information=True,
bars=True,
biology=True,
doctors=True,
web=True,
coding=True,
footer=True,
),
),
)
nlp.add_pipe(eds.diabetes())
text = "Le patient a un diabète non insulino-dépendant"
doc = nlp(text)
spans = doc.spans["diabetes"]
print(spans[0]._.assigned)
print(spans[0]._.detailled_status)The output is:
{'insulin': [dépendant]}
WITHOUT_COMPLICATION
Your Environment
- Python Version Used: 3.7.12
- spaCy Version Used: 3.7.5
- EDS-NLP Version Used: 0.18.0
Metadata
Metadata
Assignees
Labels
No labels