jenojp / negspacy

spaCy pipeline object for negating concepts in text
MIT License
274 stars 36 forks source link

KeyError: 'es_clinical' #53

Closed shuxianpan closed 1 year ago

shuxianpan commented 1 year ago

I tested the pipeline for Spanish text as following

ts = termset("es_clinical")

nlp = spacy.load("es_core_news_sm")

nlp.add_pipe(
    "negex",
    config={
        "neg_termset":ts.get_patterns()
    }
)

and got the error

File "/root/negex_spacy/negex.py", line 5, in <module>
    ts = termset("es_clinical")
File "/usr/local/lib/python3.10/dist-packages/negspacy/termsets.py", line 212, in __init__
    self.terms = LANGUAGES[termset_lang]
KeyError: 'es_clinical'

Update: try to install via cloned repository and works. Seems that the one installed via pip is not the lastest version.

jenojp commented 1 year ago

Thank you for testing the install via GitHub repository as well. I am rolling together a couple of changes into one update and plan to finish by mid May. Then the pip install version will work as well.

jenojp commented 1 year ago

Version 1.0.4 available at pypi

thanks!