Updated documentation

This commit is contained in:
richardpaulhudson 2022-12-10 09:52:45 +01:00
parent 740b39d099
commit 065aa062f0
2 changed files with 9 additions and 7 deletions

View File

@ -30,6 +30,7 @@ def build_lemmatizer_model(
tok2vec (Model[List[Doc], List[Floats2d]]): The token-to-vector subnetwork.
nO (int or None): The number of tags to output in the main model. Inferred from the data if None.
lowercasing: if *True*, the additional sigmoid appendage is created.
lowercasing_relu_width: the width of the linear layer within the sigmoid appendage.
"""
with Model.define_operators({">>": chain, "|": concatenate}):
t2v_width = tok2vec.get_dim("nO") if tok2vec.has_dim("nO") else None

View File

@ -677,13 +677,14 @@ results than a direct connection. A possible intuition explaining this is that
it reduces the interference between the two learning goals, which are linked but
nonetheless distinct.
| Name | Description |
| ------------- | ------------------------------------------------------------------------------------------ |
| `tok2vec` | Subnetwork to map tokens into vector representations. ~~Model[List[Doc], List[Floats2d]]~~ |
| `nO` | The number of tags to output. Inferred from the data if `None`. ~~Optional[int]~~ |
| `normalize` | Normalize probabilities during inference. Defaults to `False`. ~~bool~~ |
| `lowercasing` | If `True`, the additional sigmoid appendage is created. Defaults to `True`. ~~bool~~ |
| **CREATES** | The model using the architecture. ~~Model[List[Doc], List[Floats2d]]~~ |
| Name | Description |
| ------------------------ | ------------------------------------------------------------------------------------------ |
| `tok2vec` | Subnetwork to map tokens into vector representations. ~~Model[List[Doc], List[Floats2d]]~~ |
| `nO` | The number of tags to output. Inferred from the data if `None`. ~~Optional[int]~~ |
| `normalize` | Normalize probabilities during inference. Defaults to `False`. ~~bool~~ |
| `lowercasing` | If `True`, the additional sigmoid appendage is created. Defaults to `True`. ~~bool~~ |
| `lowercasing_relu_width` | The width of the linear layer within the sigmoid appendage. |
| **CREATES** | The model using the architecture. ~~Model[List[Doc], List[Floats2d]]~~ |
## Text classification architectures {#textcat source="spacy/ml/models/textcat.py"}