mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
Fix docs on model loading
This commit is contained in:
parent
070e026ed9
commit
97ff83d163
|
@ -118,15 +118,15 @@ p
|
||||||
└── en_core_web_md-1.2.0.tar.gz # downloaded archive
|
└── en_core_web_md-1.2.0.tar.gz # downloaded archive
|
||||||
├── meta.json # model meta data
|
├── meta.json # model meta data
|
||||||
├── setup.py # setup file for pip installation
|
├── setup.py # setup file for pip installation
|
||||||
└── en_core_web_md # model directory
|
└── en_core_web_md # 📦 model package
|
||||||
├── __init__.py # init for pip installation
|
├── __init__.py # init for pip installation
|
||||||
├── meta.json # model meta data
|
├── meta.json # model meta data
|
||||||
└── en_core_web_md-1.2.0 # model data
|
└── en_core_web_md-1.2.0 # model data
|
||||||
|
|
||||||
p
|
p
|
||||||
| You can place the model data directory anywhere on your local file system.
|
| You can place the #[strong model package directory] anywhere on your
|
||||||
| To use it with spaCy, simply assign it a name by creating a
|
| local file system. To use it with spaCy, simply assign it a name by
|
||||||
| #[+a("#usage") shortcut link] for the data directory.
|
| creating a #[+a("#usage") shortcut link] for the data directory.
|
||||||
|
|
||||||
+h(2, "usage") Using models with spaCy
|
+h(2, "usage") Using models with spaCy
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ p
|
||||||
import spacy
|
import spacy
|
||||||
nlp = spacy.load('en') # load model with shortcut link "en"
|
nlp = spacy.load('en') # load model with shortcut link "en"
|
||||||
nlp = spacy.load('en_core_web_sm') # load model package "en_core_web_sm"
|
nlp = spacy.load('en_core_web_sm') # load model package "en_core_web_sm"
|
||||||
nlp = spacy.load('/path/to/model') # load model from a directory
|
nlp = spacy.load('/path/to/en_core_web_sm') # load package from a directory
|
||||||
|
|
||||||
doc = nlp(u'This is a sentence.')
|
doc = nlp(u'This is a sentence.')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user