mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 18:56:36 +03:00
fix typos
This commit is contained in:
parent
61dfdd9fbd
commit
319692aa53
|
@ -216,7 +216,7 @@ list of available editor integrations.
|
||||||
#### Disabling formatting
|
#### Disabling formatting
|
||||||
|
|
||||||
There are a few cases where auto-formatting doesn't improve readability – for
|
There are a few cases where auto-formatting doesn't improve readability – for
|
||||||
example, in some of the the language data files like the `tag_map.py`, or in
|
example, in some of the language data files like the `tag_map.py`, or in
|
||||||
the tests that construct `Doc` objects from lists of words and other labels.
|
the tests that construct `Doc` objects from lists of words and other labels.
|
||||||
Wrapping a block in `# fmt: off` and `# fmt: on` lets you disable formatting
|
Wrapping a block in `# fmt: off` and `# fmt: on` lets you disable formatting
|
||||||
for that particular code. Here's an example:
|
for that particular code. Here's an example:
|
||||||
|
|
|
@ -490,7 +490,7 @@ network has an internal CNN Tok2Vec layer and uses attention.
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
| --------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| -------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `exclusive_classes` | bool | Whether or not categories are mutually exclusive. |
|
| `exclusive_classes` | bool | Whether or not categories are mutually exclusive. |
|
||||||
| `pretrained_vectors` | bool | Whether or not pretrained vectors will be used in addition to the feature vectors. |
|
| `pretrained_vectors` | bool | Whether or not pretrained vectors will be used in addition to the feature vectors. |
|
||||||
| `width` | int | Output dimension of the feature encoding step. |
|
| `width` | int | Output dimension of the feature encoding step. |
|
||||||
|
@ -499,8 +499,7 @@ network has an internal CNN Tok2Vec layer and uses attention.
|
||||||
| `window_size` | int | The number of contextual vectors to [concatenate](https://thinc.ai/docs/api-layers#expand_window) from the left and from the right. |
|
| `window_size` | int | The number of contextual vectors to [concatenate](https://thinc.ai/docs/api-layers#expand_window) from the left and from the right. |
|
||||||
| `ngram_size` | int | Determines the maximum length of the n-grams in the BOW model. For instance, `ngram_size=3`would give unigram, trigram and bigram features. |
|
| `ngram_size` | int | Determines the maximum length of the n-grams in the BOW model. For instance, `ngram_size=3`would give unigram, trigram and bigram features. |
|
||||||
| `dropout` | float | The dropout rate. |
|
| `dropout` | float | The dropout rate. |
|
||||||
| `nO` | int | Output dimension, determined by the number of different labels. If not set, the the [`TextCategorizer`](/api/textcategorizer) component will set it when |
|
| `nO` | int | Output dimension, determined by the number of different labels. If not set, the [`TextCategorizer`](/api/textcategorizer) component will set it when `begin_training` is called. |
|
||||||
| `begin_training` is called. |
|
|
||||||
|
|
||||||
### spacy.TextCatCNN.v1 {#TextCatCNN}
|
### spacy.TextCatCNN.v1 {#TextCatCNN}
|
||||||
|
|
||||||
|
@ -528,10 +527,10 @@ vectors are mean pooled and used as features in a feed-forward network. This
|
||||||
architecture is usually less accurate than the ensemble, but runs faster.
|
architecture is usually less accurate than the ensemble, but runs faster.
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
| ------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ------------------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `exclusive_classes` | bool | Whether or not categories are mutually exclusive. |
|
| `exclusive_classes` | bool | Whether or not categories are mutually exclusive. |
|
||||||
| `tok2vec` | [`Model`](https://thinc.ai/docs/api-model) | The [`tok2vec`](#tok2vec) layer of the model. |
|
| `tok2vec` | [`Model`](https://thinc.ai/docs/api-model) | The [`tok2vec`](#tok2vec) layer of the model. |
|
||||||
| `nO` | int | Output dimension, determined by the number of different labels. If not set, the the [`TextCategorizer`](/api/textcategorizer) component will set it when `begin_training` is called. |
|
| `nO` | int | Output dimension, determined by the number of different labels. If not set, the [`TextCategorizer`](/api/textcategorizer) component will set it when `begin_training` is called. |
|
||||||
|
|
||||||
### spacy.TextCatBOW.v1 {#TextCatBOW}
|
### spacy.TextCatBOW.v1 {#TextCatBOW}
|
||||||
|
|
||||||
|
@ -550,11 +549,11 @@ An ngram "bag-of-words" model. This architecture should run much faster than the
|
||||||
others, but may not be as accurate, especially if texts are short.
|
others, but may not be as accurate, especially if texts are short.
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
| ------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `exclusive_classes` | bool | Whether or not categories are mutually exclusive. |
|
| `exclusive_classes` | bool | Whether or not categories are mutually exclusive. |
|
||||||
| `ngram_size` | int | Determines the maximum length of the n-grams in the BOW model. For instance, `ngram_size=3`would give unigram, trigram and bigram features. |
|
| `ngram_size` | int | Determines the maximum length of the n-grams in the BOW model. For instance, `ngram_size=3`would give unigram, trigram and bigram features. |
|
||||||
| `no_output_layer` | float | Whether or not to add an output layer to the model (`Softmax` activation if `exclusive_classes=True`, else `Logistic`. |
|
| `no_output_layer` | float | Whether or not to add an output layer to the model (`Softmax` activation if `exclusive_classes=True`, else `Logistic`. |
|
||||||
| `nO` | int | Output dimension, determined by the number of different labels. If not set, the the [`TextCategorizer`](/api/textcategorizer) component will set it when `begin_training` is called. |
|
| `nO` | int | Output dimension, determined by the number of different labels. If not set, the [`TextCategorizer`](/api/textcategorizer) component will set it when `begin_training` is called. |
|
||||||
|
|
||||||
## Entity linking architectures {#entitylinker source="spacy/ml/models/entity_linker.py"}
|
## Entity linking architectures {#entitylinker source="spacy/ml/models/entity_linker.py"}
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ python setup.py build_ext --inplace # compile spaCy
|
||||||
|
|
||||||
Compared to regular install via pip, the
|
Compared to regular install via pip, the
|
||||||
[`requirements.txt`](https://github.com/explosion/spaCy/tree/master/requirements.txt)
|
[`requirements.txt`](https://github.com/explosion/spaCy/tree/master/requirements.txt)
|
||||||
additionally installs developer dependencies such as Cython. See the the
|
additionally installs developer dependencies such as Cython. See the
|
||||||
[quickstart widget](#quickstart) to get the right commands for your platform and
|
[quickstart widget](#quickstart) to get the right commands for your platform and
|
||||||
Python version.
|
Python version.
|
||||||
|
|
||||||
|
|
|
@ -551,9 +551,9 @@ setup(
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
After installing the package, the the custom colors will be used when
|
After installing the package, the custom colors will be used when visualizing
|
||||||
visualizing text with `displacy`. Whenever the label `SNEK` is assigned, it will
|
text with `displacy`. Whenever the label `SNEK` is assigned, it will be
|
||||||
be displayed in `#3dff74`.
|
displayed in `#3dff74`.
|
||||||
|
|
||||||
import DisplaCyEntSnekHtml from 'images/displacy-ent-snek.html'
|
import DisplaCyEntSnekHtml from 'images/displacy-ent-snek.html'
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# With additional functionality: in/not in, replace, pprint, round, + for lists,
|
# With additional functionality: in/not in, replace, pprint, round, + for lists,
|
||||||
# rendering empty dicts
|
# rendering empty dicts
|
||||||
# This script is mostly used to generate the JavaScript function for the
|
# This script is mostly used to generate the JavaScript function for the
|
||||||
# training quicktart widget.
|
# training quickstart widget.
|
||||||
import contextlib
|
import contextlib
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
|
|
Loading…
Reference in New Issue
Block a user