diff --git a/word_cloud.py b/word_cloud.py new file mode 100644 index 0000000..e859a26 --- /dev/null +++ b/word_cloud.py @@ -0,0 +1,55 @@ +""" + 说明:写入execl,生成词云图 +""" +# import pandas as pd +from wordcloud import WordCloud +import matplotlib.pyplot as plt +from collections import Counter +import openpyxl +import jieba +import re +from bullet_screen import get_bullet_screen +from bv_maker import get_bv, BV_NUM +jieba.setLogLevel(jieba.logging.INFO) + +def confirm(bullet): + keywords = ['人工智能', 'AI', '机器学习', '深度学习', '神经网络', '自动驾驶', '自然语言处理', '智能', 'ai'] # 设置AI应用关键词 + bullet = bullet.lower() + obj = r'(?