Skip to content

Commit

Permalink
chore(spam-detection): Adjust threshold (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixpereira authored Dec 22, 2024
1 parent 6892bc7 commit 71e4133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/spam_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 71e4133

Please sign in to comment.