Hello, I am working on a project with a clinical dataset. So far I was able to detect all the diagnoses and whether they are negated or not. But I really like to get the negation term used to detect negated lexicon as well. For example:
import spacy
from negspacy.negation import Negex
nlp = spacy.load("en_core_sci_lg")
nlp.add_pipe("negex")
doc = nlp("She has neither fever nor cough.")
for e in doc.ents:
print(e.text, e._.negex)
fever True
cough True
What more do I expect to get:
The negation term for each negated lexicon detected: neither, nor
It would be very appreciated if you could help me.