Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

词向量文件无法load #29

Closed
zhenghaor10 opened this issue Jun 25, 2018 · 3 comments
Closed

词向量文件无法load #29

zhenghaor10 opened this issue Jun 25, 2018 · 3 comments

Comments

@zhenghaor10
Copy link

试了一个百科预料生成的此向量,用gensim进行load(之所以用load方式,是因为想用gensim做增量学习),gensim.models.Word2Vec.load("sgns.baidubaike.bigram-char") 报错,

2018-06-25 7 00 08

@shenshen-hungry
Copy link
Collaborator

shenshen-hungry commented Jun 26, 2018

你试试这样:

from gensim.models.keyedvectors import KeyedVectors
w2v = KeyedVectors.load_word2vec_format('sgns.baidubaike.bigram-char', binary=False, unicode_errors='ignore')

@zhenghaor10
Copy link
Author

多谢,可以load了。但还有个小问题,比之前word2vec的word embedding文件load消耗的时间明显要长,不知道什么原因。。。

@shenshen-hungry
Copy link
Collaborator

因为:文件大。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants