diff --git a/handlers/messages_routing.py b/handlers/messages_routing.py index fc8c407..d87e5bd 100644 --- a/handlers/messages_routing.py +++ b/handlers/messages_routing.py @@ -6,7 +6,7 @@ from bot.api import telegram_api from bot.config import FEEDBACK_CHAT_ID from handlers.handle_private import handle_private from nlp.toxicity_detector import detector -from nlp.normalize import normalize +# from nlp.normalize import normalize logger = logging.getLogger("handlers.messages_routing") @@ -87,7 +87,7 @@ async def messages_routing(msg, state): except: pass else: - toxic_score = detector(normalize(text)) + toxic_score = detector(text) toxic_perc = math.floor(toxic_score * 100) await redis.set(f"toxic:{cid}", mid) await redis.set(f"toxic:{cid}:{uid}:{mid}", toxic_perc, ex=60 * 60 * 24 * 3) diff --git a/nlp/normalize.py b/nlp/normalize.py index 0229554..9e06230 100644 --- a/nlp/normalize.py +++ b/nlp/normalize.py @@ -73,7 +73,7 @@ def normalize(text): ) return normalized_text - + logger.debug('normalized: ', t) return t