From 89fb7988302a15f91ce1b39e35c1ffa3be9969e9 Mon Sep 17 00:00:00 2001 From: py6qo2c5g <457171044@qq.com> Date: Wed, 18 Sep 2024 19:32:00 +0800 Subject: [PATCH] ADD file via upload --- 3.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 3.py diff --git a/3.py b/3.py new file mode 100644 index 0000000..129c32b --- /dev/null +++ b/3.py @@ -0,0 +1,8 @@ +def count_danmaku(danmaku_list): + ai_keywords = ['AI', 'ai', 'AI分析', 'AI识别', 'AI优化','人工智能'] + count_dict = {keyword: 0 for keyword in ai_keywords} + for danmaku in danmaku_list: + for keyword in ai_keywords: + if keyword in danmaku: + count_dict[keyword] += 1 + return count_dict