From 20ec1cb693fc3acbf6b1d2c78aee3f538ac49c6a Mon Sep 17 00:00:00 2001 From: Phoenix Isaac Pereira Date: Mon, 23 Dec 2024 09:54:02 +1030 Subject: [PATCH] chore(spam-detection): Adjust threshold --- src/utils/spam_detection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/spam_detection.py b/src/utils/spam_detection.py index 69dec0f..153dbbf 100644 --- a/src/utils/spam_detection.py +++ b/src/utils/spam_detection.py @@ -26,7 +26,7 @@ ] -def is_spam(input_message, spam_messages, threshold=0.2): +def is_spam(input_message, spam_messages, threshold=0.3): """ Detects if the input message is similar to known spam messages based on Levenshtein distance. The distance is normalised, so it ranges from 0 (exact match) to 1 (completely different).