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