From 4294bcf4ab6ab1a45ff05adf05ca369fa02bdc81 Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Thu, 11 Mar 2021 09:52:40 +0100 Subject: [PATCH] Align keyword-only in docs for init/util --- website/docs/api/top-level.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/website/docs/api/top-level.md b/website/docs/api/top-level.md index e1d81a5b5..cf9a58941 100644 --- a/website/docs/api/top-level.md +++ b/website/docs/api/top-level.md @@ -140,9 +140,9 @@ pipelines. -In a Jupyter notebook, run `prefer_gpu()` in the same cell as `spacy.load()` -to ensure that the model is loaded on the correct device. See [more -details](/usage/v3#jupyter-notebook-gpu). +In a Jupyter notebook, run `prefer_gpu()` in the same cell as `spacy.load()` to +ensure that the model is loaded on the correct device. See +[more details](/usage/v3#jupyter-notebook-gpu). @@ -168,9 +168,9 @@ and _before_ loading any pipelines. -In a Jupyter notebook, run `require_gpu()` in the same cell as `spacy.load()` -to ensure that the model is loaded on the correct device. See [more -details](/usage/v3#jupyter-notebook-gpu). +In a Jupyter notebook, run `require_gpu()` in the same cell as `spacy.load()` to +ensure that the model is loaded on the correct device. See +[more details](/usage/v3#jupyter-notebook-gpu). @@ -195,9 +195,9 @@ after importing spaCy and _before_ loading any pipelines. -In a Jupyter notebook, run `require_cpu()` in the same cell as `spacy.load()` -to ensure that the model is loaded on the correct device. See [more -details](/usage/v3#jupyter-notebook-gpu). +In a Jupyter notebook, run `require_cpu()` in the same cell as `spacy.load()` to +ensure that the model is loaded on the correct device. See +[more details](/usage/v3#jupyter-notebook-gpu). @@ -945,7 +945,8 @@ and create a `Language` object. The model data will then be loaded in via | Name | Description | | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `name` | Package name or path. ~~str~~ | -| `vocab` 3 | Optional shared vocab to pass in on initialization. If `True` (default), a new `Vocab` object will be created. ~~Union[Vocab, bool]~~. | +| _keyword-only_ | | +| `vocab` 3 | Optional shared vocab to pass in on initialization. If `True` (default), a new `Vocab` object will be created. ~~Union[Vocab, bool]~~ | | `disable` | Names of pipeline components to [disable](/usage/processing-pipelines#disabling). Disabled pipes will be loaded but they won't be run unless you explicitly enable them by calling [`nlp.enable_pipe`](/api/language#enable_pipe). ~~List[str]~~ | | `exclude` 3 | Names of pipeline components to [exclude](/usage/processing-pipelines#disabling). Excluded components won't be loaded. ~~List[str]~~ | | `config` 3 | Config overrides as nested dict or flat dict keyed by section values in dot notation, e.g. `"nlp.pipeline"`. ~~Union[Dict[str, Any], Config]~~ | @@ -968,6 +969,7 @@ A helper function to use in the `load()` method of a pipeline package's | Name | Description | | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `init_file` | Path to package's `__init__.py`, i.e. `__file__`. ~~Union[str, Path]~~ | +| _keyword-only_ | | | `vocab` 3 | Optional shared vocab to pass in on initialization. If `True` (default), a new `Vocab` object will be created. ~~Union[Vocab, bool]~~. | | `disable` | Names of pipeline components to [disable](/usage/processing-pipelines#disabling). Disabled pipes will be loaded but they won't be run unless you explicitly enable them by calling [nlp.enable_pipe](/api/language#enable_pipe). ~~List[str]~~ | | `exclude` 3 | Names of pipeline components to [exclude](/usage/processing-pipelines#disabling). Excluded components won't be loaded. ~~List[str]~~ |