Also cover consonant mutation
parent
6e9bbc134c
commit
53b5d85463
|
@ -3,7 +3,6 @@ Kılışlarolu dış güçlerin adamı
|
|||
Bunlar geldi de hastaneye gidebilir olduk
|
||||
Bor madenlerini işletmemize izin vermiyolar
|
||||
Sana ne gardaşım dolardan ekmeği dolarla mı alıyon
|
||||
Başımızda reis olmasaydı daha mı iyi olacak sankidi
|
||||
Çalıyo ama çalışıyo
|
||||
Ne güzel her yer hastane köprü oldu
|
||||
HDP iki koyun versen güdemez
|
||||
|
|
|
@ -4,6 +4,9 @@ import random
|
|||
from os import path
|
||||
|
||||
|
||||
VOWELS = set('aeıiouöü')
|
||||
|
||||
|
||||
def find_what_we_know():
|
||||
with open('{}/data/we_know'.format(
|
||||
path.dirname(path.realpath(__file__)))) as f:
|
||||
|
@ -31,10 +34,9 @@ def find_one_random(inputfile):
|
|||
|
||||
|
||||
def find_last_vowel(word):
|
||||
vowels = set('aeıiouöü')
|
||||
|
||||
for _, item in enumerate(word[::-1], 1):
|
||||
if item in vowels:
|
||||
if item in VOWELS:
|
||||
return item
|
||||
|
||||
raise ValueError('no vowels found, should not happen')
|
||||
|
@ -42,14 +44,28 @@ def find_last_vowel(word):
|
|||
|
||||
def format_suffix(chosen_thing):
|
||||
|
||||
# Covers a nice exception, consonant changes:
|
||||
# https://www.gravityturkish.com/manisa/conmut.htm
|
||||
lv = find_last_vowel(chosen_thing)
|
||||
if lv in 'aı':
|
||||
if chosen_thing[-1] not in VOWELS:
|
||||
if chosen_thing[-1] in 'fstkçşhp':
|
||||
return 'tı'
|
||||
return 'dı'
|
||||
if lv in 'uo':
|
||||
if chosen_thing[-1] not in VOWELS:
|
||||
if chosen_thing[-1] in 'fstkçşhp':
|
||||
return 'tu'
|
||||
return 'du'
|
||||
if lv in 'üö':
|
||||
if chosen_thing[-1] not in VOWELS:
|
||||
if chosen_thing[-1] in 'fstkçşhp':
|
||||
return 'tü'
|
||||
return 'dü'
|
||||
|
||||
if chosen_thing[-1] not in VOWELS:
|
||||
if chosen_thing[-1] in 'fstkçşhp':
|
||||
return 'ti'
|
||||
return 'di'
|
||||
|
||||
|
||||
|
|
|
@ -5,6 +5,10 @@ devlet zarardan çıkamaz
|
|||
her gün birileri ölür
|
||||
millet açlıktan sürünür
|
||||
devleti komple satarlar
|
||||
daha mı iyi olacak sanki?
|
||||
daha mı iyi olacak
|
||||
mafya düzeni gelir
|
||||
kürdistan'ı kurarlar
|
||||
ortalık karışacak
|
||||
devlet batacak
|
||||
amerika çoktan bizi işgal edecek
|
||||
ingiltere ülkeyi bölecek
|
||||
|
|
Loading…
Reference in New Issue