From be62c0356ddd667dcd89b33558dcdb39032381c5 Mon Sep 17 00:00:00 2001 From: ptkbf2lr5 <18759452262@163.com> Date: Wed, 18 Sep 2024 19:59:31 +0800 Subject: [PATCH] Update select_content.py --- select_content.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/select_content.py b/select_content.py index 511ea36..30f7c32 100644 --- a/select_content.py +++ b/select_content.py @@ -5,10 +5,10 @@ from collections import Counter with open('all_content.txt', mode='r', encoding='utf-8') as f: data_list = f.readlines() # AI技术应用有关关键词 -keywords = ['AI','人工智能','ai音效','ai视频','ai技术','机器学习', '深度学习', '自然语言处理','ai训练', - '大模型','自然语言处理','云计算','神经网络', '自动驾驶','ai设计','ai图','ai软件',] +ai_keywords = ['AI','人工智能','ai音效','ai视频','ai技术','机器学习', '深度学习', '自然语言处理','ai训练', + '大模型','自然语言处理','云计算','神经网络', '自动驾驶','ai设计','ai图','AI软件',] # 筛选有关AI的弹幕 -selectdanmu = [danmu for danmu in data_list if any(keyword in danmu for keyword in keywords)] +selectdanmu = [danmu for danmu in data_list if any(keyword in danmu for keyword in ai_keywords)] # 统计弹幕数量 num = Counter(selectdanmu)