Setup to use spaCy library for natural language processing
Natural language processing with spaCy library in CoCalc
Home page: spaCy
Jupyter kernel
Run this notebook with the Python 3 (Ubuntu Linux)
jupyter kernel.
Setting up
Installing python packages in a CoCalc project should be done as user or in a virtual environment, e.g. with anaconda
or virtualenv
. This example follows the user-install approach.
Install spacy and dependencies.
Takes about a minute. Open a .term file in CoCalc for the following steps:
Install one or more models.
Instructions for installing models recommend the spacy download
command, which selects the model version for the current installation. This command will fail, because CoCalc user does not have permissions to the directory. But running this command gives the path to the selected model.
Now use pip3
to install the model.
Ready to go.
After the above steps, this notebook, which follows the example at the spacy website, can be run.