、主题词提取等等
词频与词云图
# pip install wordcloud
# pip install jieba
# 导入库
import re # 正则表达式库
import collections..., '、', '中', '与', '在', '其', '了', '可以',
'进行', '有', '更', '需要', '提供', '多', '能力', '通过',...BosonNLP_score'] = comment['content'].apply(get_BosonNLP_score)
comment.head()
image-20230206153649995
基于LDA的主题词提取...tfidf = models.TfidfModel(corpus) # 建立TF-IDF模型对象
corpus_tfidf = tfidf[corpus] # 得到TF-IDF向量稀疏矩阵...for j in np.arange(i):
term = lda.show_topics(num_words=50)
# 提取各主题词