I'm trying to encode word vectors using Glove and I get the error stated above. The data consists of two text columns for the purpose of sentence similarity determination. Can you please help me solve this error?
[code]
embeddings_index = {}
f = open(r'C:\Users\15084\Downloads\glove.840B.300d\glove.840B.300d.txt',errors =
'ignore',encoding='utf-8')
for line in f:
values = line.split()
word = values[0]
coefs = np.asarray(values[1:], dtype='float32')
embeddings_index[word] = coefs
f.close()
print('Found %s word vectors.' % len(embeddings_index))