python --LDA处理文章,分类提取数据
将文章分为十类:
def loadCorpusFromFile(self, fn, stopwords):
# 中文分词
f = open(fn, 'r', encoding='utf-8')
text1 = f.readlines()
text1 = "".join(text1)
text1 = text1.split("。")
text = ""
for itext in text1:
原创
2021-11-15 20:18:51 ·
1470 阅读 ·
0 评论