from wordcloud import WordCloud import matplotlib.pyplot as plt import jieba path_txt='盗墓笔记.txt' f = open(path_txt,'r',encoding='UTF-8').read() cut_text = " ".join(jieba.cut(f)) wordcloud = WordCloud( font_path="C:/Windows/Fonts/simfang.ttf", background_color="white",width=1920,height=1080).generate(cut_text) plt.imshow(wordcloud, interpolation="bilinear") plt.axis("off") plt.show()
相关文章
- 03-21中文词频统计与词云生成
- 03-21词云wordcloud
- 03-21jieba 库的使用和好玩的词云
- 03-21词云摘抄
- 03-21词云
- 03-21中文词频统计与词云生成
- 03-21jieba分词以及wordcloud词云
- 03-21爬取唐诗宋词生成词云
- 03-21Jieba库使用和好玩的词云
- 03-21Note of Jieba ( 词云图实例 )