parent
8a25a6d24a
commit
40da31154b
@ -1,19 +0,0 @@
|
|||||||
import wordcloud
|
|
||||||
import jieba
|
|
||||||
|
|
||||||
f= open('D:\danmucrawler\danmupapa\danmu.txt',encoding='utf-8')
|
|
||||||
text=f.read()
|
|
||||||
print(text)
|
|
||||||
llist=jieba.lcut(text)
|
|
||||||
string=''.join(llist)
|
|
||||||
wc=wordcloud.WordCloud(
|
|
||||||
width=1000,
|
|
||||||
height=500,
|
|
||||||
background_color='white',
|
|
||||||
font_path='msyh',
|
|
||||||
scale=15
|
|
||||||
|
|
||||||
)
|
|
||||||
wc.generate(string)
|
|
||||||
wc.to_file('ciyun.png')
|
|
||||||
|
|
Loading…
Reference in new issue