This commit is contained in:
2024-09-29 09:55:58 +03:00
parent 22ed5f6335
commit 338f8584db
3 changed files with 4 additions and 17 deletions

View File

@@ -17,7 +17,7 @@ def check_stopwords(text, stopwords):
bool: True if any stopword is found in the text, False otherwise.
"""
# Normalize the text by converting it to lower case and splitting into words
words = text.lower().split()
words = text.replace(' ', '').lower().split()
# Iterate through each word and check for stopwords
for word in words: