词云

from wordcloud import Wordcloud

 from scipy.misc import imread

 mask=imread ('1.png') 

f = open("1.txt", "r",encoding="utf-8")

txt=f.read()

wordcloud=WordCloud(width=800,height=750,background_color="white",max _words=100,max_font_size=80)

wordcloud.to_file("2.png")

posted @ 2021-04-25 13:07  海鸿  阅读(60)  评论(0)    收藏  举报