Updated has_10_words to has_50_words
This commit is contained in:
@@ -94,11 +94,11 @@ def has_words(text: str):
|
||||
words_in_input = text.split()
|
||||
return any(word.lower() in english_words for word in words_in_input)
|
||||
|
||||
def has_10_words(text: str):
|
||||
def has_50_words(text: str):
|
||||
english_words = set(words.words())
|
||||
words_in_input = text.split()
|
||||
english_word_count = sum(1 for word in words_in_input if word.lower() in english_words)
|
||||
return english_word_count >= 10
|
||||
return english_word_count >= 50
|
||||
|
||||
def divide_text(text, max_length=3000):
|
||||
if len(text) <= max_length:
|
||||
|
||||
Reference in New Issue
Block a user