mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Update API docs
This commit is contained in:
parent
c94279ac1b
commit
9ae4040183
|
@ -4,4 +4,34 @@ teaser: Pre-defined model architectures included with the core library
|
|||
source: spacy/ml/models
|
||||
---
|
||||
|
||||
TODO: write
|
||||
TODO: intro and how architectures work, link to
|
||||
[`registry`](/api/top-level#registry),
|
||||
[custom models](/usage/training#custom-models) usage etc.
|
||||
|
||||
## Parser architectures {source="spacy/ml/models/parser.py"}
|
||||
|
||||
### spacy.TransitionBasedParser.v1
|
||||
|
||||
<!-- TODO: intro -->
|
||||
|
||||
> #### Example Config
|
||||
>
|
||||
> ```ini
|
||||
> [model]
|
||||
> @architectures = "spacy.TransitionBasedParser.v1"
|
||||
> nr_feature_tokens = 6
|
||||
> hidden_width = 64
|
||||
> maxout_pieces = 2
|
||||
>
|
||||
> [model.tok2vec]
|
||||
> # ...
|
||||
> ```
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------------- | ------------------------------------------ | ----------- |
|
||||
| `tok2vec` | [`Model`](https://thinc.ai/docs/api-model) | |
|
||||
| `nr_feature_tokens` | int | |
|
||||
| `hidden_width` | int | |
|
||||
| `maxout_pieces` | int | |
|
||||
| `use_upper` | bool | |
|
||||
| `nO` | int | |
|
||||
|
|
|
@ -8,6 +8,18 @@ This class is a subclass of `Pipe` and follows the same API. The pipeline
|
|||
component is available in the [processing pipeline](/usage/processing-pipelines)
|
||||
via the ID `"parser"`.
|
||||
|
||||
## Default config {#config}
|
||||
|
||||
This is the default configuration used to initialize the model powering the
|
||||
pipeline component. See the [model architectures](/api/architectures)
|
||||
documentation for details on the architectures and their arguments and
|
||||
hyperparameters. To learn more about how to customize the config and train
|
||||
custom models, check out the [training config](/usage/training#config) docs.
|
||||
|
||||
```python
|
||||
https://github.com/explosion/spaCy/blob/develop/spacy/pipeline/defaults/parser_defaults.cfg
|
||||
```
|
||||
|
||||
## DependencyParser.\_\_init\_\_ {#init tag="method"}
|
||||
|
||||
> #### Example
|
||||
|
|
|
@ -12,6 +12,18 @@ This class is a subclass of `Pipe` and follows the same API. The pipeline
|
|||
component is available in the [processing pipeline](/usage/processing-pipelines)
|
||||
via the ID `"entity_linker"`.
|
||||
|
||||
## Default config {#config}
|
||||
|
||||
This is the default configuration used to initialize the model powering the
|
||||
pipeline component. See the [model architectures](/api/architectures)
|
||||
documentation for details on the architectures and their arguments and
|
||||
hyperparameters. To learn more about how to customize the config and train
|
||||
custom models, check out the [training config](/usage/training#config) docs.
|
||||
|
||||
```python
|
||||
https://github.com/explosion/spaCy/blob/develop/spacy/pipeline/defaults/entity_linker_defaults.cfg
|
||||
```
|
||||
|
||||
## EntityLinker.\_\_init\_\_ {#init tag="method"}
|
||||
|
||||
> #### Example
|
||||
|
|
|
@ -8,6 +8,18 @@ This class is a subclass of `Pipe` and follows the same API. The pipeline
|
|||
component is available in the [processing pipeline](/usage/processing-pipelines)
|
||||
via the ID `"ner"`.
|
||||
|
||||
## Default config {#config}
|
||||
|
||||
This is the default configuration used to initialize the model powering the
|
||||
pipeline component. See the [model architectures](/api/architectures)
|
||||
documentation for details on the architectures and their arguments and
|
||||
hyperparameters. To learn more about how to customize the config and train
|
||||
custom models, check out the [training config](/usage/training#config) docs.
|
||||
|
||||
```python
|
||||
https://github.com/explosion/spaCy/blob/develop/spacy/pipeline/defaults/ner_defaults.cfg
|
||||
```
|
||||
|
||||
## EntityRecognizer.\_\_init\_\_ {#init tag="method"}
|
||||
|
||||
> #### Example
|
||||
|
|
23
website/docs/api/morphologizer.md
Normal file
23
website/docs/api/morphologizer.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
title: Morphologizer
|
||||
tag: class
|
||||
source: spacy/pipeline/morphologizer.pyx
|
||||
new: 3
|
||||
---
|
||||
|
||||
A trainable pipeline component to predict morphological features. This class is
|
||||
a subclass of `Pipe` and follows the same API. The component is also available
|
||||
via the string name `"morphologizer"`. After initialization, it is typically
|
||||
added to the processing pipeline using [`nlp.add_pipe`](/api/language#add_pipe).
|
||||
|
||||
## Default config {#config}
|
||||
|
||||
This is the default configuration used to initialize the model powering the
|
||||
pipeline component. See the [model architectures](/api/architectures)
|
||||
documentation for details on the architectures and their arguments and
|
||||
hyperparameters. To learn more about how to customize the config and train
|
||||
custom models, check out the [training config](/usage/training#config) docs.
|
||||
|
||||
```python
|
||||
https://github.com/explosion/spaCy/blob/develop/spacy/pipeline/defaults/morphologizer_defaults.cfg
|
||||
```
|
|
@ -11,6 +11,18 @@ subclass of `Pipe` and follows the same API. The component is also available via
|
|||
the string name `"senter"`. After initialization, it is typically added to the
|
||||
processing pipeline using [`nlp.add_pipe`](/api/language#add_pipe).
|
||||
|
||||
## Default config {#config}
|
||||
|
||||
This is the default configuration used to initialize the model powering the
|
||||
pipeline component. See the [model architectures](/api/architectures)
|
||||
documentation for details on the architectures and their arguments and
|
||||
hyperparameters. To learn more about how to customize the config and train
|
||||
custom models, check out the [training config](/usage/training#config) docs.
|
||||
|
||||
```python
|
||||
https://github.com/explosion/spaCy/blob/develop/spacy/pipeline/defaults/senter_defaults.cfg
|
||||
```
|
||||
|
||||
## SentenceRecognizer.\_\_init\_\_ {#init tag="method"}
|
||||
|
||||
Initialize the sentence recognizer.
|
||||
|
|
|
@ -9,6 +9,20 @@ This class is a subclass of `Pipe` and follows the same API. The pipeline
|
|||
component is available in the [processing pipeline](/usage/processing-pipelines)
|
||||
via the ID `"textcat"`.
|
||||
|
||||
## Default config {#config}
|
||||
|
||||
This is the default configuration used to initialize the model powering the
|
||||
pipeline component. See the [model architectures](/api/architectures)
|
||||
documentation for details on the architectures and their arguments and
|
||||
hyperparameters. To learn more about how to customize the config and train
|
||||
custom models, check out the [training config](/usage/training#config) docs.
|
||||
|
||||
```python
|
||||
https://github.com/explosion/spaCy/blob/develop/spacy/pipeline/defaults/textcat_defaults.cfg
|
||||
```
|
||||
|
||||
<!-- TODO: do we also need to document the other defaults here? -->
|
||||
|
||||
## TextCategorizer.\_\_init\_\_ {#init tag="method"}
|
||||
|
||||
> #### Example
|
||||
|
|
19
website/docs/api/tok2vec.md
Normal file
19
website/docs/api/tok2vec.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
title: Tok2Vec
|
||||
source: spacy/pipeline/tok2vec.py
|
||||
new: 3
|
||||
---
|
||||
|
||||
TODO: document
|
||||
|
||||
## Default config {#config}
|
||||
|
||||
This is the default configuration used to initialize the model powering the
|
||||
pipeline component. See the [model architectures](/api/architectures)
|
||||
documentation for details on the architectures and their arguments and
|
||||
hyperparameters. To learn more about how to customize the config and train
|
||||
custom models, check out the [training config](/usage/training#config) docs.
|
||||
|
||||
```python
|
||||
https://github.com/explosion/spaCy/blob/develop/spacy/pipeline/defaults/tok2vec_defaults.cfg
|
||||
```
|
|
@ -79,7 +79,9 @@
|
|||
"items": [
|
||||
{ "text": "Language", "url": "/api/language" },
|
||||
{ "text": "Tokenizer", "url": "/api/tokenizer" },
|
||||
{ "text": "Tok2Vec", "url": "/api/tok2vec" },
|
||||
{ "text": "Lemmatizer", "url": "/api/lemmatizer" },
|
||||
{ "text": "Morphologizer", "url": "/api/morphologizer" },
|
||||
{ "text": "Tagger", "url": "/api/tagger" },
|
||||
{ "text": "DependencyParser", "url": "/api/dependencyparser" },
|
||||
{ "text": "EntityRecognizer", "url": "/api/entityrecognizer" },
|
||||
|
|
Loading…
Reference in New Issue
Block a user