practical-machine-learning-with-python icon indicating copy to clipboard operation
practical-machine-learning-with-python copied to clipboard

Easier way to download "en_vectors_web_lg" model in spacy

Open Anacoder1 opened this issue 6 years ago • 1 comments

The procedure for downloading the "en_vectors_web_lg" in spacy. by downloading and unzipping the file, and shifting it to the appropriate directory, as illustrated here is long and cumbersome.

Instead of the above procedure, we could simply do the following to load the model:

import spacy import spacy.cli spacy.cli.download("en_vectors_web_lg") nlp = spacy.load('en_vectors_web_lg')

Anacoder1 avatar Sep 10 '19 06:09 Anacoder1

The reason for that is two-fold

  1. Spacy's CLI wasn't matured yet at the time of the book's release
  2. Sometimes for proxy and other internal environments the CLI download also might fail sometime.

However in regular environments, it's definitely a better approach to follow as long is it works.

On Tue, Sep 10, 2019 at 11:33 AM Anamitra Musib [email protected] wrote:

The procedure for downloading the "en_vectors_web_lg" in spacy. by downloading and unzipping the file, and shifting it to the appropriate directory, as illustrated here https://github.com/dipanjanS/practical-machine-learning-with-python/blob/master/bonus%20content/feature%20engineering%20text%20data/Feature%20Engineering%20Text%20Data%20-%20Advanced%20Deep%20Learning%20Strategies.ipynb is long and cumbersome.

Instead of the above procedure, we could simply do the following to load the model:

import spacy import spacy.cli spacy.cli.download("en_vectors_web_lg") nlp = spacy.load('en_vectors_web_lg')

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dipanjanS/practical-machine-learning-with-python/issues/21?email_source=notifications&email_token=AA2J3RZFLIFW4Z3UGMQMXTLQI42DBA5CNFSM4IVDKQQ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HKLGUUQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2J3R4TCZNZGTX4QWMCQJTQI42DBANCNFSM4IVDKQQQ .

dipanjanS avatar Sep 10 '19 08:09 dipanjanS