From 154cb36f16d9c796b2aec7140488b8a255f0061b Mon Sep 17 00:00:00 2001 From: p9bwcp862 <2234458131@qq.com> Date: Wed, 18 Sep 2024 12:10:11 +0800 Subject: [PATCH] ADD file via upload --- py2.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 py2.py diff --git a/py2.py b/py2.py new file mode 100644 index 0000000..48045e1 --- /dev/null +++ b/py2.py @@ -0,0 +1,14 @@ +import jieba #结巴分词pip install jieba +import wordcloud #制作词云图 +import imageio #读取本地图片,修改词云图形 + +f = open('D:/弹幕.txt','r',encoding='UTF-8') +lines = f.readlines() +for line in lines: + if "ai" in line: + f1=open('D:/AI.csv','a',encoding='UTF-8') + f1.write(line) +f.close() + + + \ No newline at end of file