Commit 17dedc7e by BellCodeEditor

save project

parent e0b9e1b8
Showing with 35 additions and 0 deletions
import os
txt_list=[]
filelist=os.listdir("C:\\Users\\new-user\\Desktop\\file")
for i in filelist:
if i[-4:]==".txt":
txt_list.append(i)
\ No newline at end of file
import jieba
text="他来自北京大学"
txt_list=jieba.luct(text)
from PIL import Image
import numpy as np
img=Image.open("6X2.png")
print(img)
Value=np.array(img)
print(value)
\ No newline at end of file
import wordcloud
from PTL import Image
import numpy
with open('python二级考试大纲.txt',encoding='utf-8')as f:
text=f.read()
img=Image.open("bell.png")
w=wordcloud.wordcloud(background_color="red",
font_path='SimHei.ttf',
mask=date,color_func=img_colors)
w.generate(text)
w.generate("hello word")
w.to_file("mycloud.png")
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