dipanjanS / practical-machine-learning-with-python

Master the essential skills needed to recognize and solve complex real-world problems with Machine Learning and Deep Learning by leveraging the highly popular Python Machine Learning Eco-system.
Apache License 2.0
2.28k stars 1.65k forks source link

Easier way to download "en_vectors_web_lg" model in spacy #21

Open Anacoder1 opened 5 years ago

Anacoder1 commented 5 years ago

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')

dipanjanS commented 5 years ago

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 notifications@github.com 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 .