Check lengths match
@@ -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):
