def isVowel(letter): # Sesli harf kontrolu burada, kodun direkt içine dahil edin iki fonksiyonu da
vowels = ["a", "e", "ı", "i", "o", "ö", "u", "ü"]
return letter.lower() in vowels
def isRandom(sentence): # Random kontrolu burada, mesaj alındığında çalışan fonksiyonla beraber kullanabilirsiniz
escapes = [" ", ".", "!", "?"] # Dahil edilmeyecek karakterler
consecutive_count = 1
for i in range(1, len(sentence)):
if isVowel(sentence[i]) == isVowel(sentence[i - 1]) and sentence[i] not in escapes:
consecutive_count += 1
if consecutive_count > 4:
return True
else:
consecutive_count = 1
return False