google.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:senti 作者: stevenxxiu 项目源码 文件源码
def main():
    os.chdir('data/google')
    model = Word2Vec.load_word2vec_format('GoogleNews-vectors-negative300.bin', binary=True, norm_only=False)
    for v in model.vocab.values():
        v.sample_int = 0
    ts = list(model.vocab.items())
    ts.sort(key=lambda t: t[1].index)
    model.vocab = OrderedDict(ts)
    joblib.dump(model, 'GoogleNews-vectors-negative300.pickle')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号