stopwords-+40--
This commit is contained in:
parent
c8582b8ac8
commit
ad0ad2febe
|
@ -115,7 +115,7 @@ async def messages_routing(msg, state):
|
|||
toxic_score = detector(normalized_text)
|
||||
toxic_perc = math.floor(toxic_score * 100)
|
||||
if toxic_score < 0.9 and text != text.replace(' ', ''):
|
||||
if check_stopwords(normalized_text):
|
||||
if check_stopwords(normalized_text.replace(' ', '')):
|
||||
logger.info('stopword detected without spaces, toxicity +40%')
|
||||
toxic_perc += 40
|
||||
logger.info(f"\text: {normalized_text}\ntoxic: {toxic_perc}%")
|
||||
|
|
Loading…
Reference in New Issue
Block a user