GLiNER icon indicating copy to clipboard operation
GLiNER copied to clipboard

Integration of negspacy with the current model

Open shyamalaspure opened this issue 9 months ago • 0 comments

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,
)

shyamalaspure avatar May 16 '24 14:05 shyamalaspure