Restore vectors test utils
@@ -79,9 +79,9 @@ def add_vecs_to_vocab(vocab, vectors):
"""Add list of vector tuples to given vocab. All vectors need to have the
same length. Format: [("text", [1, 2, 3])]"""
length = len(vectors[0][1])
- vocab.resize_vectors(length)
+ vocab.clear_vectors(length)
for word, vec in vectors:
- vocab[word].vector = vec
+ vocab.set_vector(word, vec)
return vocab
