Created
August 1, 2020 14:24
-
-
Save arunm8489/3ca17048444e0eabdda9efdc8bfd4400 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
embedding_matrix = np.zeros((len(corpus) + 1, 300)) | |
for i,word in enumerate(corpus): | |
if word in glove_dict.keys(): | |
embedding_vec = glove_dict[word] | |
embedding_matrix[i] = embedding_vec | |
print(embedding_matrix.shape) | |
np.save('embedding_matrix_2.npy',embedding_matrix) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment