fix small typos (#6698)

This commit is contained in:
Sofie Van Landeghem 2021-01-08 09:39:47 +01:00 committed by GitHub
parent 411c842a71
commit a612a5ba3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -716,7 +716,7 @@ that we want to classify as being related or not. As these candidate pairs are
typically formed within one document, this function takes a [`Doc`](/api/doc) as typically formed within one document, this function takes a [`Doc`](/api/doc) as
input and outputs a `List` of `Span` tuples. For instance, the following input and outputs a `List` of `Span` tuples. For instance, the following
implementation takes any two entities from the same document, as long as they implementation takes any two entities from the same document, as long as they
are within a **maximum distance** (in number of tokens) of eachother: are within a **maximum distance** (in number of tokens) of each other:
> #### config.cfg (excerpt) > #### config.cfg (excerpt)
> >
@ -742,7 +742,7 @@ def create_instances(max_length: int) -> Callable[[Doc], List[Tuple[Span, Span]]
return get_candidates return get_candidates
``` ```
This function in added to the [`@misc` registry](/api/top-level#registry) so we This function is added to the [`@misc` registry](/api/top-level#registry) so we
can refer to it from the config, and easily swap it out for any other candidate can refer to it from the config, and easily swap it out for any other candidate
generation function. generation function.

View File

@ -1060,7 +1060,7 @@ In this example we assume a custom function `read_custom_data` which loads or
generates texts with relevant text classification annotations. Then, small generates texts with relevant text classification annotations. Then, small
lexical variations of the input text are created before generating the final lexical variations of the input text are created before generating the final
[`Example`](/api/example) objects. The `@spacy.registry.readers` decorator lets [`Example`](/api/example) objects. The `@spacy.registry.readers` decorator lets
you register the function creating the custom reader in the `readers` you register the function creating the custom reader in the `readers`
[registry](/api/top-level#registry) and assign it a string name, so it can be [registry](/api/top-level#registry) and assign it a string name, so it can be
used in your config. All arguments on the registered function become available used in your config. All arguments on the registered function become available
as **config settings** in this case, `source`. as **config settings** in this case, `source`.