mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-04 04:10:20 +03:00
Change syntax
This commit is contained in:
parent
ad397b19bc
commit
1a6a3494d7
|
@ -308,8 +308,7 @@ installed in the same environment – that's it.
|
||||||
|
|
||||||
You can load a probability table from [spacy-lookups-data](https://github.com/explosion/spacy-lookups-data) into an existing spaCy model like `en_core_web_sm`.
|
You can load a probability table from [spacy-lookups-data](https://github.com/explosion/spacy-lookups-data) into an existing spaCy model like `en_core_web_sm`.
|
||||||
|
|
||||||
```python
|
```python {title="load_table.py"}
|
||||||
### load_table.py
|
|
||||||
import spacy
|
import spacy
|
||||||
from spacy.lookups import load_lookups
|
from spacy.lookups import load_lookups
|
||||||
nlp = spacy.load("en_core_web_sm")
|
nlp = spacy.load("en_core_web_sm")
|
||||||
|
@ -319,15 +318,14 @@ nlp.vocab.lookups.add_table("lexeme_norm", lookups.get_table("lexeme_norm"))
|
||||||
|
|
||||||
When training a model from scratch you can also specify probability tables in the `config.cfg`.
|
When training a model from scratch you can also specify probability tables in the `config.cfg`.
|
||||||
|
|
||||||
```ini
|
```ini {title="config.cfg (excerpt)"}
|
||||||
### config.cfg (excerpt)
|
|
||||||
[initialize.lookups]
|
[initialize.lookups]
|
||||||
@misc = "spacy.LookupsDataLoader.v1"
|
@misc = "spacy.LookupsDataLoader.v1"
|
||||||
lang = ${nlp.lang}
|
lang = ${nlp.lang}
|
||||||
tables = ["lexeme_norm"]
|
tables = ["lexeme_norm"]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Custom components via entry points {#entry-points-components}
|
### Custom components via entry points {id="entry-points-components"}
|
||||||
|
|
||||||
When you load a pipeline, spaCy will generally use its `config.cfg` to set up
|
When you load a pipeline, spaCy will generally use its `config.cfg` to set up
|
||||||
the language class and construct the pipeline. The pipeline is specified as a
|
the language class and construct the pipeline. The pipeline is specified as a
|
||||||
|
|
Loading…
Reference in New Issue
Block a user