From ec47c230a91dd7d251870e203771562c56035f68 Mon Sep 17 00:00:00 2001 From: Relakkes Date: Fri, 9 Aug 2024 18:12:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20jieba=E6=97=A5=E5=BF=97=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=B8=BAwarning=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/words.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/words.py b/tools/words.py index 3ca0778..f875890 100644 --- a/tools/words.py +++ b/tools/words.py @@ -1,5 +1,6 @@ import asyncio import json +import logging from collections import Counter import aiofiles @@ -14,6 +15,7 @@ plot_lock = asyncio.Lock() class AsyncWordCloudGenerator: def __init__(self): + logging.getLogger('jieba').setLevel(logging.WARNING) self.stop_words_file = config.STOP_WORDS_FILE self.lock = asyncio.Lock() self.stop_words = self.load_stop_words()