Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spacy download en_core_web_lg manually

I am trying to find a way to download the model en_core_web_lg ==2.3.1 for Spacy == 2.3.2.

Currently using

python -m spacy download en_core_web_lg
import spacy
nlp = spacy.load ("en_core_web_lg")

Is it possible to download the model file or directory directly and load the model from that downloaded folder.

like image 711
data_person Avatar asked Oct 28 '25 06:10

data_person


1 Answers

Yes you can.

First, download the model from here. I downloaded the .tar.gz format.

Then you extract it and you load it in the code by specifying the path of the wanted subfolders. To be sure that the path is correct, you should get to the folder that contains the config.cfg file.

For example:

import spacy
nlp = spacy.load("your/base/path/en_core_web_sm-3.1.0/en_core_web_sm/en_core_web_sm-3.1.0/")
doc = nlp("This is a sentence.")

Here you can find some more info.

like image 174
SilentCloud Avatar answered Oct 30 '25 22:10

SilentCloud



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!