From 1a6a3494d790a600f7ef9aaeb0add0924b44e62c Mon Sep 17 00:00:00 2001 From: thomashacker Date: Wed, 11 Jan 2023 18:01:15 +0100 Subject: [PATCH] Change syntax --- website/docs/usage/saving-loading.mdx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/website/docs/usage/saving-loading.mdx b/website/docs/usage/saving-loading.mdx index 29f1b297e..c84abdb95 100644 --- a/website/docs/usage/saving-loading.mdx +++ b/website/docs/usage/saving-loading.mdx @@ -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`. -```python -### load_table.py +```python {title="load_table.py"} import spacy from spacy.lookups import load_lookups 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`. -```ini -### config.cfg (excerpt) +```ini {title="config.cfg (excerpt)"} [initialize.lookups] @misc = "spacy.LookupsDataLoader.v1" lang = ${nlp.lang} 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 the language class and construct the pipeline. The pipeline is specified as a