diff --git a/handlers/messages_routing.py b/handlers/messages_routing.py index 9bfe83d..7a2cf0f 100644 --- a/handlers/messages_routing.py +++ b/handlers/messages_routing.py @@ -117,8 +117,8 @@ async def messages_routing(msg, state): nospaces_text = text.replace(' ', '') nospaces_normalized_text = normalize(nospaces_text) - nospaces_text_score = detector(nospaces_normalized_text) - nospaces_segmented_text = segment_text(nospaces_text_score) + nospaces_segmented_text = segment_text(nospaces_normalized_text) + nospaces_text_score = detector(nospaces_segmented_text) nospaces_text_perc = math.floor(nospaces_text_score * 100) logger.info(f"\nnospaces_text: {text}\nnospaces_toxic: {toxic_perc}%")