mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 09:32:53 -06:00
nounverbadjmorphoandsuffixmodule
This commit is contained in:
@@ -7,14 +7,28 @@ concrete CatTur of Cat = CommonX ** open ResTur, Prelude in {
|
|||||||
-- Noun
|
-- Noun
|
||||||
CN = {s : Number => Case => Str} ;
|
CN = {s : Number => Case => Str} ;
|
||||||
NP = {s : Case => Str ; a : Agr} ;
|
NP = {s : Case => Str ; a : Agr} ;
|
||||||
|
|
||||||
Pron = ResTur.Pron ;
|
Pron = ResTur.Pron ;
|
||||||
Det = {s : Str; n : Number} ;
|
Det = {s : Str; n : Number} ;
|
||||||
Num = {s : Str; n : Number} ;
|
Num = {s : Str; n : Number} ;
|
||||||
Card = {s : Str} ;
|
Card = {s : Str} ;
|
||||||
|
Ord = {s : Str} ;
|
||||||
Quant = {s : Str} ;
|
Quant = {s : Str} ;
|
||||||
|
Prep = {s : Str} ;
|
||||||
|
|
||||||
|
Numeral = {s : CardOrd => Str ; n : Number} ;
|
||||||
|
Digits = {s : CardOrd => Str ; n : Number; tail : DTail} ;
|
||||||
|
|
||||||
-- Open lexical classes, e.g. Lexicon
|
-- Open lexical classes, e.g. Lexicon
|
||||||
V, VS, VQ, VA = Verb ;
|
V, VS, VQ, VA = Verb ;
|
||||||
|
V2, V2Q, V2V, V2A, V2S = Verb ** {c : Case; p : Prep} ;
|
||||||
|
V3 = Verb ** {c1 : Case; p1 : Prep; c2 : Case; p2 : Prep} ;
|
||||||
|
|
||||||
|
A = Noun ;
|
||||||
|
A2 = Noun ** {c : Case; p : Prep} ;
|
||||||
|
|
||||||
N = Noun ;
|
N = Noun ;
|
||||||
N2 = Noun ;
|
N2 = Noun ** {c : Case} ;
|
||||||
|
N3 = Noun ** {c1 : Case; c2 : Case} ;
|
||||||
|
PN = Noun ;
|
||||||
}
|
}
|
||||||
@@ -1,69 +1,351 @@
|
|||||||
--# -path=.:prelude
|
--# -path=.:prelude
|
||||||
|
|
||||||
concrete LexiconTur of Lexicon = CatTur **
|
concrete LexiconTur of Lexicon = CatTur **
|
||||||
open ResTur, ParadigmsTur, Prelude in {
|
open ResTur, ParadigmsTur, Prelude, StructuralTur, IrregTur in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
coding=utf8;
|
coding=utf8;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
airplane_N = regN "uçak" ;
|
--Nouns
|
||||||
apartment_N = regN "apartman" ;
|
airplane_N = mkN "uçak" ;
|
||||||
art_N = regN "sanat" ;
|
animal_N = mkN "hayvan" ;
|
||||||
beer_N = regN "bira" ;
|
apartment_N = mkN "apartman" ;
|
||||||
boat_N = regN "gemi" ;
|
apple_N = mkN "elma" ;
|
||||||
book_N = regN "kitap" ;
|
art_N = mkN "sanat" "sanat" ;
|
||||||
boot_N = regN "ayakkabı" ;
|
ashes_N = mkN "kül" ;
|
||||||
boss_N = regN "şef" ;
|
baby_N = mkN "bebek" ;
|
||||||
bread_N = regN "ekmek" ;
|
back_N = mkN "sırt" "sırt" ;
|
||||||
brother_N2 = regN "kardeş" ;
|
bank_N = mkN "banka" ;
|
||||||
butter_N = regN "yağ" ;
|
bark_N = mkN "havlama" ;
|
||||||
cap_N = regN "şapka" ;
|
beer_N = mkN "bira" ;
|
||||||
car_N = regN "araba" ;
|
belly_N = mkN "göbek" ;
|
||||||
carpet_N = regN "kilim" ;
|
bike_N = mkN "bisiklet" "bisiklet" ;
|
||||||
cat_N = regN "kedi" ;
|
bird_N = mkN "kuş" ;
|
||||||
child_N = regN "çocuk" ;
|
blood_N = mkN "kan" ;
|
||||||
city_N = regN "şehir" ;
|
boat_N = mkN "tekne" ;
|
||||||
coat_N = regN "kazak" ;
|
bone_N = mkN "kemik" ;
|
||||||
come_V = regV "gelmek" ;
|
book_N = mkN "kitap" ;
|
||||||
father_N2 = regN "baba" ;
|
boot_N = mkN "çizme" ;
|
||||||
go_V = regV "gitmek" ;
|
boss_N = mkN "patron" ;
|
||||||
house_N = regN "ev" ;
|
boy_N = mkN "oğlan" ;
|
||||||
mother_N2 = regN "anne" ;
|
bread_N = mkN "ekmek" ;
|
||||||
pen_N = regN "kalem" ;
|
breast_N = mkN "göğüs" ;
|
||||||
run_V = regV "koşmek" ;
|
brother_N2 = mkN2 "kardeş" ;
|
||||||
stop_V = regV "durmak" ;
|
butter_N = mkN (mkN "tere") oil_N ;
|
||||||
table_N = regN "masa" ;
|
camera_N = mkN (mkN "fotoğraf") (mkN "makine") Sep ;
|
||||||
television_N = regN "televizyon" ;
|
cap_N = mkN "şapka" ;
|
||||||
tree_N = regN "ağaç" ;
|
car_N = mkN "araba" ;
|
||||||
woman_N = regN "kadın" ;
|
carpet_N = mkN "halı" ;
|
||||||
wood_N = regN "kereste" ;
|
cat_N = mkN "kedi" ;
|
||||||
song_N = regN "şarkı" ;
|
ceiling_N = mkN "tavan" ;
|
||||||
back_N = regN "sırt" ;
|
chair_N = mkN "sandalye" ;
|
||||||
belly_N = regN "göbek" ;
|
cheese_N = mkN "peynir" ;
|
||||||
day_N = regN "gün" ;
|
child_N = mkN "çocuk" ;
|
||||||
ear_N = regN "kulak" ;
|
church_N = mkN "kilise" ;
|
||||||
egg_N = regN "yumurta" ;
|
city_N = mkN "kent" "kent" ;
|
||||||
eye_N = regN "göz" ;
|
cloud_N = mkN "bulut" "bulut" ;
|
||||||
fire_N = regN "ateş" ;
|
coat_N = mkN "palto" ;
|
||||||
flower_N = regN "çiçek" ;
|
computer_N = mkN "bilgisayar" ;
|
||||||
grass_N = regN "çimen" ;
|
country_N = mkN "ülke" ;
|
||||||
hand_N = regN "kol" ;
|
cousin_N = mkN "kuzen" ;
|
||||||
head_N = regN "baş" ;
|
cow_N = mkN "inek" ;
|
||||||
heart_N = regN "kalp" ;
|
day_N = mkN "gün" ;
|
||||||
husband_N = regN "eş" ;
|
distance_N3 = mkN3 "uzaklık" ;
|
||||||
ice_N = regN "buz" ;
|
doctor_N = mkN "doktor" ;
|
||||||
leg_N = regN "bacak" ;
|
dog_N = mkN "köpek" ;
|
||||||
mouth_N = regN "agız" ;
|
door_N = mkN "kapı" ;
|
||||||
name_N = regN "ad" ;
|
dust_N = mkN "toz" ;
|
||||||
night_N = regN "gece" ;
|
ear_N = mkN "kulak" ;
|
||||||
nose_N = regN "burun" ;
|
earth_N = mkN "yeryüzü" ;
|
||||||
salt_N = regN "tuz" ;
|
egg_N = mkN "yumurta" ;
|
||||||
sand_N = regN "kum" ;
|
enemy_N = mkN "düşman" ;
|
||||||
snow_N = regN "kar" ;
|
eye_N = mkN "göz" ;
|
||||||
tail_N = regN "kuyruk" ;
|
factory_N = mkN "fabrika" ;
|
||||||
tooth_N = regN "diş" ;
|
father_N2 = mkN2 "baba" ;
|
||||||
wife_N = regN "eş" ;
|
fat_N = mkN "yağ" ;
|
||||||
year_N = regN "sene" ;
|
feather_N = mkN "tüy" ;
|
||||||
reason_N = regN "mazaret" ;
|
fingernail_N = mkN "tırnak" ;
|
||||||
} ;
|
fire_N = mkN "ateş" ;
|
||||||
|
fish_N = mkN "balık" ;
|
||||||
|
floor_N = mkN "zemin" ;
|
||||||
|
flower_N = mkN "çiçek" ;
|
||||||
|
fog_N = mkN "sis" ;
|
||||||
|
foot_N = mkN "ayak" ;
|
||||||
|
forest_N = mkN "orman" ;
|
||||||
|
fridge_N = mkN ice_N (mkN "dolap") ;
|
||||||
|
friend_N = mkN "arkadaş" ;
|
||||||
|
fruit_N = mkN "meyve" ;
|
||||||
|
garden_N = mkN "bahçe" ;
|
||||||
|
girl_N = mkN "kız" ;
|
||||||
|
glove_N = mkN "eldiven" ;
|
||||||
|
gold_N = mkN "altın" ;
|
||||||
|
grammar_N = mkN language_N (mkN "bilgi") ;
|
||||||
|
grass_N = mkN "çim" ;
|
||||||
|
guts_N = mkN "cesaret" "cesaret" ;
|
||||||
|
hair_N = mkN "saç" "saç" ;
|
||||||
|
hand_N = mkN "el" ;
|
||||||
|
harbour_N = mkN "liman" ;
|
||||||
|
hat_N = mkN "şapka" ;
|
||||||
|
head_N = mkN "baş" ;
|
||||||
|
heart_N = mkN "yürek" ;
|
||||||
|
hill_N = mkN "tepe" ;
|
||||||
|
horn_N = mkN "boynuz" ;
|
||||||
|
horse_N = mkN "at" "at" ;
|
||||||
|
house_N = mkN "ev" ;
|
||||||
|
husband_N = mkN "koca" ;
|
||||||
|
ice_N = mkN "buz" ;
|
||||||
|
industry_N = mkN "endüstri" ;
|
||||||
|
iron_N = mkN "demir" ;
|
||||||
|
king_N = mkN "kral" ;
|
||||||
|
knee_N = mkN "diz" ;
|
||||||
|
lake_N = mkN "göl" ;
|
||||||
|
lamp_N = mkN "lamba" ;
|
||||||
|
language_N = mkN "dil" ;
|
||||||
|
leaf_N = mkN "yaprak" ;
|
||||||
|
leather_N = mkN "deri" ;
|
||||||
|
leg_N = mkN "bacak" ;
|
||||||
|
liver_N = mkN "karaciğer" ;
|
||||||
|
louse_N = mkN "bit" "bit" ;
|
||||||
|
love_N = mkN "aşk" "aşk" ;
|
||||||
|
man_N = mkN "adam" ;
|
||||||
|
meat_N = mkN "et" "et" ;
|
||||||
|
milk_N = mkN "süt" "süt" ;
|
||||||
|
moon_N = mkN "ay" ;
|
||||||
|
mother_N2 =mkN2 "anne" ;
|
||||||
|
mountain_N = mkN "dağ" ;
|
||||||
|
mouth_N = mkN "ağız" "ağz" ;
|
||||||
|
music_N = mkN "müzik" ;
|
||||||
|
name_N = mkN "ad" ;
|
||||||
|
neck_N = mkN "boyun" "boyn" ;
|
||||||
|
newspaper_N = mkN "gazete" ;
|
||||||
|
night_N = mkN "gece" ;
|
||||||
|
nose_N = mkN "burun" "burn" ;
|
||||||
|
number_N = mkN "sayı" ;
|
||||||
|
oil_N = mkN "yağ" ;
|
||||||
|
paper_N = mkN "kağıt" ;
|
||||||
|
peace_N = mkN "barış" ;
|
||||||
|
pen_N = mkN "tükenmez kalem" ;
|
||||||
|
person_N = mkN "kişi" ;
|
||||||
|
planet_N = mkN "gezegen" ;
|
||||||
|
plastic_N = mkN "plastik" ;
|
||||||
|
policeman_N = mkN "polis" ;
|
||||||
|
priest_N = mkN "rahip" ;
|
||||||
|
queen_N = mkN "kraliçe" ;
|
||||||
|
question_N = mkN "soru" ;
|
||||||
|
radio_N = mkN "radyo" ;
|
||||||
|
rain_N = mkN "yağmur" ;
|
||||||
|
reason_N = mkN "neden" ;
|
||||||
|
religion_N = mkN "din" ;
|
||||||
|
restaurant_N = mkN "restoran" ;
|
||||||
|
river_N = mkN "ırmak" ;
|
||||||
|
road_N = mkN "yol" ;
|
||||||
|
rock_N = mkN "kaya" ;
|
||||||
|
roof_N = mkN "çatı" ;
|
||||||
|
root_N = mkN "kök" "kök" ;
|
||||||
|
rope_N = mkN "ip" "ip" ;
|
||||||
|
rubber_N = mkN "kauçuk" ;
|
||||||
|
rule_N = mkN "kural" ;
|
||||||
|
salt_N = mkN "tuz" ;
|
||||||
|
sand_N = mkN "kum" ;
|
||||||
|
school_N = mkN "okul" ;
|
||||||
|
science_N = mkN "bilim" ;
|
||||||
|
sea_N = mkN "deniz" ;
|
||||||
|
seed_N = mkN "tohum" ;
|
||||||
|
sheep_N = mkN "koyun" ;
|
||||||
|
ship_N = mkN "gemi" ;
|
||||||
|
shirt_N = mkN "gömlek" ;
|
||||||
|
shoe_N = mkN foot_N (mkN "kap") ;
|
||||||
|
shop_N = mkN "dükkan" ;
|
||||||
|
silver_N = mkN "gümüş" ;
|
||||||
|
sister_N = mkN "kız kardeş" ;
|
||||||
|
skin_N = mkN "deri" ;
|
||||||
|
sky_N = mkN "gök" ;
|
||||||
|
smoke_N = mkN "duman" ;
|
||||||
|
snake_N = mkN "yılan" ;
|
||||||
|
snow_N = mkN "kar" ;
|
||||||
|
sock_N = mkN "çorap" ;
|
||||||
|
song_N = mkN "şarkı" ;
|
||||||
|
star_N = mkN "yıldız" ;
|
||||||
|
steel_N = mkN "çelik" ;
|
||||||
|
stick_N = mkN "çubuk" ;
|
||||||
|
stone_N = mkN "taş" ;
|
||||||
|
stove_N = mkN "ocak" ;
|
||||||
|
student_N = mkN "öğrenci" ;
|
||||||
|
sun_N = mkN "güneş" ;
|
||||||
|
table_N = mkN "masa" ;
|
||||||
|
tail_N = mkN "kuyruk" ;
|
||||||
|
teacher_N = mkN "öğretmen" ;
|
||||||
|
television_N = mkN "televizyon" ;
|
||||||
|
tongue_N = mkN "dil" ;
|
||||||
|
tooth_N = mkN "diş" ;
|
||||||
|
train_N = mkN "tren" ;
|
||||||
|
tree_N = mkN "ağaç" ;
|
||||||
|
university_N = mkN "üniversite" ;
|
||||||
|
village_N = mkN "köy" ;
|
||||||
|
war_N = mkN "savaş" ;
|
||||||
|
water_N = mkN "su" "suy" ;
|
||||||
|
wife_N = mkN "eş" ;
|
||||||
|
wind_N = mkN "rüzgar" ;
|
||||||
|
window_N = mkN "pencere" ;
|
||||||
|
wine_N = mkN "şarap" ;
|
||||||
|
wing_N = mkN "kanat" ;
|
||||||
|
woman_N = mkN "kadın" ;
|
||||||
|
wood_N = mkN "odun" ; -- woodland = koru
|
||||||
|
worm_N = mkN "kurtçuk" ;
|
||||||
|
year_N = mkN "yıl" ;
|
||||||
|
--Proper Nouns
|
||||||
|
john_PN = regPN "John" ;
|
||||||
|
paris_PN = regPN "Paris" ;
|
||||||
|
--Adjectives
|
||||||
|
bad_A = mkN "kötü" ;
|
||||||
|
beautiful_A = mkN "güzel" ;
|
||||||
|
big_A = mkN "büyük" ;
|
||||||
|
black_A = mkN "kara" ;
|
||||||
|
blue_A = mkN "mavi" ;
|
||||||
|
broad_A = mkN "geniş" ;
|
||||||
|
brown_A = mkN (mkN "kahve") (mkN "renk") ;
|
||||||
|
clean_A = mkN "temiz" ;
|
||||||
|
clever_A = mkN "zeki" ;
|
||||||
|
cold_A = mkN "soğuk" ;
|
||||||
|
correct_A = mkN "doğru" ;
|
||||||
|
dirty_A = mkN "kirli" ;
|
||||||
|
dry_A = mkN "kuru" ;
|
||||||
|
dull_A = mkN "sıkıcı" ;
|
||||||
|
empty_A = mkN "boş" ;
|
||||||
|
full_A = mkN "dolu" ;
|
||||||
|
good_A = mkN "iyi" ;
|
||||||
|
green_A = mkN "yeşil" ;
|
||||||
|
heavy_A = mkN "ağır" ;
|
||||||
|
hot_A = mkN "sıcak" ;
|
||||||
|
important_A = mkN "önemli" ;
|
||||||
|
long_A = mkN "uzun" ;
|
||||||
|
narrow_A = mkN "dar" ;
|
||||||
|
near_A = mkN "yakın" ;
|
||||||
|
new_A = mkN "yeni" ;
|
||||||
|
old_A = mkN "eski" ;
|
||||||
|
ready_A = mkN "hazır" ;
|
||||||
|
red_A = mkN "kırmızı" ;
|
||||||
|
rotten_A = mkN "çürük" ;
|
||||||
|
round_A = mkN "yuvarlak" ;
|
||||||
|
sharp_A = mkN "keskin" ;
|
||||||
|
short_A = mkN "kısa" ;
|
||||||
|
small_A = mkN "küçük" ;
|
||||||
|
smooth_A = mkN "pürüzsüz" ;
|
||||||
|
straight_A = mkN "düz" ;
|
||||||
|
stupid_A = mkN "aptal" ;
|
||||||
|
thick_A = mkN "kalın" ;
|
||||||
|
thin_A = mkN "ince" ;
|
||||||
|
ugly_A = mkN "çirkin" ;
|
||||||
|
uncertain_A = mkN "kuşkulu" ;
|
||||||
|
warm_A = mkN "ılık" ;
|
||||||
|
wet_A = mkN "ıslak" ;
|
||||||
|
white_A = mkN "ak" "ak" ;
|
||||||
|
wide_A = mkN "geniş" ;
|
||||||
|
yellow_A = mkN "sarı" ;
|
||||||
|
young_A = mkN "genç" ;
|
||||||
|
married_A2 = mkA2 (mkN "evli") with_Prep ;
|
||||||
|
--Verbs
|
||||||
|
add_V3 = mkV3 (mkV "eklemek") ;
|
||||||
|
answer_V2S = mkV2 (mkV "yanıtlamak") ;
|
||||||
|
ask_V2Q = mkV2 (mkV "sormak") ;
|
||||||
|
become_VA = mkV "olmak" SgSylConIrreg ;
|
||||||
|
beg_V2V = mkV2 (mkV "dilemek") ;
|
||||||
|
bite_V2 = mkV2 (mkV "ısırmak") ;
|
||||||
|
blow_V = mkV "esmek" ;
|
||||||
|
break_V2 = mkV2 (mkV "kırmak") ;
|
||||||
|
breathe_V = mkV "nefes almak" ;
|
||||||
|
burn_V = mkV "yakmak" ;
|
||||||
|
buy_V2 = mkV2 (mkV "satın almak") ;
|
||||||
|
close_V2 = mkV2 (mkV "kapatmak") ;
|
||||||
|
come_V = mkV "gelmek" SgSylConIrreg ;
|
||||||
|
count_V2 = mkV2 (mkV "saymak") ;
|
||||||
|
cut_V2 = mkV2 (mkV "kesmek") ;
|
||||||
|
die_V = mkV "ölmek" SgSylConIrreg ;
|
||||||
|
dig_V = mkV "kazmak" ;
|
||||||
|
do_V2 = mkV2 (mkV "yapmak") ;
|
||||||
|
drink_V2 = mkV2 (mkV "içmek") ;
|
||||||
|
eat_V2 = mkV2 (mkV "yemek" "yemek" "yimek") ;
|
||||||
|
fall_V = mkV "düşmek" ;
|
||||||
|
fear_VS = mkV "korkmak" ;
|
||||||
|
fear_V2 = mkV2 IrregTur.fear_V Ablat;
|
||||||
|
fight_V2 = mkV2 (mkV "dövüşmek") Dat against_Prep;
|
||||||
|
find_V2 = mkV2 (mkV "bulmak" SgSylConIrreg) ;
|
||||||
|
float_V = mkV "yüzmek" ;
|
||||||
|
flow_V = mkV "akmak" ;
|
||||||
|
fly_V = mkV "uçmak" ;
|
||||||
|
forget_V2 = mkV2 (mkV "unutmak") ;
|
||||||
|
freeze_V = mkV "donmak" ;
|
||||||
|
give_V3 = mkV3 (mkV "vermek" SgSylConIrreg) ;
|
||||||
|
go_V = mkV "gitmek" "gidmek" ;
|
||||||
|
hate_V2 = mkV2 IrregTur.hate_V Ablat;
|
||||||
|
hear_V2 = mkV2 (mkV "duymak") ;
|
||||||
|
hit_V2 = mkV2 IrregTur.hit_V Dat;
|
||||||
|
hold_V2 = mkV2 (mkV "tutmak") ;
|
||||||
|
hope_VS = mkV "ummak" ;
|
||||||
|
hunt_V2 = mkV2 (mkV "avlamak") ;
|
||||||
|
jump_V = mkV "zıplamak" ;
|
||||||
|
kill_V2 = mkV2 (mkV "öldürmek") ;
|
||||||
|
know_V2 = mkV2 (mkV "bilmek" SgSylConIrreg) ;
|
||||||
|
know_VS = mkV "bilmek" ;
|
||||||
|
laugh_V = mkV "gülmek" ;
|
||||||
|
learn_V2 = mkV2 (mkV "öğrenmek") ;
|
||||||
|
leave_V2 = mkV2 IrregTur.leave_V Ablat;
|
||||||
|
lie_V = mkV "yalan" soyle_Aux ;
|
||||||
|
like_V2 = mkV2 IrregTur.like_V Ablat;
|
||||||
|
listen_V2 = mkV2 (mkV "dinlemek") ;
|
||||||
|
live_V = mkV "yaşamak" ;
|
||||||
|
lose_V2 = mkV2 (mkV "yitirmek") ;
|
||||||
|
love_V2 = mkV2 (mkV "sevmek") ;
|
||||||
|
open_V2 = mkV2 (mkV "açmak") ;
|
||||||
|
paint_V2A = mkV2 (mkV "boyamak") ;
|
||||||
|
play_V2 = mkV2 (mkV "oynatmak") ;
|
||||||
|
play_V = mkV "oynamak" ;
|
||||||
|
pull_V2 = mkV2 (mkV "çekmek") ;
|
||||||
|
push_V2 = mkV2 (mkV "itmek") ;
|
||||||
|
put_V2 = mkV2 (mkV "koymak") ;
|
||||||
|
rain_V0 = mkV "yağmak" ;
|
||||||
|
read_V2 = mkV2 (mkV "okumak") ;
|
||||||
|
rub_V2 = mkV2 (mkV "sürtmek") ;
|
||||||
|
run_V = mkV "koşmak" ;
|
||||||
|
say_VS = mkV "demek" "demek" "dimek" ;
|
||||||
|
scratch_V2 = mkV2 (mkV "kaşımak") ;
|
||||||
|
seek_V2 = mkV2 (mkV "aramak") ;
|
||||||
|
see_V2 = mkV2 (mkV "görmek" SgSylConIrreg) ;
|
||||||
|
sell_V3 = mkV3 (mkV "satmak") ;
|
||||||
|
send_V3 = mkV3 (mkV "yollamak") ;
|
||||||
|
sew_V = mkV "dikmek" ;
|
||||||
|
sing_V = mkV "şarkı" soyle_Aux ;
|
||||||
|
sit_V = mkV "oturmak" ;
|
||||||
|
sleep_V = mkV "uyumak" ;
|
||||||
|
smell_V = mkV "kokmak" ;
|
||||||
|
speak_V2 = mkV2 (mkV "konuşmak") ;
|
||||||
|
spit_V = mkV "tükürmek" ;
|
||||||
|
split_V2 = mkV2 (mkV "ayırmak") ;
|
||||||
|
squeeze_V2 = mkV2 (mkV "sıkmak") ;
|
||||||
|
stab_V2 = mkV2 (mkV "saplamak") ;
|
||||||
|
stand_V = mkV "dikilmek" ;
|
||||||
|
stop_V = mkV "durmak" SgSylConIrreg ;
|
||||||
|
suck_V2 = mkV2 (mkV "emmek") ;
|
||||||
|
swell_V = mkV "şişmek" ;
|
||||||
|
swim_V = mkV "yüzmek" ;
|
||||||
|
switch8off_V2 = mkV2 (mkV "kapatmak") ;
|
||||||
|
switch8on_V2 = mkV2 (mkV "açmak") ;
|
||||||
|
talk_V3 = mkV3 (mkV "konuşmak") Acc no_Prep Acc with_Prep ;
|
||||||
|
teach_V2 = mkV2 (mkV "öğretmek") ;
|
||||||
|
think_V = mkV "düşünmek" ;
|
||||||
|
throw_V2 = mkV2 (mkV "atmak") ;
|
||||||
|
tie_V2 = mkV2 (mkV "bağlamak") ;
|
||||||
|
travel_V = mkV "seyahat" et_Aux ;
|
||||||
|
turn_V = mkV "dönmek" ;
|
||||||
|
understand_V2 = mkV2 (mkV "anlamak") ;
|
||||||
|
vomit_V = mkV "kusmak" ;
|
||||||
|
wait_V2 = mkV2 (mkV "beklemek") ;
|
||||||
|
walk_V = mkV "yürümek" ;
|
||||||
|
wash_V2 = mkV2 (mkV "yıkamak") ;
|
||||||
|
watch_V2 = mkV2 (mkV "izlemek") ;
|
||||||
|
win_V2 = mkV2 (mkV "kazanmak") ;
|
||||||
|
wipe_V2 = mkV2 (mkV "silmek") ;
|
||||||
|
wonder_VQ = mkV "merak" et_Aux ;
|
||||||
|
write_V2 = mkV2 (mkV "yazmak") ;
|
||||||
|
}
|
||||||
|
|||||||
@@ -20,7 +20,11 @@ concrete NounTur of Noun = CatTur ** open ResTur, Prelude in {
|
|||||||
|
|
||||||
NumCard n = n ** {n = Sg} ;
|
NumCard n = n ** {n = Sg} ;
|
||||||
|
|
||||||
NumNumeral numeral = {s = numeral.s} ;
|
NumNumeral numeral = {s = numeral.s ! NCard} ;
|
||||||
|
|
||||||
|
OrdDigits dig = {s = dig.s ! NOrd} ;
|
||||||
|
OrdNumeral num = {s = num.s ! NOrd} ;
|
||||||
|
OrdSuperl a = {s = "daha" ++ a.s ! Sg ! Nom} ;
|
||||||
|
|
||||||
DefArt = {
|
DefArt = {
|
||||||
s = []
|
s = []
|
||||||
|
|||||||
@@ -1,37 +1,79 @@
|
|||||||
concrete NumeralTur of Numeral = CatTur ** open ResTur in {
|
--# -path=.:../abstract:../common:../../prelude
|
||||||
|
|
||||||
|
concrete NumeralTur of Numeral = CatTur ** open Prelude, ResTur, ParadigmsTur in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
coding = utf8 ;
|
coding = utf8 ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Digit = {s : DForm => Str} ;
|
Digit = {s : DForm => CardOrd => Str} ;
|
||||||
Sub10 = {s : DForm => Str ; n : Number} ;
|
Sub10 = {s : DForm => CardOrd => Str ; n : Number ; blank : Str} ; -- the field blank is used to get rid of metavariables at parsing
|
||||||
Sub100 = {s : Str ; n : Number} ;
|
Sub100 = {s : CardOrd => Str ; n : Number ; blank : Str} ;
|
||||||
Sub1000 = {s : Str ; n : Number} ;
|
Sub1000 = {s : CardOrd => Str ; n : Number ; blank : Str} ;
|
||||||
Sub1000000 = {s : Str ; n : Number} ;
|
Sub1000000 = {s : CardOrd => Str ; n : Number} ;
|
||||||
|
|
||||||
lin num x = x ;
|
lin num x = x ;
|
||||||
|
|
||||||
lin n2 = mkNum "iki" "yirmi" ;
|
lin n2 = mkNum "iki" "yirmi" ;
|
||||||
lin n3 = mkNum "üç" "otuz" ;
|
lin n3 = mkNum "üç" "otuz" "üçüncü" "otuzuncu" ;
|
||||||
lin n4 = mkNum "dört" "kırk" ;
|
lin n4 = mkNum "dört" "kırk" "dördüncü" "kırkıncı" ;
|
||||||
lin n5 = mkNum "beş" "elli" ;
|
lin n5 = mkNum "beş" "elli" ;
|
||||||
lin n6 = mkNum "altı" "altmış" ;
|
lin n6 = mkNum "altı" "altmış" ;
|
||||||
lin n7 = mkNum "yedi" "yetmiş" ;
|
lin n7 = mkNum "yedi" "yetmiş" ;
|
||||||
lin n8 = mkNum "sekiz" "seksen" ;
|
lin n8 = mkNum "sekiz" "seksen" ;
|
||||||
lin n9 = mkNum "dokuz" "doksan" ;
|
lin n9 = mkNum "dokuz" "doksan" ;
|
||||||
lin pot01 = mkNum "bir" "on" ** {n = Sg} ;
|
lin pot01 = mkNum "bir" "on" "birinci" "onuncu" ** {n = Sg; blank = []} ;
|
||||||
lin pot0 d = d ** {n = Pl} ;
|
lin pot0 d = d ** {n = Pl; blank = []} ;
|
||||||
lin pot110 = {s="on"; n = Pl} ;
|
lin pot110 = {s = pot01.s ! ten; n = Pl; blank = []} ;
|
||||||
lin pot111 = {s="on" ++ "&+" ++ "bir"; n = Pl} ;
|
lin pot111 = {s = \\t => "on" ++ pot01.s ! unit ! t; n = Pl; blank = []} ;
|
||||||
lin pot1to19 d = {s = "on" ++ "&+" ++ d.s ! unit; n = Pl} ;
|
lin pot1to19 d = {s = \\t => "on" ++ d.s ! unit ! t; n = Pl; blank = []} ;
|
||||||
lin pot0as1 n = {s = n.s ! unit; n = n.n} ;
|
lin pot0as1 n = {s = \\t => n.s ! unit ! t; n = n.n ; blank = n.blank} ;
|
||||||
lin pot1 d = {s = d.s ! ten; n = Pl} ;
|
lin pot1 d = {s = d.s ! ten; n = Pl ; blank = []} ;
|
||||||
lin pot1plus d e = {s = d.s ! ten ++ e.s ! unit ; n = Pl} ;
|
lin pot1plus d e = {s = \\t => d.s ! ten ! NCard ++ e.s ! unit ! t; n = Pl; blank = e.blank} ;
|
||||||
lin pot1as2 n = n ;
|
lin pot1as2 n = n ;
|
||||||
lin pot2 d = {s = d.s ! unit ++ "&+" ++ "yüz"; n = Pl} ;
|
lin pot2 d = {s = \\t => case d.n of {
|
||||||
lin pot2plus d e = {s = d.s ! unit ++ "&+" ++ "yüz" ++ e.s ; n = Pl} ;
|
Sg => d.blank ;
|
||||||
|
Pl => d.s ! unit ! NCard
|
||||||
|
} ++ (mkNum "yüz" "yüz").s ! unit ! t; n = Pl; blank = d.blank} ;
|
||||||
|
lin pot2plus d e = {s = \\t => case d.n of {
|
||||||
|
Sg => d.blank ;
|
||||||
|
Pl => d.s ! unit ! NCard
|
||||||
|
} ++ "yüz" ++ e.s ! t ; n = Pl; blank = d.blank} ;
|
||||||
lin pot2as3 n = n ;
|
lin pot2as3 n = n ;
|
||||||
lin pot3 n = {s = n.s ++ "&+" ++ "bin" ; n = Pl} ;
|
lin pot3 n = {s = \\t => case n.n of {
|
||||||
lin pot3plus n m = {s = n.s ++ "&+" ++ "bin" ++ "&+" ++ m.s; n = Pl} ;
|
Sg => n.blank ;
|
||||||
|
Pl => n.s ! NCard
|
||||||
|
} ++ (mkNum "bin" "bin").s ! unit ! t; n = Pl} ;
|
||||||
|
lin pot3plus n m = {s = \\t => case n.n of {
|
||||||
|
Sg => n.blank ;
|
||||||
|
Pl => n.s ! NCard
|
||||||
|
} ++ "bin" ++ m.s ! t; n = Pl} ;
|
||||||
|
lincat
|
||||||
|
Dig = {s : CardOrd => Str ; n : Number} ;
|
||||||
|
lin
|
||||||
|
IDig d = d ** {tail = T1};
|
||||||
|
IIDig d ds =
|
||||||
|
{ s = \\t => d.s ! NCard ++ commaIf ds.tail ++ ds.s ! t; n = Pl; tail = inc ds.tail} ;
|
||||||
|
|
||||||
|
D_0 = mkDig "0" ;
|
||||||
|
D_1 = mkDig "1" "1." Sg;
|
||||||
|
D_2 = mkDig "2" ;
|
||||||
|
D_3 = mkDig "3" ;
|
||||||
|
D_4 = mkDig "4" ;
|
||||||
|
D_5 = mkDig "5" ;
|
||||||
|
D_6 = mkDig "6" ;
|
||||||
|
D_7 = mkDig "7" ;
|
||||||
|
D_8 = mkDig "8" ;
|
||||||
|
D_9 = mkDig "9" ;
|
||||||
|
oper
|
||||||
|
commaIf : DTail -> Str = \t -> case t of {
|
||||||
|
T3 => "," ;
|
||||||
|
_ => []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
inc : DTail -> DTail = \t -> case t of {
|
||||||
|
T1 => T2 ;
|
||||||
|
T2 => T3 ;
|
||||||
|
T3 => T1
|
||||||
|
} ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,66 +1,498 @@
|
|||||||
|
--# -path=.:../abstract:../common:../../prelude
|
||||||
|
|
||||||
resource ParadigmsTur = open
|
resource ParadigmsTur = open
|
||||||
|
CatTur,
|
||||||
Predef,
|
Predef,
|
||||||
Prelude,
|
Prelude,
|
||||||
ResTur
|
ResTur,
|
||||||
|
SuffixTur
|
||||||
in {
|
in {
|
||||||
|
|
||||||
|
flags
|
||||||
|
coding=utf8 ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
regV : Str -> Verb = \inf ->
|
-- Paradigms for verb
|
||||||
let base : Str
|
|
||||||
= case inf of {
|
mkV : overload {
|
||||||
base+"mak" => base ;
|
--make regular verbs, one form is enough
|
||||||
base+"mek" => base
|
mkV : (esmek : Str) -> Verb ;
|
||||||
}
|
-- make verbs of which aorist form is irregular
|
||||||
in { s = table {
|
mkV : (gelmek : Str) -> AoristType -> Verb ;
|
||||||
VPres Sg P1 => harmony4 (harmony4 base "iyor" "yiyor") "im" "yim" ;
|
-- make verbs which do not obey softnening rule
|
||||||
VPres Sg P2 => harmony4 (harmony4 base "iyor" "yiyor") "sin" "sin" ;
|
mkV : (gitmek, gidmek : Str) -> Verb ;
|
||||||
VPres Sg P3 => harmony4 base "iyor" "yiyor" ;
|
-- make verbs which present and future forms has "e" to "i" conversion like "yemek" -> "yiyorum" and "demek" -> "diyorum"
|
||||||
VPres Pl P1 => harmony4 (harmony4 base "iyor" "yiyor") "iz" "yiz" ;
|
-- two forms are enough but three form is needed to differentiate from the other overloads
|
||||||
VPres Pl P2 => harmony4 (harmony4 (harmony4 base "iyor" "yiyor") "sin" "sin") "iz" "yiz" ;
|
mkV : (yemek, yemek, yimek : Str) -> Verb ;
|
||||||
VPres Pl P3 => harmony2 (harmony4 base "iyor" "yiyor") "ler" "ler" ;
|
-- make verbs that is usually formed by a noun and a auxiallary verb
|
||||||
VPast Sg P1 => harmony4 base "dim" "dim" ;
|
-- contiguity indicates whether they are written concatenated or separated
|
||||||
VPast Sg P2 => harmony4 base "din" "din" ;
|
mkV : (seyr : Str) -> (etmek : Verb) -> (con : Contiguity) -> Verb ;
|
||||||
VPast Sg P3 => harmony4 base "di" "di" ;
|
-- same as above, defined to make separated form default
|
||||||
VPast Pl P1 => harmony4 base "dik" "dik" ;
|
mkV : (nefret : Str) -> (etmek : Verb) -> Verb ;
|
||||||
VPast Pl P2 => harmony4 (harmony4 base "din" "din") "iz" "yiz" ;
|
} ;
|
||||||
VPast Pl P3 => harmony4 base "diler" "diler" ;
|
|
||||||
VFuture Sg P1 => harmony4 (harmony2 base "ecek" "yecek") "im" "yim" ;
|
|
||||||
VFuture Sg P2 => harmony4 (harmony2 base "ecek" "yecek") "sin" "sin" ;
|
|
||||||
VFuture Sg P3 => harmony2 base "ecek" "yecek";
|
mkV2 : overload {
|
||||||
VFuture Pl P1 => harmony4 (harmony2 base "ecek" "yecek") "iz" "yiz" ;
|
-- make V2, use default case and preposition which are accusative case and no preposition
|
||||||
VFuture Pl P2 => harmony4 (harmony2 base "ecek" "yecek") "siniz" "siniz" ;
|
mkV2 : (sormak : Verb) -> Verb ** {c : Case; p : Prep} ;
|
||||||
VFuture Pl P3 => harmony2 (harmony2 base "ecek" "yecek") "ler" "ler" ;
|
-- make V2, set case explicitly
|
||||||
VAorist Sg P1 => harmony4 base "im" "yim" ;
|
mkV2 : (korkmak : Verb) -> (dat : Case) -> Verb ** {c : Case; p : Prep} ;
|
||||||
VAorist Sg P2 => harmony4 base "sin" "sin" ;
|
-- make V2, set case and preposition explicitly
|
||||||
VAorist Sg P3 => base ;
|
mkV2 : (dovusmek : Verb) -> (dat : Case) -> (against : Prep) -> Verb ** {c : Case; p : Prep} ;
|
||||||
VAorist Pl P1 => harmony4 base "iz" "yiz" ;
|
} ;
|
||||||
VAorist Pl P2 => harmony4 (harmony4 base "sin" "sin") "iz" "yiz" ;
|
|
||||||
VAorist Pl P3 => harmony2 base "ler" "ler" ;
|
mkV3 : overload {
|
||||||
|
-- make V3, use default cases and prepositions which are accusative and dative cases and no preposition.
|
||||||
|
mkV3 : (satmak : Verb) -> Verb ** {c1 : Case; p1 : Prep; c2 : Case; p2 : Prep} ;
|
||||||
|
-- make V3, set cases and prepositions explicitly.
|
||||||
|
mkV3 : (konusmak : Verb) -> Case -> Prep -> Case -> Prep -> Verb ** {c1 : Case; p1 : Prep; c2 : Case; p2 : Prep} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- worst-case function
|
||||||
|
-- bases of all forms are required.
|
||||||
|
makeVerb : (inf,base,presBase,pastBase,futureBase,aoristBase : Str) -> Verb ;
|
||||||
|
|
||||||
|
-- make a regular verb
|
||||||
|
-- supply infinitive, softened infinitive, future infinitive forms and aorist type
|
||||||
|
regVerb : (inf, softInf, futInf : Str) -> AoristType -> Verb ;
|
||||||
|
|
||||||
|
-- make a regular verb, only infinitive form is needed
|
||||||
|
regV : (inf : Str) -> Verb ;
|
||||||
|
|
||||||
|
-- make a verb, aorist type must be specified
|
||||||
|
-- see AoristType for list of verbs that has irregular aorist suffix
|
||||||
|
irregV_aor : (inf : Str) -> AoristType -> Verb ;
|
||||||
|
|
||||||
|
-- make a verb from a str (usually a noun) and a auxiallary verb, also specify contiguity (i.e whether they will be concatenated or separated)
|
||||||
|
auxillaryVerb : Str -> Verb -> Contiguity -> Verb ;
|
||||||
|
|
||||||
|
mkV2 = overload {
|
||||||
|
-- sormak
|
||||||
|
mkV2 : Verb -> Verb ** {c : Case; p : Prep} = \verb -> verb ** {c = Acc; p = no_Prep} ;
|
||||||
|
-- (bir şeyden) korkmak
|
||||||
|
mkV2 : Verb -> Case -> Verb ** {c : Case; p : Prep} = \verb,ca -> verb ** {c = ca; p = no_Prep} ;
|
||||||
|
-- (bir şeye karşı) dövüşmek
|
||||||
|
mkV2 : Verb -> Case -> Prep -> Verb ** {c : Case; p : Prep} = \verb,ca,prep -> verb ** {c = ca; p = prep} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
mkV3 = overload {
|
||||||
|
-- (birine bir şeyi) satmak
|
||||||
|
mkV3 : Verb -> Verb ** {c1 : Case; p1 : Prep; c2 : Case; p2 : Prep} = \verb -> verb ** {c1 = Acc; p1 = no_Prep; c2 = Dat; p2 = no_Prep} ;
|
||||||
|
-- (biri ile bir şeyi) konuşmak
|
||||||
|
mkV3 : Verb -> Case -> Prep -> Case -> Prep -> Verb ** {c1 : Case; p1 : Prep; c2 : Case; p2 : Prep} =
|
||||||
|
\verb,c1,p1,c2,p2 -> verb ** {c1 = c1; p1 = p1; c2 = c2; p2 = p2} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Paradigms for noun
|
||||||
|
|
||||||
|
-- overload all noun paradigms to mkN
|
||||||
|
mkN : overload {
|
||||||
|
-- regular noun, only nominative case is needed
|
||||||
|
mkN : (araba : Str) -> Noun ;
|
||||||
|
-- handles three type of irregularities which never overlap
|
||||||
|
-- 1.Doubling consonant hak -> hakka
|
||||||
|
-- 2.Dropping vowel burun -> burnu
|
||||||
|
-- 3.Improper softening bisiklet -> bisikleti
|
||||||
|
mkN : (burun, burn : Str) -> Noun ;
|
||||||
|
-- in addition to irregularities above, handles vowel harmony irregularities
|
||||||
|
mkN : (divaniharp, divaniharb : Str) -> (ih_har : HarVowP) -> Noun ;
|
||||||
|
-- links two noun to form a compound noun
|
||||||
|
mkN : (fotograf, makine : Noun) -> Contiguity -> Noun ;
|
||||||
|
-- same as above, make concatenated form default
|
||||||
|
mkN : (zeytin, yag : Noun) -> Noun ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkN2 : Str -> Noun ** {c : Case} ;
|
||||||
|
|
||||||
|
mkN3 : Str -> Noun ** {c1 : Case; c2 : Case} ;
|
||||||
|
|
||||||
|
-- worst case function
|
||||||
|
-- parameters: all singular cases of base, base of genitive table, plural form of base and harmony of base
|
||||||
|
mkNoun : (nom,acc,dat,gen,loc,abl,abessPos,abessNeg,gens,plural : Str) -> Harmony -> Noun ;
|
||||||
|
--this function is for nouns that has different harmony than their vowels imply
|
||||||
|
irregN_h : (burun, burn : Str) -> HarVowP -> Noun ;
|
||||||
|
-- this function handles all irregularities in nouns, because all irregularities require two forms of noun
|
||||||
|
irregN : HarVowP -> (burun, burn : Str) -> Noun;
|
||||||
|
-- paradigm for regular noun
|
||||||
|
regN : Str -> Noun ;
|
||||||
|
-- paradigm for proper noun
|
||||||
|
regPN : Str -> Noun ;
|
||||||
|
-- worst case function for proper nouns
|
||||||
|
makePN : Str -> Str -> Noun ;
|
||||||
|
|
||||||
|
-- Paradigms for adjactives (mkA is same as mkN)
|
||||||
|
mkA2 : overload {
|
||||||
|
-- (biri) ile evli
|
||||||
|
mkA2 : Noun -> Case -> Prep -> Noun ** {c : Case; p : Prep} ;
|
||||||
|
-- makes default case accusative
|
||||||
|
mkA2 : Noun -> Prep -> Noun ** {c : Case; p : Prep} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkAdj2 : Noun -> Case -> Prep -> Noun ** {c : Case; p : Prep} ;
|
||||||
|
|
||||||
|
-- Paradigms for numerals
|
||||||
|
mkNum : overload {
|
||||||
|
-- a regular numeral, obeys softening and hardening rules. e.g. "bir" "birinci"
|
||||||
|
mkNum : Str -> Str -> {s : DForm => CardOrd => Str} ;
|
||||||
|
-- an irregular numeral of which two form is needed. e.g. "kırk" "kırkıncı" "kırk" "kırkıncı" (does not soften)
|
||||||
|
mkNum : Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Str} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
regNum : Str -> Str -> {s : DForm => CardOrd => Str} ;
|
||||||
|
makeNum : Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Str} ;
|
||||||
|
|
||||||
|
mkDig : overload {
|
||||||
|
mkDig : Str -> {s : CardOrd => Str ; n : Number} ;
|
||||||
|
mkDig : Str -> Str -> Number -> {s : CardOrd => Str ; n : Number} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
regDigit : Str -> {s : CardOrd => Str ; n : Number} ;
|
||||||
|
makeDigit : Str -> Str -> Number -> {s : CardOrd => Str ; n : Number} ;
|
||||||
|
|
||||||
|
|
||||||
|
--Implementation of verb paradigms
|
||||||
|
|
||||||
|
mkV = overload {
|
||||||
|
--esmek
|
||||||
|
mkV : Str -> Verb = regV ;
|
||||||
|
--gelmek
|
||||||
|
mkV : Str -> AoristType -> Verb = irregV_aor ;
|
||||||
|
--gitmek
|
||||||
|
mkV : Str -> Str -> Verb = \inf,softInf -> regVerb inf softInf softInf (getAoristType (tk 3 inf)) ;
|
||||||
|
--yemek
|
||||||
|
mkV : Str -> Str -> Str -> Verb = \inf,softInf,futInf -> regVerb inf softInf futInf (getAoristType (tk 3 inf)) ;
|
||||||
|
--seyretmek
|
||||||
|
mkV : Str -> Verb -> Contiguity -> Verb = auxillaryVerb ;
|
||||||
|
--nefret etmek
|
||||||
|
mkV : Str -> Verb -> Verb = \base,v -> auxillaryVerb base v Sep ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
auxillaryVerb prefix verb con = case con of {
|
||||||
|
Sep => {s = \\t => prefix ++ verb.s ! t} ;
|
||||||
|
Con => {s = \\t => prefix + verb.s ! t}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
regV inf = regVerb inf inf inf (getAoristType (tk 3 inf)) ;
|
||||||
|
|
||||||
|
|
||||||
|
irregV_aor inf aorT = regVerb inf inf inf aorT ;
|
||||||
|
|
||||||
|
|
||||||
|
regVerb inf softInf futInf aoristType =
|
||||||
|
let base = (tk 3 inf) ;
|
||||||
|
softBase = (tk 3 softInf) ;
|
||||||
|
futBase = (tk 3 futInf) ;
|
||||||
|
har = getHarmony base ;
|
||||||
|
softness = getSoftness base ;
|
||||||
|
futureBase = addSuffix futBase har futureSuffix ;
|
||||||
|
pastBase = addSuffix base har pastSuffix ;
|
||||||
|
aoristBase = case aoristType of {
|
||||||
|
SgSylConReg => addSuffix softBase har aoristErSuffix ;
|
||||||
|
_ => addSuffix softBase har aoristIrSuffix
|
||||||
|
} ;
|
||||||
|
presBase = case (getHarConP base) of {
|
||||||
|
SVow => addSuffix (tk 1 base) (getHarmony (tk 1 base)) presentSuffix ;
|
||||||
|
_ => addSuffix softBase har presentSuffix
|
||||||
|
} ;
|
||||||
|
in makeVerb inf base presBase pastBase futureBase aoristBase ;
|
||||||
|
|
||||||
|
|
||||||
|
makeVerb inf base presBase pastBase futureBase aoristBase =
|
||||||
|
let fbt = table {
|
||||||
|
Soft => softenBase futureBase ;
|
||||||
|
Hard => futureBase
|
||||||
|
} ;
|
||||||
|
preht = getHarVowP presBase ;
|
||||||
|
pasht = getHarVowP pastBase ;
|
||||||
|
futht = getHarVowP futureBase ;
|
||||||
|
aorht = getHarVowP aoristBase ;
|
||||||
|
preHar = (mkHar preht (SCon Soft));
|
||||||
|
pastHar = (mkHar pasht SVow);
|
||||||
|
futHar = (mkHar futht (SCon Soft));
|
||||||
|
aorHar = (mkHar aorht (SCon Soft));
|
||||||
|
in {
|
||||||
|
s = table {
|
||||||
|
VPres agr => addSuffix presBase preHar (verbSuffixes ! agr) ;
|
||||||
|
VPast agr => addSuffix pastBase pastHar (verbSuffixes ! agr) ;
|
||||||
|
VFuture agr => addSuffix fbt futHar (verbSuffixes ! agr) ;
|
||||||
|
VAorist agr => addSuffix aoristBase aorHar (verbSuffixes ! agr) ;
|
||||||
VImperative => base ;
|
VImperative => base ;
|
||||||
VInfinitive => inf
|
VInfinitive => inf
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
regN : Str -> Noun = \base -> {
|
|
||||||
s = \\n => table {
|
-- Implementation of noun paradigms
|
||||||
Nom => add_number n base ;
|
mkNoun sn sa sd sg sl sabl sgabPos sgabNeg sgs pln har =
|
||||||
Acc => harmony4 (add_number n base) "i" "yi" ;
|
let plHar = getHarmony pln ;
|
||||||
Dat => harmony2 (add_number n base) "e" "ye" ;
|
in
|
||||||
Gen => harmony4 (add_number n base) "in" "nin" ;
|
{
|
||||||
Loc => harmony2 (add_number n base) "de" "de" ;
|
s = table {
|
||||||
Ablat => harmony2 (add_number n base) "den" "den" ;
|
Sg => table {
|
||||||
Abess p => case p of {
|
Nom => sn ;
|
||||||
Pos => harmony4 (add_number n base) "li" "li" ;
|
Acc => sa ;
|
||||||
Neg => harmony4 (add_number n base) "siz" "siz"
|
Dat => sd ;
|
||||||
}
|
Gen => sg ;
|
||||||
} ;
|
Loc => sl ;
|
||||||
gen = \\n => table {
|
Ablat => sabl ;
|
||||||
{n=Sg; p=P1} => harmony4 (add_number n base) "im" "yim" ;
|
Abess Pos => sgabPos ;
|
||||||
{n=Sg; p=P2} => harmony4 (add_number n base) "in" "yin" ;
|
Abess Neg => sgabNeg
|
||||||
{n=Sg; p=P3} => harmony4 (add_number n base) "i" "yi" ;
|
} ;
|
||||||
{n=Pl; p=P1} => harmony4 (add_number n base) "imiz" "yimiz" ;
|
Pl => \\s => addSuffix pln plHar (caseSuffixes ! s)
|
||||||
{n=Pl; p=P2} => harmony4 (add_number n base) "iniz" "yiniz" ;
|
} ;
|
||||||
{n=Pl; p=P3} => harmony4 (add_number n base) "i" "yi"
|
gen = table {
|
||||||
}
|
Sg => table {
|
||||||
|
--Genitive suffix for P3 is always -ları, always selecting plural form of base and harmony is a trick to implement this
|
||||||
|
{n=Pl; p=P3} => addSuffix pln plHar genPlP3Suffix ;
|
||||||
|
s => addSuffix sgs har (genSuffixes ! s)
|
||||||
|
} ;
|
||||||
|
Pl => \\s => addSuffix pln plHar (genSuffixes ! s)
|
||||||
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
irregN_h sn sg har = irregN har sn sg ;
|
||||||
|
|
||||||
|
|
||||||
|
irregN ht sn sg =
|
||||||
|
let
|
||||||
|
pln = add_number Pl sn ht ;
|
||||||
|
har = mkHar ht (SCon (getSoftness sn)) ;
|
||||||
|
irHar = mkHar ht (getHarConP sg) ;
|
||||||
|
in
|
||||||
|
mkNoun sn
|
||||||
|
(addSuffix sg irHar accSuffix)
|
||||||
|
(addSuffix sg irHar datSuffix)
|
||||||
|
(addSuffix sg har genSuffix)
|
||||||
|
(addSuffix sn har locSuffix)
|
||||||
|
(addSuffix sn har ablatSuffix)
|
||||||
|
(addSuffix sn har abessPosSuffix)
|
||||||
|
(addSuffix sn har abessNegSuffix)
|
||||||
|
sg
|
||||||
|
pln
|
||||||
|
har ;
|
||||||
|
|
||||||
|
|
||||||
|
regN sn =
|
||||||
|
let har = getHarmony sn ;
|
||||||
|
pln = add_number Pl sn har.vow ;
|
||||||
|
bt = table {
|
||||||
|
Soft => softenBase sn ;
|
||||||
|
Hard => sn
|
||||||
|
} ;
|
||||||
|
in
|
||||||
|
mkNoun sn
|
||||||
|
(addSuffix bt har accSuffix)
|
||||||
|
(addSuffix bt har datSuffix)
|
||||||
|
(addSuffix bt har genSuffix)
|
||||||
|
(addSuffix bt har locSuffix)
|
||||||
|
(addSuffix bt har ablatSuffix)
|
||||||
|
(addSuffix bt har abessPosSuffix)
|
||||||
|
(addSuffix bt har abessNegSuffix)
|
||||||
|
(bt ! Soft)
|
||||||
|
pln
|
||||||
|
har ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
--this function will be needed when nouns are fully implemented
|
||||||
|
regNounSTableOnly : Str -> Harmony -> Case => Str;
|
||||||
|
regNounSTableOnly sn har =
|
||||||
|
table {
|
||||||
|
t => (addSuffix sn har (caseSuffixes ! t))
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
regPN sn = makePN sn sn ;
|
||||||
|
|
||||||
|
|
||||||
|
makePN sn sy =
|
||||||
|
let har = getHarmony sn ;
|
||||||
|
bn = sn + "'" ;
|
||||||
|
by = sy + "'" ;
|
||||||
|
pln = add_number Pl bn har.vow ;
|
||||||
|
in
|
||||||
|
mkNoun sn
|
||||||
|
(addSuffix by har accSuffix)
|
||||||
|
(addSuffix by har datSuffix)
|
||||||
|
(addSuffix by har genSuffix)
|
||||||
|
(addSuffix bn har locSuffix)
|
||||||
|
(addSuffix bn har ablatSuffix)
|
||||||
|
(addSuffix bn har abessPosSuffix)
|
||||||
|
(addSuffix bn har abessNegSuffix)
|
||||||
|
by
|
||||||
|
pln
|
||||||
|
har ;
|
||||||
|
|
||||||
|
-- Link two nouns, e.g. zeytin (olive) + yağ (oil) -> zeytinyağı (olive oil)
|
||||||
|
linkNoun : (tere,yag : Noun) -> Species -> Contiguity -> Noun ;
|
||||||
|
|
||||||
|
linkNoun n1 n2 lt ct =
|
||||||
|
let n1sn = n1.s ! Sg ! Nom ;--tere
|
||||||
|
n2sn = n2.s ! Sg ! Nom ;--yağ
|
||||||
|
n2pn = n2.s ! Pl ! Nom ;--yağlar
|
||||||
|
n2sb = n2.gen ! Sg ! {n = Sg; p = P3} ;--yağı
|
||||||
|
n2pb = n2.gen ! Pl ! {n = Sg; p = P3} ;--yağları
|
||||||
|
con = case ct of {
|
||||||
|
Con => <n1sn + n2sn, n1sn + n2sb, n1sn + n2pn, n1sn + n2pb> ;
|
||||||
|
Sep => <n1sn ++ n2sn, n1sn ++ n2sb, n1sn ++ n2pn, n1sn ++ n2pb>
|
||||||
|
} ;
|
||||||
|
sb = con.p1 ;--tereyağ
|
||||||
|
sn = con.p2 ;--tereyağı
|
||||||
|
pb = con.p3 ;--tereyağlar
|
||||||
|
pn = con.p4 ;--tereyağları
|
||||||
|
sgHar = getHarmony sn ;
|
||||||
|
plHar = getHarmony pn ;
|
||||||
|
in {
|
||||||
|
s = table {
|
||||||
|
Sg => table {
|
||||||
|
Nom => sn ; --tereyağı
|
||||||
|
Acc => addSuffix sn sgHar accSuffixN ; --tereyağını
|
||||||
|
Dat => addSuffix sn sgHar datSuffixN ; --tereyağına
|
||||||
|
Gen => addSuffix sn sgHar genSuffix ; --tereyağının
|
||||||
|
Loc => addSuffix sn sgHar locSuffixN ; --tereyağında
|
||||||
|
Ablat => addSuffix sn sgHar ablatSuffixN ; --tereyağından
|
||||||
|
Abess Pos => addSuffix sb sgHar abessPosSuffix ; --tereyağlı
|
||||||
|
Abess Neg => addSuffix sb sgHar abessNegSuffix --tereyağsız
|
||||||
|
} ;
|
||||||
|
Pl => table {
|
||||||
|
Nom => pn ;--tereyağları
|
||||||
|
Acc => addSuffix pn plHar accSuffixN ; --tereyağlarını
|
||||||
|
Dat => addSuffix pn plHar datSuffixN ; --tereyağlarına
|
||||||
|
Gen => addSuffix pn plHar genSuffix ; --tereyağlarının
|
||||||
|
Loc => addSuffix pn plHar locSuffixN ; --tereyağlarında
|
||||||
|
Ablat => addSuffix pn plHar ablatSuffixN ; --tereyağlarından
|
||||||
|
Abess Pos => addSuffix pb plHar abessPosSuffix ; --tereyağlarlı
|
||||||
|
Abess Neg => addSuffix pb plHar abessNegSuffix --tereyağlarsız
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
gen = case ct of {
|
||||||
|
Con => \\num,agr => n1sn + n2.gen ! num ! agr ;
|
||||||
|
Sep => \\num,agr => n1sn ++ n2.gen ! num ! agr
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkN = overload {
|
||||||
|
mkN : (araba : Str) -> Noun = regN ;
|
||||||
|
mkN : (burun, burn : Str) -> Noun = \sn,sg -> irregN (getComplexHarmony sn sg) sn sg ;
|
||||||
|
mkN : (divaniharp, divaniharb : Str) -> (ih_har : HarVowP) -> Noun = irregN_h ;
|
||||||
|
mkN : (fotograf, makine : Noun) -> Contiguity -> Noun = \n1,n2,c -> linkNoun n1 n2 Indef c ;
|
||||||
|
mkN : (zeytin, yag : Noun) -> Noun = \n1,n2 -> linkNoun n1 n2 Indef Con ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
mkN2 base = let noun = mkN base in noun ** {c = Gen} ;
|
||||||
|
|
||||||
|
|
||||||
|
mkN3 base = let noun = mkN base in noun ** {c1 = Gen; c2 = Dat} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- Implementation of adjactive paradigms
|
||||||
|
mkA2 = overload {
|
||||||
|
mkA2 : Noun -> Case -> Prep -> Noun ** {c : Case; p : Prep} = mkAdj2 ;
|
||||||
|
mkA2 : Noun -> Prep -> Noun ** {c : Case; p : Prep} = \n,p -> mkAdj2 n Acc p ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkAdj2 base c prep = base ** {c = c; p = prep} ;
|
||||||
|
|
||||||
|
-- Implementation of numeral paradigms
|
||||||
|
mkNum = overload {
|
||||||
|
mkNum : Str -> Str -> {s : DForm => CardOrd => Str} = regNum ;
|
||||||
|
mkNum : Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Str} = makeNum ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
regNum two twenty =
|
||||||
|
makeNum two
|
||||||
|
twenty
|
||||||
|
(addSuffix (getBaseTable two) (getHarmony two) ordNumSuffix)
|
||||||
|
(addSuffix (getBaseTable twenty) (getHarmony twenty) ordNumSuffix) ;
|
||||||
|
|
||||||
|
makeNum two twenty second twentieth =
|
||||||
|
{
|
||||||
|
s = table {
|
||||||
|
unit => table {
|
||||||
|
NCard => two ;
|
||||||
|
NOrd => second
|
||||||
|
} ;
|
||||||
|
ten => table {
|
||||||
|
NCard => twenty ;
|
||||||
|
NOrd => twentieth
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkDig = overload {
|
||||||
|
--all digits except 1 (plural)
|
||||||
|
mkDig : Str -> {s : CardOrd => Str ; n : Number} = regDigit ;
|
||||||
|
--for 1 (singular)
|
||||||
|
mkDig : Str -> Str -> Number -> {s : CardOrd => Str ; n : Number} = makeDigit ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
regDigit card = makeDigit card (card + ".") Pl ;
|
||||||
|
|
||||||
|
makeDigit card ordi num =
|
||||||
|
{
|
||||||
|
s = table {
|
||||||
|
NCard => card ;
|
||||||
|
NOrd => ordi
|
||||||
|
} ;
|
||||||
|
n = num
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Helper functions and parameters
|
||||||
|
-- finds which aorist type will be used with a base, see aorist type parameter for more info
|
||||||
|
getAoristType : Str -> AoristType =
|
||||||
|
\base -> case base of {
|
||||||
|
#consonant* +
|
||||||
|
#vowel +
|
||||||
|
#consonant +
|
||||||
|
#consonant* => SgSylConReg ;
|
||||||
|
_ => PlSyl
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- returns softened form of a base
|
||||||
|
softenBase : Str -> Str = \base ->
|
||||||
|
let root = tk 1 base in
|
||||||
|
case base of {
|
||||||
|
_+ "p" => root + "b" ;
|
||||||
|
_+ "ç" => root + "c" ;
|
||||||
|
_+ "t" => root + "d" ;
|
||||||
|
_+ #consonant + "k" => root + "g" ;
|
||||||
|
_+ #vowel + "k" => root + "ğ" ;
|
||||||
|
_+ #vowel + "g" => root + "ğ" ;
|
||||||
|
_ => base
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- construct a table contatining soft and hard forms of a base
|
||||||
|
getBaseTable : Str -> Softness => Str =
|
||||||
|
\base -> table {
|
||||||
|
Soft => softenBase base ;
|
||||||
|
Hard => base
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- following two functions are to help deciding har type of nouns like vakit, hasut
|
||||||
|
getComplexHarmony : Str -> Str -> HarVowP =
|
||||||
|
\sn,sg -> case <(getHarVowP sn), (getHarVowP sg)> of {
|
||||||
|
<(I_Har | U_Har) , Ih_Har> => I_Har ;
|
||||||
|
<(I_Har | U_Har) , Uh_Har> => U_Har ;
|
||||||
|
<(Ih_Har | Uh_Har), I_Har> => Ih_Har ;
|
||||||
|
<(Ih_Har | Uh_Har), U_Har> => Uh_Har ;
|
||||||
|
<_,h> => h
|
||||||
|
} ;
|
||||||
|
|
||||||
|
add_number : Number -> Str -> HarVowP -> Str =
|
||||||
|
\n,base,harVow ->
|
||||||
|
case n of {
|
||||||
|
Sg => base ;
|
||||||
|
Pl => addSuffix base (mkHar harVow SVow) plSuffix
|
||||||
|
} ;
|
||||||
|
|
||||||
|
param
|
||||||
|
AoristType = PlSyl -- more than one syllable, takes -ir
|
||||||
|
| SgSylConIrreg -- one syllable ending with consonant, but takes -ir (here is the list: al-, bil-, bul-, dur-, gel-, gör-, kal-, ol-, öl-, var-, ver-, vur-, san- )
|
||||||
|
| SgSylConReg ; -- one syllable ending with consonant, takes -er
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude
|
--# -path=.:../abstract:../common:../../prelude
|
||||||
|
|
||||||
resource ResTur = ParamX ** open Prelude, Predef in {
|
resource ResTur = ParamX ** open Prelude, Predef in {
|
||||||
|
|
||||||
@@ -9,8 +9,8 @@ resource ResTur = ParamX ** open Prelude, Predef in {
|
|||||||
|
|
||||||
param
|
param
|
||||||
Case = Nom | Acc | Dat | Gen | Loc | Ablat | Abess Polarity ;
|
Case = Nom | Acc | Dat | Gen | Loc | Ablat | Abess Polarity ;
|
||||||
|
|
||||||
Species = Indef | Def ;
|
Species = Indef | Def ;
|
||||||
|
Contiguity = Con | Sep ; --Concatanate or Separate
|
||||||
|
|
||||||
oper
|
oper
|
||||||
Agr = {n : Number ; p : Person} ;
|
Agr = {n : Number ; p : Person} ;
|
||||||
@@ -24,10 +24,10 @@ resource ResTur = ParamX ** open Prelude, Predef in {
|
|||||||
|
|
||||||
param
|
param
|
||||||
VForm =
|
VForm =
|
||||||
VPres Number Person
|
VPres Agr
|
||||||
| VPast Number Person
|
| VPast Agr
|
||||||
| VFuture Number Person
|
| VFuture Agr
|
||||||
| VAorist Number Person
|
| VAorist Agr
|
||||||
| VImperative
|
| VImperative
|
||||||
| VInfinitive
|
| VInfinitive
|
||||||
;
|
;
|
||||||
@@ -40,16 +40,10 @@ resource ResTur = ParamX ** open Prelude, Predef in {
|
|||||||
--2 For $Numeral$
|
--2 For $Numeral$
|
||||||
param
|
param
|
||||||
DForm = unit | ten ;
|
DForm = unit | ten ;
|
||||||
|
CardOrd = NCard | NOrd ;
|
||||||
|
|
||||||
-- For $Numeral$.
|
-- For $Numeral$.
|
||||||
oper
|
oper
|
||||||
mkNum : Str -> Str -> {s : DForm => Str} =
|
|
||||||
\two, twenty ->
|
|
||||||
{s = table {
|
|
||||||
unit => two ;
|
|
||||||
ten => twenty
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
mkPron : (ben,beni,bana,banin,bende,benden,benli,bensiz:Str) -> Number -> Person -> Pron =
|
mkPron : (ben,beni,bana,banin,bende,benden,benli,bensiz:Str) -> Number -> Person -> Pron =
|
||||||
\ben,beni,bana,benim,bende,benden,benli,bensiz,n,p -> {
|
\ben,beni,bana,benim,bende,benden,benli,bensiz,n,p -> {
|
||||||
@@ -66,87 +60,87 @@ resource ResTur = ParamX ** open Prelude, Predef in {
|
|||||||
a = {n=n; p=p} ;
|
a = {n=n; p=p} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
--Harmony
|
||||||
|
param
|
||||||
|
|
||||||
|
-- Consonant are divided into 2 groups: Voiced vs Unvoiced or Hard vs Soft.
|
||||||
|
-- This parameter type is used for consonant harmony, namely hardening and softening rules.
|
||||||
|
Softness = Soft | Hard ;
|
||||||
|
|
||||||
|
-- Parameter type for consonant harmony:
|
||||||
|
-- Suffixes should have three forms at the worst case for consonant harmony, these forms are
|
||||||
|
-- used when stem ends with:
|
||||||
|
-- 1) soft consonant
|
||||||
|
-- 2) hard consonant
|
||||||
|
-- 3) vowel
|
||||||
|
HarConP = SCon Softness | SVow ;
|
||||||
|
|
||||||
|
-- Parameter type for vowel harmony:
|
||||||
|
-- Suffixes should have 4 forms, because of two dimensional vowel harmony
|
||||||
|
HarVowP = I_Har | U_Har | Ih_Har | Uh_Har ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
harmony4 : Str -> Str -> Str -> Str
|
-- Some pattern macros used by some opers (especially those related to harmonies) in ResTur.gf and ParadigmsTur.gf
|
||||||
= \base0,suffixC,suffixV ->
|
|
||||||
let h : Str =
|
|
||||||
case base0 of {
|
|
||||||
_+c@("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö")+
|
|
||||||
("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")* =>
|
|
||||||
case c of {
|
|
||||||
("ı"|"a") => "ı" ;
|
|
||||||
("i"|"e") => "i" ;
|
|
||||||
("u"|"o") => "u" ;
|
|
||||||
("ü"|"ö") => "ü"
|
|
||||||
} ;
|
|
||||||
_ => error "harmony4"
|
|
||||||
} ;
|
|
||||||
base : Str =
|
|
||||||
case dp 1 base0 + take 1 suffixC of {
|
|
||||||
("k")+("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö") => tk 1 base0 + "ğ" ;
|
|
||||||
_ => base0
|
|
||||||
} ;
|
|
||||||
suffix : Str =
|
|
||||||
case dp 1 base0 of {
|
|
||||||
("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö") => case suffixV of {
|
|
||||||
s1@("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")
|
|
||||||
+ ("ı"|"i"|"u"|"ü")
|
|
||||||
+s2 => s1+h+s2 ;
|
|
||||||
s => s
|
|
||||||
} ;
|
|
||||||
_ => case suffixC of {
|
|
||||||
s1@(("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")*)
|
|
||||||
+ ("ı"|"i"|"u"|"ü")
|
|
||||||
+s2 => s1+h+s2 ;
|
|
||||||
s => s
|
|
||||||
}
|
|
||||||
}
|
|
||||||
in base + suffix ;
|
|
||||||
|
|
||||||
harmony2 : Str -> Str -> Str -> Str
|
--Capital forms of vowels are also added, otherwise harmony of proper nouns like "Of" can not be determined
|
||||||
= \base0,suffixC,suffixV ->
|
vowel : pattern Str = #("a"|"e"|"ı"|"i"|"u"|"ü"|"o"|"ö"|"î"|"â"|"û"|"A"|"E"|"I"|"İ"|"U"|"Ü"|"O"|"Ö"|"Î"|"Â"|"Û") ;
|
||||||
let h : Str =
|
consonant : pattern Str = #("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h") ;
|
||||||
case base0 of {
|
--Extended consonant are used when proccessing words that contain non-letter characters like "stand-by"
|
||||||
_+c@("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö")+
|
extConson : pattern Str = #("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h"|" "|"'"|"-") ;
|
||||||
("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")* =>
|
--The following are the hard (voiced) consonant in Turkish Alphabet (Order is determined by "Fıstıkçı Şahap" :) )
|
||||||
case c of {
|
hardCons : pattern Str = #("f"|"s"|"t"|"k"|"ç"|"ş"|"h"|"p") ;
|
||||||
("a"|"ı"|"u"|"o") => "a" ;
|
|
||||||
("e"|"i"|"ü"|"ö") => "e"
|
|
||||||
} ;
|
|
||||||
_ => error "harmony2"
|
|
||||||
} ;
|
|
||||||
base : Str =
|
|
||||||
case dp 1 base0 + take 1 suffixC of {
|
|
||||||
("k")+("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö") => tk 1 base0 + "ğ" ;
|
|
||||||
_ => base0
|
|
||||||
} ;
|
|
||||||
suffix : Str =
|
|
||||||
case dp 1 base0 of {
|
|
||||||
("ı"|"a"|"i"|"e"|"u"|"o"|"ü"|"ö") => case suffixV of {
|
|
||||||
s1@("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")
|
|
||||||
+ ("a"|"e")
|
|
||||||
+s2 => s1+h+s2 ;
|
|
||||||
s => s
|
|
||||||
} ;
|
|
||||||
("p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h") => case suffixC of {
|
|
||||||
s1@(("b"|"v"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")*)
|
|
||||||
+ ("a"|"e")
|
|
||||||
+s2 => s1+h+s2 ;
|
|
||||||
("da"|"de")+s => "t"+h+s ;
|
|
||||||
s => s
|
|
||||||
} ;
|
|
||||||
_ => case suffixC of {
|
|
||||||
s1@(("b"|"v"|"d"|"z"|"j"|"c"|"g"|"ğ"|"l"|"r"|"m"|"n"|"y"|"p"|"f"|"t"|"s"|"ş"|"ç"|"k"|"h")*)
|
|
||||||
+ ("a"|"e")
|
|
||||||
+s2 => s1+h+s2 ;
|
|
||||||
s => s
|
|
||||||
}
|
|
||||||
}
|
|
||||||
in base + suffix ;
|
|
||||||
|
|
||||||
add_number : Number -> Str -> Str = \n,base ->
|
-- Type definition and constructor of Harmony.
|
||||||
case n of {
|
Harmony = {
|
||||||
Sg => base ;
|
vow : HarVowP ;
|
||||||
Pl => harmony2 base "ler" "ler"
|
con : HarConP
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkHar : HarVowP -> HarConP -> Harmony;
|
||||||
|
mkHar v c = { vow = v ; con = c } ;
|
||||||
|
|
||||||
|
getHarmony : Str -> Harmony ;
|
||||||
|
getHarmony base = {
|
||||||
|
vow = getHarVowP base ;
|
||||||
|
con = getHarConP base ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
getHarVowP : Str -> HarVowP
|
||||||
|
= \base -> case base of {
|
||||||
|
_+c@#vowel+
|
||||||
|
#extConson* =>
|
||||||
|
case c of {
|
||||||
|
("ı"|"a"|"â"|"I"|"A"|"Â") => I_Har ;
|
||||||
|
("i"|"e"|"î"|"İ"|"E"|"Î") => Ih_Har ;
|
||||||
|
("u"|"o"|"û"|"U"|"O"|"Û") => U_Har ;
|
||||||
|
("ü"|"ö"|"Ü"|"Ö") => Uh_Har
|
||||||
|
} ;
|
||||||
|
_ => Ih_Har --this is for yiyor ("y" is base in that case)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Param base : a word, of which softness is to be determined
|
||||||
|
-- Returns whether Soft or Hard form of suffix will be used when adding a suffix to base
|
||||||
|
getSoftness : Str -> Softness = \base -> case dp 1 base of {
|
||||||
|
#hardCons => Hard ;
|
||||||
|
_ => Soft
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Param larC : the consonant form of suffix of which softness is to be determined
|
||||||
|
-- Returns whether Soft or Hard form of base will be used when adding a suffix to parameter
|
||||||
|
getBeginType : Str -> Softness = \larC -> case take 1 larC of {
|
||||||
|
#vowel => Soft ;
|
||||||
|
_ => Hard
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Param base : a word
|
||||||
|
-- Returns which SuffixForm will be used when adding a suffix to base
|
||||||
|
getHarConP : Str -> HarConP =
|
||||||
|
\base -> case dp 1 base of {
|
||||||
|
#vowel => SVow ;
|
||||||
|
_ => SCon (getSoftness base)
|
||||||
|
} ;
|
||||||
|
--Prep
|
||||||
|
|
||||||
|
no_Prep = mkPrep [] ;
|
||||||
|
mkPrep : Str -> {s : Str} = \str -> ss str ;
|
||||||
}
|
}
|
||||||
@@ -14,5 +14,6 @@ concrete StructuralTur of Structural = CatTur **
|
|||||||
youSg_Pron = mkPron "sen" "seni" "sana" "senin" "sende" "senden" "senli" "sensiz" Sg P2 ;
|
youSg_Pron = mkPron "sen" "seni" "sana" "senin" "sende" "senden" "senli" "sensiz" Sg P2 ;
|
||||||
youPl_Pron = mkPron "siz" "sizi" "size" "sizin" "sizde" "sizden" "sizli" "sizsiz" Pl P2 ;
|
youPl_Pron = mkPron "siz" "sizi" "size" "sizin" "sizde" "sizden" "sizli" "sizsiz" Pl P2 ;
|
||||||
youPol_Pron = mkPron "siz" "sizi" "size" "sizin" "sizde" "sizden" "sizli" "sizsiz" Pl P2 ;
|
youPol_Pron = mkPron "siz" "sizi" "size" "sizin" "sizde" "sizden" "sizli" "sizsiz" Pl P2 ;
|
||||||
}
|
|
||||||
|
|
||||||
|
with_Prep = mkPrep "ile" ;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user