added-fix
This commit is contained in:
@@ -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__":
|
||||
|
Reference in New Issue
Block a user