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

gensim.downloader的下载速度不行,glove词向量下载不下来怎么办? #2

Open
XingWu01 opened this issue Feb 9, 2020 · 2 comments

Comments

@XingWu01
Copy link
Collaborator

XingWu01 commented Feb 9, 2020

感谢群友提供的百度网盘链接,这里有解压好的 glove.6B.200d.txt
https://pan.baidu.com/s/1TD7K059UVcxuPazWgtY8Dw

@XingWu01
Copy link
Collaborator Author

XingWu01 commented Feb 9, 2020

感谢群友提供的百度网盘链接,这里有解压好的 glove.6B.200d.txt
https://pan.baidu.com/s/1TD7K059UVcxuPazWgtY8Dw

百度云速度不好的同学可以去「夕小瑶的卖萌屋」公众号,后台回复【glove-200】下载wv_from_bin.pkl文件

@XingWu01
Copy link
Collaborator Author

XingWu01 commented Feb 9, 2020

感谢群友提供的百度网盘链接,这里有解压好的 glove.6B.200d.txt
https://pan.baidu.com/s/1TD7K059UVcxuPazWgtY8Dw

百度云速度不好的同学可以去「夕小瑶的卖萌屋」公众号,后台回复【glove-200】下载wv_from_bin.pkl文件

然后将这个函数:
image

替换成:

def load_embedding_model():
""" Load GloVe Vectors
Return:
wv_from_bin: All 400000 embeddings, each lengh 200
"""
import pickle
inputFile = open('wv_from_bin.pkl', 'rb')
wv_from_bin = pickle.load(inputFile)
inputFile.close()
print("Loaded vocab size %i" % len(wv_from_bin.vocab.keys()))
return wv_from_bin

@Herais Herais mentioned this issue May 4, 2020
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

1 participant