AimeeLee77 / wiki_zh_word2vec

利用Python构建Wiki中文语料词向量模型试验

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

新版维基语料写文件有编码错误

yaleimeng opened this issue · comments

使用最新的维基百科语料:
在分词然后保存的时候,会出现编码错误。以\ud开头的,很多字符不能写文件。程序就挂掉了。多方尝试无果,不知您有无应对方案?
错误信息如下:
UnicodeEncodeError: 'utf-8' codec can't encode character '\ud858' in position 9811: surrogates not allowed