Skip to content

重构论文A Biterm Topic Model for Short Texts提供的源代码,编译成一个python 扩展模块,并用python 包装了一下,提供一个user-friendly python package

Notifications You must be signed in to change notification settings

liuzhenhai93/biterm-topic-model

Repository files navigation

biterm-topic-model

重构论文A Biterm Topic Model for Short Texts提供的源代码,编译成一个python 扩展模块

编译:
make
如果是windows平台,需要小修改

安装:

python setup.py install

使用 demo:

from biterm.Model import bitermModel as model
mymodel=Model(20,99509,2.5,0.01,5,101) #topic、voc size、alpha、belta、savestep、iteration
mymodel.train("data/data.txt")
relist=mymodel.predict([232,435,56,76,890]) #words indexs
mymodel.savemodel("save/")
del mymodel
mymodel=Model(20,99509,2.5,0.01,5,101)
mymodel.loadmodel("save/")
relist=mymodel.predict([232,435,56,76,890])

About

重构论文A Biterm Topic Model for Short Texts提供的源代码,编译成一个python 扩展模块,并用python 包装了一下,提供一个user-friendly python package

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published