Commit 56b349f2 by BellCodeEditor

save project

parent b8bef387
Showing with 3 additions and 3 deletions
...@@ -6,9 +6,9 @@ import jieba ...@@ -6,9 +6,9 @@ import jieba
img=Image.open('bell.png') img=Image.open('bell.png')
val=np.array(img) val=np.array(img)
img_colors=wordcloud.ImageColorGenerator(val) img_colors=wordcloud.ImageColorGenerator(val)
stopwords=['等','基本','程序,''] stopwords=['等','基本','程序','的']
w=wordcloud.WordCloud(background_color='black',font_path='SimHei.ttf',mask=val,color_func=img_colors) w=wordcloud.WordCloud(background_color='black',font_path='SimHei.ttf',mask=val,
color_func=img_colors,stopwords=stopwords,max_font_size=60) color_func=img_colors,stopwords=stopwords,max_font_size=60)
with open(file='python二级考试大纲.txt',mode='r',encoding='utf-8') as file: with open(file='python二级考试大纲.txt',mode='r',encoding='utf-8') as file:
r=file.read() r=file.read()
l=jieba.lcut(r) l=jieba.lcut(r)
......
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