修复年度分析报告第二页溢出的问题#69

This commit is contained in:
shuaikangzhou
2023-12-06 21:29:12 +08:00
parent b3745867c6
commit b6f041b67a
7 changed files with 4774 additions and 4770 deletions

View File

@@ -26,7 +26,7 @@ def wordcloud(wxid):
# 统计词频
word_count = Counter(words)
# 过滤停用词
stopwords_file = './app/data/stopwords.txt'
stopwords_file = './app000/data/stopwords.txt'
try:
with open(stopwords_file, "r", encoding="utf-8") as stopword_file:
stopwords = set(stopword_file.read().splitlines())
@@ -65,7 +65,7 @@ def wordcloud(wxid):
'chart_data': w.dump_options_with_quotes(),
'keyword': keyword,
'max_num': str(max_num),
'dialogs': msg_db.get_messages_by_keyword(wxid, keyword, num=5)
'dialogs': msg_db.get_messages_by_keyword(wxid, keyword, num=5, max_len=12)
}