Update server.py

This commit is contained in:
Namhyeon Go 2024-02-24 20:07:49 +09:00 committed by GitHub
parent 8209af0105
commit bdabc784d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -563,7 +563,7 @@ def calculate_vowel_ratio(s):
vowel_count = sum(1 for char in s if char.lower() in 'aeiouwy')
# Define vowel-ending patterns
vowel_ending_patterns = ['ang', 'eng', 'ing', 'ong', 'ung']
vowel_ending_patterns = ['ang', 'eng', 'ing', 'ong', 'ung', 'ank', 'ink', 'dge']
# Count the occurrences of vowel-ending patterns in the string.
vowel_count += sum(s.count(pattern) for pattern in vowel_ending_patterns)