diff --git a/spacy/ml/models/tok2vec.py b/spacy/ml/models/tok2vec.py index 3a7da4a8e..65d2bffbb 100644 --- a/spacy/ml/models/tok2vec.py +++ b/spacy/ml/models/tok2vec.py @@ -136,6 +136,8 @@ def MultiHashEmbed( include_static_vectors (bool): Whether to also use static word vectors. Requires a vectors table to be loaded in the Doc objects' vocab. """ + if len(rows) != len(attrs): + raise ValueError(f"Mismatched lengths: {len(rows)} vs {len(attrs)}") seed = 7 def make_hash_embed(index):