Skip to content

Commit 853edac

Browse files
committed
fix MultiHashEmbed example in documentation
1 parent 4771a10 commit 853edac

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

spacy/ml/models/tok2vec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def MultiHashEmbed(
110110
111111
The features used can be configured with the 'attrs' argument. The suggested
112112
attributes are NORM, PREFIX, SUFFIX and SHAPE. This lets the model take into
113-
account some subword information, without construction a fully character-based
113+
account some subword information, without constructing a fully character-based
114114
representation. If pretrained vectors are available, they can be included in
115115
the representation as well, with the vectors table will be kept static
116116
(i.e. it's not updated).

website/docs/usage/embeddings-transformers.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -516,16 +516,14 @@ Many neural network models are able to use word vector tables as additional
516516
features, which sometimes results in significant improvements in accuracy.
517517
spaCy's built-in embedding layer,
518518
[MultiHashEmbed](/api/architectures#MultiHashEmbed), can be configured to use
519-
word vector tables using the `also_use_static_vectors` flag. This setting is
520-
also available on the [MultiHashEmbedCNN](/api/architectures#MultiHashEmbedCNN)
521-
layer, which builds the default token-to-vector encoding architecture.
519+
word vector tables using the `include_static_vectors` flag.
522520

523521
```ini
524522
[tagger.model.tok2vec.embed]
525523
@architectures = "spacy.MultiHashEmbed.v1"
526524
width = 128
527-
rows = 7000
528-
also_embed_subwords = true
525+
attrs = ["NORM", "PREFIX", "SUFFIX", "SHAPE"]
526+
rows = [7000, 3500, 3500, 3500]
529527
also_use_static_vectors = true
530528
```
531529

0 commit comments

Comments
 (0)