spacy-download


Namespacy-download JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/BramVanroy/spacy_download
SummaryDownload and load spaCy models on-the-fly.
upload_time2023-02-09 09:19:47
maintainer
docs_urlNone
authorBram Vanroy
requires_python>=3.6
licenseMIT
keywords nlp spacy spacy-extension
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/BramVanroy/spacy_download",
    "name": "spacy-download",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "nlp spacy spacy-extension",
    "author": "Bram Vanroy",
    "author_email": "bramvanroy@hotmail.com",
    "download_url": "https://files.pythonhosted.org/packages/64/3f/86e45af63cbde24ff05bb08d39e787da49a21828cb2518605b661a4d8ca6/spacy_download-1.1.0.tar.gz",
    "platform": null,
    "description": "# Download and load spaCy models on-the-fly\r\n\r\nA tiny drop-in replacement for `spacy.load()` that automatically downloads a model when it is not currently installed.\r\n\r\n```shell\r\npip install spacy_download\r\n```\r\n\r\nUsage is identical to [`spacy.load()`](https://spacy.io/api/top-level/#spacy.load), meaning that you can also exclude\r\nor disable pipeline components. Example:\r\n\r\n```python\r\nfrom spacy_download import load_spacy\r\n\r\n# Will download the model if it isn't installed yet\r\nnlp = load_spacy(\"en_core_web_sm\", exclude=[\"parser\", \"tagger\"])  \r\n```\r\n\r\nUnder the hood, the package makes use of spaCy's capability to import models as modules, rather than using spaCy's\r\nbuilt-in loader. This allows us to first download a model with `pip` and then load it as a module.\r\n\r\n**Note**: if you are using transformer models, you still need to install `spacy-transformers` yourself!\r\n\r\n**WARNING**: loading models on the fly can be useful, but it is\r\n[not an officially supported feature](https://github.com/explosion/spaCy/discussions/10608). It should work fine with\r\nthe official models at the time of writing, but I cannot guarantee that this will always be the case.\r\nUse at your own risk.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Download and load spaCy models on-the-fly.",
    "version": "1.1.0",
    "split_keywords": [
        "nlp",
        "spacy",
        "spacy-extension"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2ef0fd7478790171274fdb697a9d306981b59c9781d96aee3bb41368eeecd4db",
                "md5": "e07b0ed84c36713e052b0f770f50f193",
                "sha256": "9981af7d59449faec1ca762b8c2fbb4227f978f6bf4cd8151fc698247dea7dad"
            },
            "downloads": -1,
            "filename": "spacy_download-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e07b0ed84c36713e052b0f770f50f193",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 3634,
            "upload_time": "2023-02-09T09:19:45",
            "upload_time_iso_8601": "2023-02-09T09:19:45.682859Z",
            "url": "https://files.pythonhosted.org/packages/2e/f0/fd7478790171274fdb697a9d306981b59c9781d96aee3bb41368eeecd4db/spacy_download-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "643f86e45af63cbde24ff05bb08d39e787da49a21828cb2518605b661a4d8ca6",
                "md5": "42f177c75b8db129a5327108f9f3c498",
                "sha256": "3f87a6a5dad7b6dcdb9ae2e37a05f4aa9275a99db8ce019ce4af5661d4278d2d"
            },
            "downloads": -1,
            "filename": "spacy_download-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "42f177c75b8db129a5327108f9f3c498",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3470,
            "upload_time": "2023-02-09T09:19:47",
            "upload_time_iso_8601": "2023-02-09T09:19:47.724938Z",
            "url": "https://files.pythonhosted.org/packages/64/3f/86e45af63cbde24ff05bb08d39e787da49a21828cb2518605b661a4d8ca6/spacy_download-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-09 09:19:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "BramVanroy",
    "github_project": "spacy_download",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "spacy-download"
}
        
Elapsed time: 0.04752s