中分词库  jieba

词云 wordcloud

import jieba
import wordcloud
f = open("新时代中国特色社会主义.txt", "r", encodint="utf-8")
t = f.read()
f.close()
ls = jieba.lcut(t)
txt = " ".join(ls)
w = wordcloud.WordCloud( font_path = "msyh.ttc", \
           width = 1000, height = 700, background_color="white")
w.generate(txt)
w.to_file("wordcloud.png")

http://yciyun.com/

 

相关文章:

  • 2021-08-22
  • 2021-08-05
  • 2021-05-30
  • 2021-12-09
  • 2021-08-23
  • 2021-05-31
猜你喜欢
  • 2021-05-16
  • 2022-12-23
  • 2022-02-08
  • 2021-04-10
  • 2021-11-30
  • 2022-01-12
  • 2022-12-23
相关资源
相似解决方案