facebookresearch / MUSE

A library for Multilingual Unsupervised or Supervised word Embeddings
Other
3.17k stars 544 forks source link

您好!处理时出现如下问题 #155

Open Shajiu opened 4 years ago

Shajiu commented 4 years ago

第一:不管是运行那个命令都存在如下的错误:ValueError: could not convert string to float: 'encoding="utf-8"?>' 第二:仔细查看发现在脚本:MUSE-master/src/evaluation/wordsim.py", line 40, in get_word_pairs 中函数get_word_pairs(path, lower=True):中读取文件“EN_WS-353-ALL.txt”时第一行为“<?xml version="1.0" encoding="UTF-8"?>”为何在函数中float(line[2])转换为float呢?为啥把encoding="UTF-8"?>转换为浮点数呢?

YiJingLin commented 3 years ago

Hi @Shajiu , the error you encounter : ValueError: could not convert string to float: 'encoding="utf-8"?> has been answered at #108 Although there's no direct answer to your second question, they give some steps to fix the error Please check 👍