train_w2v_model.py 文件源码

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

项目:DocumentClassification 作者: liu-nlper 项目源码 文件源码
def train():
    extract_sentece()

    in_path = './Data/corpus/sentence.txt'
    out_path = './Data/embedding/word2vec.bin'
    # ????
    model = Word2Vec(
        sg=1, sentences=LineSentence(in_path),
        size=256, window=5, min_count=3, workers=4, iter=40)
    model.wv.save_word2vec_format(out_path, binary=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号