Commit 26c56a8d by BellCodeEditor

auto save

parent 5bced5d9
Showing with 6 additions and 2 deletions
import wordcloud
import jieba
with open("python二级考试大纲.txt",encoding="utf-8")as f:
text = f.read()
text_list=jieba.lcut(text)
text_list="".jion(txt_list)
img=ImageColor = wordcloud.ImageColorgenerate(data)
stopwords = ["的"]
wordcloud.WordCloud(background_color="green",font_path="simhei.ttf",mask=data,color_func=imgcolor)
w.generate(text)
w.to_file("mycloud")
\ No newline at end of file
w.to_file("mycloud")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment