Skip to content
This repository was archived by the owner on Jul 5, 2020. It is now read-only.

Commit e74efca

Browse files
authored
Update create_embeddings_glove.py
1 parent 5dec58b commit e74efca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

embeddings/create_embeddings_glove.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def create_embeddings_glove(pooling="max", dim=100):
102102
rel_embeddings_cnt[rel] += 1
103103

104104
if pooling == "avg":
105-
subj_encoding_sum = sum([glove_embeddings.get(word, np.zeros((dim,))) for word in subj])
106-
obj_encoding_sum = sum([glove_embeddings.get(word, np.zeros((dim,))) for word in obj])
105+
subj_encoding_sum = sum([glove_embeddings.get(word, np.zeros((dim,))) for word in subj_words])
106+
obj_encoding_sum = sum([glove_embeddings.get(word, np.zeros((dim,))) for word in obj_words])
107107

108108
if rel in ["relatedto", "antonym"]:
109109
# Symmetric relation.

0 commit comments

Comments
 (0)