plkmo / BERT-Relation-Extraction

PyTorch implementation for "Matching the Blanks: Distributional Similarity for Relation Learning" paper
Apache License 2.0
565 stars 132 forks source link

Change the way "en_core_web_sm" is loaded to fix OSError: [E050] #48

Closed ghost closed 9 months ago

ghost commented 1 year ago

Hello,

if we change line 420 in /src/preprocessing_funcs.py from nlp = spacy.load("en_core_web_lg") to nlp = en_core_web_sm.load() and add import en_core_web_sm at the beginning of the file, the error OSError: [E050] Can't find model 'en_core_web_lg'. It doesn't seem to be a Python package or a valid path to a data directory. is fixed. (As described here https://github.com/explosion/spaCy/issues/4577)

plkmo commented 9 months ago

Thanks for the suggestion. I have added a requirements.txt file & instructions to download the space model, so this error should be resolved in the future