Could not use glove.6B.100d.txt

387 Views Asked by At
embedding_dict={}
with open('glove.6B.100d.txt') as f:
 for line in f:
    values=line.split()
    word = values[0]
    vectors=np.asarray(values[1:],'float32')
    embedding_dict[word]=vectors
f.close()

ValueError: could not convert string to float: '-' - I have no idea how to fix this problem.

I am using google colab and glove.6B.100d.txt uploaded in files.

Can you please help me solve this error ?

0

There are 0 best solutions below