text_plain_output_1.png
import numpy as np

f = open('../input/glove840b300dtxt/glove.840B.300d.txt', encoding='utf-8')
embeddings_index = {}
for line in f:
    values = line.split()
    word = ''.join(values[:-300])
    coefs = np.asarray(values[-300:], dtype='float32')
    embeddings_index[word] = coefs
f.close()
print('Found {} word vectors of glove.'.format(len(embeddings_index)))