mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 10:16:27 +03:00
Check lengths match
This commit is contained in:
parent
db84d175c3
commit
e50047f1c5
|
@ -136,6 +136,8 @@ def MultiHashEmbed(
|
||||||
include_static_vectors (bool): Whether to also use static word vectors.
|
include_static_vectors (bool): Whether to also use static word vectors.
|
||||||
Requires a vectors table to be loaded in the Doc objects' vocab.
|
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
|
seed = 7
|
||||||
|
|
||||||
def make_hash_embed(index):
|
def make_hash_embed(index):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user