mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-28 02:04:07 +03:00
Update docs on model shortcut links
This commit is contained in:
parent
7b7d46b64e
commit
3419ecbfdd
|
@ -71,6 +71,15 @@ p
|
||||||
| models from any location using a custom name via
|
| models from any location using a custom name via
|
||||||
| #[+api("spacy#load") #[code spacy.load()]].
|
| #[+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").
|
+code(false, "bash").
|
||||||
python -m spacy link [origin] [link_name] [--force]
|
python -m spacy link [origin] [link_name] [--force]
|
||||||
|
|
||||||
|
|
|
@ -176,10 +176,10 @@ p
|
||||||
python -m spacy link [package name or path] [shortcut] [--force]
|
python -m spacy link [package name or path] [shortcut] [--force]
|
||||||
|
|
||||||
p
|
p
|
||||||
| The first argument is the package name (if the model was installed via
|
| The first argument is the #[strong package name] (if the model was
|
||||||
| pip), or a local path to the the data directory. The second argument is
|
| installed via pip), or a local path to the the #[strong model package].
|
||||||
| the internal name you want to use for the model. Setting the #[code --force]
|
| The second argument is the internal name you want to use for the model.
|
||||||
| flag will overwrite any existing links.
|
| Setting the #[code --force] flag will overwrite any existing links.
|
||||||
|
|
||||||
+code("Examples", "bash").
|
+code("Examples", "bash").
|
||||||
# set up shortcut link to load installed package as "en_default"
|
# set up shortcut link to load installed package as "en_default"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user