Improve pipeline model and meta example [ci skip]

This commit is contained in:
Ines Montani 2019-02-24 18:45:39 +01:00
parent 2011563c51
commit aa52305461
1 changed files with 5 additions and 5 deletions

View File

@ -29,10 +29,10 @@ components. spaCy then does the following:
> >
> ```json > ```json
> { > {
> "name": "example_model",
> "lang": "en", > "lang": "en",
> "name": "core_web_sm",
> "description": "Example model for spaCy", > "description": "Example model for spaCy",
> "pipeline": ["tagger", "parser"] > "pipeline": ["tagger", "parser", "ner"]
> } > }
> ``` > ```
@ -51,11 +51,11 @@ components. spaCy then does the following:
So when you call this... So when you call this...
```python ```python
nlp = spacy.load("en") nlp = spacy.load("en_core_web_sm")
``` ```
... the model tells spaCy to use the language `"en"` and the pipeline ... the model's `meta.json` tells spaCy to use the language `"en"` and the
`["tagger", "parser", "ner"]`. spaCy will then initialize pipeline `["tagger", "parser", "ner"]`. spaCy will then initialize
`spacy.lang.en.English`, and create each pipeline component and add it to the `spacy.lang.en.English`, and create each pipeline component and add it to the
processing pipeline. It'll then load in the model's data from its data directory processing pipeline. It'll then load in the model's data from its data directory
and return the modified `Language` class for you to use as the `nlp` object. and return the modified `Language` class for you to use as the `nlp` object.