修复数据库初始化问题、删除过时的数据库格式方法、修复空停用词错误。

This commit is contained in:
Doiiars
2025-11-05 14:40:07 +08:00
parent a8249c468c
commit 22ed16e00e
5 changed files with 96 additions and 260 deletions
@@ -35,6 +35,8 @@ class AsyncWordCloudGenerator:
jieba.add_word(word)
def load_stop_words(self):
if not os.path.exists(self.stop_words_file):
return set()
with open(self.stop_words_file, 'r', encoding='utf-8') as f:
return set(f.read().strip().split('\n'))