Update docs on model shortcut links

This commit is contained in:
ines 2017-06-04 13:55:00 +02:00
parent 7b7d46b64e
commit 3419ecbfdd
2 changed files with 13 additions and 4 deletions

View File

@ -71,6 +71,15 @@ p
| models from any location using a custom name via
| #[+api("spacy#load") #[code spacy.load()]].
+infobox("Important note")
| In spaCy v1.x, you had to use the model data directory to set up a shortcut
| link for a local path. As of v2.0, spaCy expects all shortcut links to
| be #[strong loadable model packages]. If you want to load a data directory,
| call #[+api("spacy#load") #[code spacy.load()]] or
| #[+api("language#from_disk") #[code Language.from_disk()]] with the path,
| or use the #[+api("cli#package") #[code package]] command to create a
| model package.
+code(false, "bash").
python -m spacy link [origin] [link_name] [--force]

View File

@ -176,10 +176,10 @@ p
python -m spacy link [package name or path] [shortcut] [--force]
p
| The first argument is the package name (if the model was installed via
| pip), or a local path to the the data directory. The second argument is
| the internal name you want to use for the model. Setting the #[code --force]
| flag will overwrite any existing links.
| The first argument is the #[strong package name] (if the model was
| installed via pip), or a local path to the the #[strong model package].
| The second argument is the internal name you want to use for the model.
| Setting the #[code --force] flag will overwrite any existing links.
+code("Examples", "bash").
# set up shortcut link to load installed package as "en_default"