added-fix

This commit is contained in:
2024-09-29 14:12:55 +03:00
parent 19a93d2443
commit 9c0d3cf4e1
2 changed files with 11 additions and 19 deletions

View File

@@ -72,16 +72,7 @@ def check_stopwords(text):
Examples:
>>> check_stopwords("this is a хуй")
40
>>> check_stopwords("this is clean")
0
>>> check_stopwords("хуй is a хуй")
80
>>> check_stopwords("clean is clean")
0
{'хуй'}
"""
# Normalize the text by splitting into words
@@ -90,10 +81,7 @@ def check_stopwords(text):
# Check for any intersection with stopword_set
stopwords_found = stopword_set.intersection(words)
# Calculate the score based on the number of stopwords found
score = 90 + len(stopwords_found)
return score
return stopwords_found
# Example usage
if __name__ == "__main__":