0

I am trying to find a way to load the downloaded en_core_web_lg ==2.3.1 for Spacy == 2.3.2.

Steps:

  1. Downloaded the tar file
  2. extracted it to path

Code:

import spacy
nlp=spacy.load("path/en_core_web_lg")

Error:

OSERROR: [E053] Could not read meta.json from en_core_web_lg/meta.json

Any suggestions will be helpful

data_person
  • 4,194
  • 7
  • 40
  • 75

1 Answers1

1

The .tar.gz is a python package, not just a model directory, so you probably need to look one level deeper and load en_core_web_lg/en_core_web_lg-2.3.1. You can tell by looking for the directory that contains the subdirectories vocab, tagger, ner, etc.

aab
  • 10,858
  • 22
  • 38
  • There are no such folders, I checked. – data_person Sep 17 '21 at 07:41
  • 1
    Then maybe something went wrong with the downloading / unpacking. It's easier if you just install the package without unpacking, e.g. `pip install en_core_web_sm-2.3.1.tar.gz` and then load from the package name (`en_core_web_sm`). – aab Sep 17 '21 at 08:39