mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 00:46:28 +03:00
Document new --data-path argument
This commit is contained in:
parent
b0a07c21a0
commit
a0c4b29dcb
16
README.rst
16
README.rst
|
@ -222,6 +222,22 @@ and ``--model`` are optional and enable additional tests:
|
|||
|
||||
python -m pytest <spacy-directory> --vectors --model --slow
|
||||
|
||||
Download model to custom location
|
||||
=================================
|
||||
|
||||
You can specify where ``spacy.en.download`` and ``spacy.de.download`` download the language model
|
||||
to using the ``--data-path`` or ``-d`` argument:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
python -m spacy.en.download all --data-path /some/dir
|
||||
|
||||
|
||||
If you choose to download to a custom location, you will need to tell spaCy where to load the model
|
||||
from in order to use it. You can do this either by calling ``spacy.util.set_data_path()`` before
|
||||
calling ``spacy.load()``, or by passing a ``path`` argument to the ``spacy.en.English`` or
|
||||
``spacy.de.German`` constructors.
|
||||
|
||||
Changelog
|
||||
=========
|
||||
|
||||
|
|
|
@ -114,3 +114,20 @@ p
|
|||
python -m pip install -U pytest
|
||||
|
||||
python -m pytest <spacy-directory> --vectors --model --slow
|
||||
|
||||
+h(2, "custom-location") Download model to custom location
|
||||
|
||||
p
|
||||
| You can specify where #[code spacy.en.download] and
|
||||
| #[code spacy.de.download] download the language model to using the
|
||||
| #[code --data-path] or #[code -d] argument:
|
||||
|
||||
+code(false, "bash").
|
||||
python -m spacy.en.download all --data-path /some/dir
|
||||
|
||||
p
|
||||
| If you choose to download to a custom location, you will need to tell
|
||||
| spaCy where to load the model from in order to use it. You can do this
|
||||
| either by calling #[code spacy.util.set_data_path()] before calling
|
||||
| #[code spacy.load()], or by passing a #[code path] argument to the
|
||||
| #[code spacy.en.English] or #[code spacy.de.German] constructors.
|
||||
|
|
Loading…
Reference in New Issue
Block a user