Getting started

You can install spaCy via conda or pip. Since I am in a conda environment, I will use the conda installation, as follows:

# !conda install -y spacy # !pip install spacy

Let's download the English language model provided by spaCy. We are going to use en_core_web_lg (the lg at the end stands for large). This means that this is the most comprehensive and best performing model that spaCy has released for general-purpose use.

You only need to do this once:

!python -m spacy download en_core_web_lg

If you run into any errors when you download this, you can use the smaller model instead.

For Windows Shell, you can use python -m spacy download en as the administrator. From a Linux Terminal, you can use sudo python -m spacy download ...

Get Natural Language Processing with Python Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.