mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 09:26:27 +03:00
fix MultiHashEmbed example in documentation
This commit is contained in:
parent
4771a10503
commit
853edace37
|
@ -110,7 +110,7 @@ def MultiHashEmbed(
|
||||||
|
|
||||||
The features used can be configured with the 'attrs' argument. The suggested
|
The features used can be configured with the 'attrs' argument. The suggested
|
||||||
attributes are NORM, PREFIX, SUFFIX and SHAPE. This lets the model take into
|
attributes are NORM, PREFIX, SUFFIX and SHAPE. This lets the model take into
|
||||||
account some subword information, without construction a fully character-based
|
account some subword information, without constructing a fully character-based
|
||||||
representation. If pretrained vectors are available, they can be included in
|
representation. If pretrained vectors are available, they can be included in
|
||||||
the representation as well, with the vectors table will be kept static
|
the representation as well, with the vectors table will be kept static
|
||||||
(i.e. it's not updated).
|
(i.e. it's not updated).
|
||||||
|
|
|
@ -516,16 +516,14 @@ Many neural network models are able to use word vector tables as additional
|
||||||
features, which sometimes results in significant improvements in accuracy.
|
features, which sometimes results in significant improvements in accuracy.
|
||||||
spaCy's built-in embedding layer,
|
spaCy's built-in embedding layer,
|
||||||
[MultiHashEmbed](/api/architectures#MultiHashEmbed), can be configured to use
|
[MultiHashEmbed](/api/architectures#MultiHashEmbed), can be configured to use
|
||||||
word vector tables using the `also_use_static_vectors` flag. This setting is
|
word vector tables using the `include_static_vectors` flag.
|
||||||
also available on the [MultiHashEmbedCNN](/api/architectures#MultiHashEmbedCNN)
|
|
||||||
layer, which builds the default token-to-vector encoding architecture.
|
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[tagger.model.tok2vec.embed]
|
[tagger.model.tok2vec.embed]
|
||||||
@architectures = "spacy.MultiHashEmbed.v1"
|
@architectures = "spacy.MultiHashEmbed.v1"
|
||||||
width = 128
|
width = 128
|
||||||
rows = 7000
|
attrs = ["NORM", "PREFIX", "SUFFIX", "SHAPE"]
|
||||||
also_embed_subwords = true
|
rows = [7000, 3500, 3500, 3500]
|
||||||
also_use_static_vectors = true
|
also_use_static_vectors = true
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user