Metadata-Version: 2.1
Name: spacy-download
Version: 1.1.0
Summary: Download and load spaCy models on-the-fly.
Home-page: https://github.com/BramVanroy/spacy_download
Author: Bram Vanroy
Author-email: bramvanroy@hotmail.com
License: MIT
Project-URL: Bug Reports, https://github.com/BramVanroy/spacy_download/issues
Project-URL: Source, https://github.com/BramVanroy/spacy_download
Keywords: nlp spacy spacy-extension
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Text Processing
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: spacy (<4.0.0,>=3.0.0)
Provides-Extra: dev
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: flake8 ; extra == 'dev'
Requires-Dist: isort ; extra == 'dev'
Requires-Dist: black ; extra == 'dev'
Requires-Dist: pygments ; extra == 'dev'
Requires-Dist: spacy-transformers ; extra == 'dev'

# Download and load spaCy models on-the-fly

A tiny drop-in replacement for `spacy.load()` that automatically downloads a model when it is not currently installed.

```shell
pip install spacy_download
```

Usage is identical to [`spacy.load()`](https://spacy.io/api/top-level/#spacy.load), meaning that you can also exclude
or disable pipeline components. Example:

```python
from spacy_download import load_spacy

# Will download the model if it isn't installed yet
nlp = load_spacy("en_core_web_sm", exclude=["parser", "tagger"])  
```

Under the hood, the package makes use of spaCy's capability to import models as modules, rather than using spaCy's
built-in loader. This allows us to first download a model with `pip` and then load it as a module.

**Note**: if you are using transformer models, you still need to install `spacy-transformers` yourself!

**WARNING**: loading models on the fly can be useful, but it is
[not an officially supported feature](https://github.com/explosion/spaCy/discussions/10608). It should work fine with
the official models at the time of writing, but I cannot guarantee that this will always be the case.
Use at your own risk.
