上传者: 42149153
|
上传时间: 2021-12-16 21:00:00
|
文件大小: 363KB
|
文件类型: -
双项主题模型
此程序包实现了由,兰介绍的短文本的。 它包括BTM模型的两种实现:cythonized)1 由小慧严,2)优化和cythonized 通过 。 它还能够计算困惑和语义一致性度量。
要求
赛顿
NumPy
大熊猫
科学
Scikit学习
pyLDAvis(可选)
设置
您可以从PyPi安装软件包:
pip install bitermplus
或从此回购中:
pip install git+https://github.com/maximtrp/bitermplus.git
例子
import bitermplus as btm
import numpy as np
from gzip import open as gzip_open
# Importing and vectorizing text data
with gzip_open ( 'dataset/Sea