pythonmachine-learninggoogle-colaboratoryspacyspacy-transformers

How to get started with spacy library and its module in Google Colab?


I'm facing problem with Spacy module to load in colab GPU notebook.

!python -m spacy download en_trf_xlnetbasecased_lg

This command works for anaconda notebook to download, but how to download in Google Colab and load module?


Solution

  • Thanks for the support. Finally i got the solution for this question.

    Following are the steps:

    1) !pip install https://github.com/explosion/spacy-models/releases/download/en_trf_xlnetbasecased_lg-2.2.0/en_trf_xlnetbasecased_lg-2.2.0.tar.gz

    2) It will ask to restart runtime. Do that.

    3) import spacy import spacy_transformers

    nlp = spacy.load('en_trf_xlnetbasecased_lg') print("Done")

    Regards.