Document new --data-path argument

This commit is contained in:
Mark Amery 2016-11-20 16:52:56 +00:00
parent b0a07c21a0
commit a0c4b29dcb
2 changed files with 33 additions and 0 deletions

View File

@ -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
=========

View File

@ -114,3 +114,20 @@ p
python -m pip install -U pytest
python -m pytest &lt;spacy-directory&gt; --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.