GLiNER
GLiNER copied to clipboard
Integration of negspacy with the current model
I am working on medical entities extraction on some report text using GLiNER spacy.
Is t there any way I can integrate below code with current extraction logic.
Current model I am using en_core_sci_sm
from negspacy.negation import Negex
import spacy
from negspacy.termsets import termset
nlp = spacy.load("en_core_sci_sm")
ts = termset("en_clinical")
nlp.add_pipe(
"negex",
config={
"neg_termset":ts.get_patterns(),
# "chunk_prefix": ["no"],
},
last=True,
)