diff --git a/handlers/messages_routing.py b/handlers/messages_routing.py index 19beccf..18f7369 100644 --- a/handlers/messages_routing.py +++ b/handlers/messages_routing.py @@ -120,7 +120,7 @@ async def messages_routing(msg, state): await redis.set(f"toxic:{cid}", mid) await redis.set(f"toxic:{cid}:{uid}:{mid}", toxic_perc, ex=60 * 60 * 24 * 3) - if toxic_score > 0.81: + if toxic_score > 0.75: if toxic_score > 0.90: await redis.set(f"removed:{uid}:{cid}:{mid}", text) try: diff --git a/nlp/stopwords_detector.py b/nlp/stopwords_detector.py index f426884..ac8085b 100644 --- a/nlp/stopwords_detector.py +++ b/nlp/stopwords_detector.py @@ -1,6 +1,6 @@ stopwords = [] with open('nlp/stop_words.txt', 'r', encoding='utf-8') as file: - text = file.readlines() + stopwords = file.readlines() # Convert stopwords to a set for faster lookup stopword_set = set(stopwords)