nosegm5
This commit is contained in:
parent
5a6a48c41c
commit
a7abe92d3c
|
@ -114,7 +114,7 @@ async def messages_routing(msg, state):
|
|||
toxic_score = detector(normalized_text)
|
||||
toxic_perc = math.floor(toxic_score * 100)
|
||||
logger.info(f"\text: {normalized_text}\ntoxic: {toxic_perc}%")
|
||||
if check_stopwords(normalized_text):
|
||||
if len(text) != len(normalized_text) and check_stopwords(normalized_text):
|
||||
logger.info('stopword detected with no spaces, toxicity +40%')
|
||||
toxic_perc += 40
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user