spaCy - Download Command



As name implies, this command is used to download models for spacy. It works by finding the best-matching compatible version. Then, it uses the pip install command to download the model as a package. If the model was downloaded via a shortcut, this command will also create a shortcut link.

The download command is convenient, and is an interactive wrapper as compared to direct download because, it performs compatibility checks while downloading the models. It also prints detailed messages in case if the things go wrong.

The download command is as follows −

python -m spacy download [model] [--direct] [pip args]

Arguments

The table below explains its arguments −

ARGUMENT TYPE DESCRIPTION
Model Positional Here, we need to give model name or shortcut. For example, en, de, en_core_web_sm.
--direct, -d Flag It will force direct download of exact model version.
pip args - It represents the additional installation options to be passed to pip install, while installing the model package. For example, --user to install to the user home directory. This feature is new and was introduced in version2.1.
--help, -h Flag This argument will show help message and other available arguments.
spacy_command_line_helpers.htm
Advertisements