diff --git a/handlers/messages_routing.py b/handlers/messages_routing.py index 79e3c9e..9bfe83d 100644 --- a/handlers/messages_routing.py +++ b/handlers/messages_routing.py @@ -116,12 +116,11 @@ async def messages_routing(msg, state): logger.info(f"\ntext: {text}\ntoxic: {toxic_perc}%") nospaces_text = text.replace(' ', '') - logger.info(f're-check this one: {nospaces_text}') nospaces_normalized_text = normalize(nospaces_text) - nospaces_text_score = detector(nospaces_nospaces_text) - nospaces_segmented_text = segment_text(nospaces_normalized_text) + nospaces_text_score = detector(nospaces_normalized_text) + nospaces_segmented_text = segment_text(nospaces_text_score) nospaces_text_perc = math.floor(nospaces_text_score * 100) - logger.info(f'no spaces text toxic: {nospaces_text_perc}%') + logger.info(f"\nnospaces_text: {text}\nnospaces_toxic: {toxic_perc}%") if (nospaces_text != text and nospaces_text_score > toxic_score) or nospaces_text_perc > 95: text_perc = nospaces_text_perc