import jieba
import wordcloud
from imageio import imread
mask = imread("st.bmp")
excludes = { }
f = open("三体.txt", "r", encoding="utf-16")
t = f.read()
f.close()
ls = jieba.lcut(t)
txt = " ".join(ls)
w = wordcloud.WordCloud(width = 1000, height = 700,background_color = "white",font_path = "msyh.ttc", mask = mask,max_words=10000)
w.generate(txt)
w.to_file("cy1.bmp")