mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +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
|
||||
| #[+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]
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user