xinyadu / nqg

neural question generation for reading comprehension

Home Page:https://arxiv.org/abs/1705.00106

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid literal for float

subhammahanta777 opened this issue · comments

After doing:

python preprocess_embedding.py --embedding data/qg-train.t7 --dict data/qg.src.dict --output data/qg.src.840B.300d.npy

error:
Traceback (most recent call last):
File "preprocess_embedding.py", line 76, in
main()
File "preprocess_embedding.py", line 49, in main
word2embedding[line[0]] = np.asarray(map(float, line[1 : ]))
ValueError: invalid literal for float(): 0

Can you try with python3?

i have the same error,
using python 2,
do you have any tips to solve this error?
thanks

whats the format for the text file which needs to be replaced in the paragraph/preprocess_embedding.sh file ??

Can i use this file ? glove.840B.300d.txt

or is there a way to generate a embedding text file by my own ??