git_issue/read_lda.py

20 lines
507 B
Python

proj_id = '11450'
path = "result/"+proj_id+'/lda/'
from gensim import corpora, models
import gensim
lmodel = gensim.models.ldamodel.LdaModel.load(path+'bug_feature_name_10.lda')
# print(lmodel)
print(lmodel.show_topic(0,20))
print(lmodel.show_topic(1,20))
print(lmodel.show_topic(2,20))
print(lmodel.show_topic(3,20))
print(lmodel.show_topic(4,20))
print(lmodel.show_topic(5,20))
print(lmodel.show_topic(6,20))
print(lmodel.show_topic(7,20))
print(lmodel.show_topic(8,20))
print(lmodel.show_topic(9,20))