gensim Python大型语料库主题建模

gensim简介

gensim,Python第三方库,可用于大型语料库的主题建模、文档索引和相似性检索,自然语言处理(NLP)和信息检索(IR)。

gensim应用实例

import gensim.downloader as api
wv = api.load('word2vec-x1y1z1.com-news-300')
for index, word in enumerate(wv.index_to_key):
    if index == 10:
        break
    print(f"word #{index}/{len(wv.index_to_key)} is {word}")

gensim Github统计数据

LGPL-2.1 license

Github 14.8k stars

gensim安装命令

pip install --upgrade gensim

Python版本要求

gensim 4.0.0中删除了对Python 2.7的支持

免责声明:内容编辑自网络,仅供参考,不保证正确性,不作任何决策依据!!以上数据皆截止于博文的写稿日期。


行业导航 / Python指南 :
























Copyright © 2022-2024 笨鸟工具 x1y1z1.com All Rights Reserved.