From 2504c623520fc762eb57dbd0d849110bb99e58f7 Mon Sep 17 00:00:00 2001 From: pfc8hp2r6 <2317678682@qq.com> Date: Sun, 15 Sep 2024 00:08:25 +0800 Subject: [PATCH] ADD file via upload --- ciyun.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ciyun.py diff --git a/ciyun.py b/ciyun.py new file mode 100644 index 0000000..dfee4ef --- /dev/null +++ b/ciyun.py @@ -0,0 +1,19 @@ +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') +