chinese-word2vec
chinese-word2vec copied to clipboard
读取cn.skipgram.bin.tar.gz错误
model = gensim.models.KeyedVectors.load_word2vec_format(fdir + 'cn.skipgram.bin.tar.gz', binary=True)
ValueError: invalid literal for int() with base 10: 'cn.skipgram.bin\x00\x00。。。。。。
你好,读取cn.skipgram.bin.tar.gz文件出现这个错误,查了很久都不知道原因
解压后再试试?
can you unzip this file and try again?
请参考Mikolov的word2vec的源码读取方式
I got 'utf-8' codec can't decode bytes in position 96-97: unexpected end of data
when I try to load the unzipped bin file.
我使用gensim 加载,未解压的模型,报错:utf-8' codec can't decode bytes in position 96-97: unexpected end of data。如何加载这个模型呢?
Using like this can work for me:
word2vec = gensim.models.KeyedVectors.load_word2vec_format( 'XXX', binary=True, unicode_errors='ignore')