Giter VIP home page Giter VIP logo

Comments (3)

HunterHeidy avatar HunterHeidy commented on June 7, 2024

from chinese-word-vectors.

XXXXiGua avatar XXXXiGua commented on June 7, 2024

应该binary=False,因为模型是txt格式十进制的,如果是bin采用True

from chinese-word-vectors.

ahutxwq1 avatar ahutxwq1 commented on June 7, 2024

作者你好,当我用下面的代码尝试加载您的中文词向量模型

加载中英文词向量模型

ch_model = KeyedVectors.load_word2vec_format('./ch_model/merge_sgns_bigram_char300.txt', binary=True) 结果显示下面报错,应该如何解决呢 Traceback (most recent call last): File "c:/Users/11323/Desktop/score_comment/socore_comments.py", line 127, in ch_model = KeyedVectors.load_word2vec_format('./ch_model/merge_sgns_bigram_char300.txt', binary=True) File "C:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\gensim\models\keyedvectors.py", line 1719, in load_word2vec_format return _load_word2vec_format( File "C:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\gensim\models\keyedvectors.py", line 2065, in _load_word2vec_format _word2vec_read_binary( File "C:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\gensim\models\keyedvectors.py", line 1960, in _word2vec_read_binary processed_words, chunk = _add_bytes_to_kv( File "C:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\gensim\models\keyedvectors.py", line 1939, in _add_bytes_to_kv word = chunk[start:i_space].decode(encoding, errors=unicode_errors) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xaf in position 0: invalid start byte

merge_sgns_bigram_char300.txt这个文件怎么生成的?可以直接下载吗?

from chinese-word-vectors.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.