- 博客(1)
- 收藏
- 关注
原创 python词云图《三国演义》
import jieba import wordcloud file = open(“三国演义.txt”, “r”, encoding=“utf-8”) t = file.read() file.close() ls = jieba.lcut(t) txt = " ".join(ls) w = wordcloud.WordCloud( width=1000, height=700, background_color=“white”, font_path=“msyh.ttc” ) w.generate(txt
2021-10-29 11:07:55
1085
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人