russian: new paradigms for adjectives, including overloaded smart paradigm. moved declension stuff to MorphoRus. changes LexiconRus to use new mkA.

This commit is contained in:
bjorn
2008-06-24 23:06:20 +00:00
parent 695fdca35a
commit b14394afdc
4 changed files with 453 additions and 665 deletions

View File

@@ -17,22 +17,22 @@ lin
ask_V2Q = dirV2 (regV imperfective first "спрашива" "ю" "спрашивал" "спрашивай" "спрашивать") ;
baby_N = mkN "малыш" animate;
back_N = mkN "спина" ;
bad_A = AKakoj_Nibud "плох" "" "хуже";
bad_A = mkA "плохой" "хуже";
bank_N = mkN "банк" ;
bark_N = mkN "кора";
beautiful_A = AStaruyj "красив" "красивее";
beautiful_A = mkA "красивый";
become_VA = regV perfective second "станов" "лю" "стал" "стань" "стать" ;
beer_N = mkN "пиво" ;
beg_V2V = dirV2 (mkV imperfective "прошу" "просишь" "просит" "просим" "просите" "просят" "просил" "проси" "просить" );
belly_N = mkN "живот" ;
big_A = AKakoj_Nibud "больш" "" "больше" ;
big_A = mkA "большой" "больше" ;
bike_N = mkN "велосипед" ;
bird_N = mkN "птица" animate;
bite_V2 = dirV2 (regV imperfective first "куса" "ю" "кусал" "кусай" "кусать");
black_A = AStaruyj "чёрн" "чернее";
black_A = mkA "чёрный";
blood_N = mkN "кровь" ;
blow_V = regV imperfective first "ду" "ю" "дул" "дуй" "дуть" ;
blue_A = AMolodoj "голуб" "голубее";
blue_A = mkA "голубой" ;
boat_N = mkN "лодка" ;
bone_N = mkN "кость" ;
book_N = mkN "книга" ;
@@ -43,9 +43,9 @@ lin
break_V2 = dirV2 (regV imperfective first "прерыва" "ю" "прерывал" "прерывай" "прерывать" );
breast_N = mkN "грудь" ;
breathe_V = regV imperfective second "дыш" "у" "дышал" "дыши" "дышать" ;
broad_A = AMalenkij "широк" "шире";
broad_A = mkA "широкий" "шире";
brother_N2 = mkN2 (mkN "брат" animate) ; -- FIXME: special case
brown_A = AStaruyj "коричнев" "коричневее";
brown_A = mkA "коричневый";
burn_V = regV imperfective second "гор" "ю" "горел" "гори" "гореть" ;
butter_N = mkN "масло";
buy_V2 = dirV2 (regV imperfective first "покупа" "ю" "покупал" "покупай" "покупать" );
@@ -61,15 +61,15 @@ lin
child_N = mkN "ребёнок" "ребёнка" "ребёнку" "ребёнка" "ребёнком" "ребёнке" "ребёнке" "дети" "детей" "детям" "детей" "детьми" "детях" masculine animate ;
church_N = mkN "церковь" "церкви" "церкви" "церковь" "церковью" "церкви" "церкви" "церкви" "церквей" "церквям" "церкви" "церквями" "церквях" masculine inanimate ;
city_N = mkN "город" ;
clean_A = AStaruyj "чист" "чище";
clever_A = AStaruyj "умн" "умнее";
clean_A = mkA "чистый" "чище";
clever_A = mkA "умный";
close_V2= dirV2 (regV imperfective first "закрыва" "ю" "закрывал" "закрывай" "закрывать" );
cloud_N = mkN "облако" ; -- irregular
coat_N = mkIndeclinableNoun "пальто" masculine inanimate ;
cold_A = AStaruyj "холодн" "холоднее";
cold_A = mkA "холодный";
come_V = regV imperfective first "прихо" "жу" "приходил" "приходи" "приходить" ;
computer_N = mkN "компьютер" ;
correct_A = AStaruyj "правильн" "правильнее";
correct_A = mkA "правильный" ;
count_V2 = dirV2 (regV imperfective first "счита" "ю" "считал" "считай" "считать" ) ;
country_N = mkN "страна" ;
cousin_N = mkN "кузен" ; -- FIXME: is this really correct? can't find it in the dictionary
@@ -78,22 +78,22 @@ lin
day_N = mkN "день" "дня" "дню" "день" "днём" "дне" "дне" "дни" "дней" "дням" "дни" "днями" "днях" masculine inanimate ;
die_V = regV imperfective first "умира" "ю" "умирал" "умирай" "умирать" ;
dig_V = regV imperfective first "копа" "ю" "копал" "копай" "копать" ;
dirty_A = AStaruyj "грязн" "грязнее" ;
dirty_A = mkA "грязный" ;
distance_N3 = mkN3 (mkN "расстояние") from_Prep to_Prep ;
do_V2 = dirV2 (regV imperfective first "дела" "ю" "делал" "делай" "делать" );
doctor_N = mkN "доктор" animate ;
dog_N = mkN "собака" animate;
door_N = mkN "дверь" ;
drink_V2 = dirV2 (regV imperfective firstE "пь" "ю" "пил" "пей" "пить" );
dry_A = AMolodoj "сух" "суше";
dull_A = AStaruyj "скучн" "скучнее";
dry_A = mkA "сухой" "суше";
dull_A = mkA "скучный" ;
dust_N = mkN "пыль" ;
ear_N = mkN "ухо" ;
earth_N = mkN "земля" ;
easy_A2V = mkA2 (AMalenkij "лёгк" "легче") "для" genitive ;
easy_A2V = mkA2 (mkA "лёгкий" "легче") "для" genitive ;
eat_V2 = dirV2 (regV imperfective first "куша" "ю" "кушал" "кушай" "кушать" );
egg_N = mkN "яйцо" ;
empty_A = AMolodoj "пуст" "пустее";
empty_A = mkA "пустой" ;
enemy_N = mkN "враг" animate ;
eye_N = mkN "глаз" ; -- FIXME: Pl -a
factory_N = mkN "фабрика" ;
@@ -122,18 +122,18 @@ lin
fridge_N = mkN "холодильник" ;
friend_N = mkN "друг" "друга" "другу" "друга" "другом" "друге" "друге" "друзья" "друзей" "друзьям" "друзей" "дузьями" "друзьях" masculine animate ;
fruit_N = mkN "фрукт" ;
full_A = AStaruyj "полн" "полнее";
fun_AV = AStaruyj "весёл" "веселее";
full_A = mkA "полный";
fun_AV = mkA "весёлый";
garden_N = mkN "сад" ;
girl_N = mkN "девочка" animate; -- vowel change
give_V3 = tvDirDir (regV imperfective firstE "да" "ю" "давал" "давай" "давать" ) ;
glove_N = mkN "перчатка" ; -- vowel change
go_V= regV imperfective second "хо" "жу" "ходил" "ходи" "ходить" ;
gold_N = mkN "золото" ;
good_A = AKhoroshij "хорош" "лучше" ;
good_A = mkA "хороший" "лучше" ;
grammar_N = mkN "грамматикa";
grass_N = mkN "трава";
green_A = AStaruyj "зелен" "зеленее" ;
green_A = mkA "зелёный" ;
guts_N = mkN "внутренность" ;
hair_N = mkN "волос" ; -- FIXME: always plural?
hand_N = mkN "рука" ;
@@ -144,19 +144,19 @@ lin
head_N = mkN "голова" ;
hear_V2= dirV2 (regV imperfective first "слуша" "ю" "слушал" "слушай" "слушать" );
heart_N = mkN "сердце" "сердца" "сердцу" "сердца" "сердцем" "сердце" "сердце" "сердца" "сердец" "сердцам" "сердец" "сердцами" "сердцах" neuter inanimate ;
heavy_A = AStaruyj "тяжел" "тяжелее";
heavy_A = mkA "тяжёлый" ;
hill_N = mkN "холм" ;
hit_V2 = dirV2 (regV imperfective first "ударя" "ю" "ударял" "ударяй" "ударять" );
hold_V2 = dirV2 (regV imperfective second "держ" "у" "держал" "держи" "держать" );
hope_VS= regV imperfective first "наде" "ю" "надеял" "надей" "надеять" ;
horn_N = mkN "рог" ;
horse_N = mkN "лошадь" animate; -- irregular
hot_A = AKhoroshij "горяч" "горячее" ;
hot_A = mkA "горячий" ;
house_N = mkN "дом" ;
hunt_V2 = dirV2 (regV imperfective second "охоч" "у" "охотил" "охоть" "охотить" ) ;
husband_N = mkN "муж" "мужа" "мужу" "мужа" "мужем" "муже" "муже" "мужья" "мужей" "мужьям" "мужей" "мужьями" "мужьях" masculine animate ;
ice_N = mkN "лёд" "льда" "льду" "льда" "льдом" "льде" "льде" "льды" "льдов" "льдам" "льдов" "льдами" "льдах" masculine inanimate ;
important_A = AStaruyj "важн" "важнее" ;
important_A = mkA "важный" ;
industry_N = mkN "промышленность" ;
iron_N = mkN "железо" ;
jump_V = regV imperfective first "прыга" "ю" "прыгал" "прыгай" "прыгать" ;
@@ -179,13 +179,13 @@ lin
listen_V2= dirV2 (regV imperfective first "слуша" "ю" "слушал" "слушай" "слушать" );
live_V= regV imperfective firstE "жив" "у" "жил" "живи" "жить" ;
liver_N = mkN "печень" ;
long_A = AStaruyj "длинн" "длиннее" ;
long_A = mkA "длинный" ;
lose_V2 = dirV2 (regV imperfective first "теря" "ю" "терял" "теряй" "терять" );
louse_N = mkN "вошь" "вши" "вши" "вошь" "вошью" "вше" "вше" "вши" "вшей" "вшам" "вшей" "вшами" "вшах" feminine animate ;
love_N = mkN "любовь" ; -- vowel change
love_V2= dirV2 (regV imperfective second "люб" "лю" "любил" "люби" "любить" );
man_N = mkN "человек" ; -- null gen pl
married_A2 = mkA2 (adjInvar "замужем") "за" instructive ;
married_A2 = mkA2 (mkA "замужем") "за" instructive ;
meat_N = mkN "мясо" ;
milk_N = mkN "молоко" ;
moon_N = mkN "луна" ;
@@ -194,17 +194,17 @@ lin
mouth_N = mkN "рот" "рта" "рту" "рот" "ртом" "рте" "рте" "рты" "ртов" "ртам" "рты" "ртами" "ртах" masculine inanimate ;
music_N = mkN "музыка" ;
name_N = mkN "имя" ;
narrow_A = AStaruyj "узк" "уже" ;
near_A = AMalenkij "близк" "ближе";
narrow_A = mkA "узкий" "уже" ;
near_A = mkA "близкий" "ближе";
neck_N = mkN "шея" ;
new_A = AStaruyj "нов" "новее" ;
new_A = mkA "новый" ;
newspaper_N = mkN "газета" ;
night_N = mkN "ночь" ;
nose_N = mkN "нос" ;
now_Adv = mkAdv "сейчас" ;
number_N = mkN "число" ; -- gen pl "чисел"
oil_N = mkN "нефть" ;
old_A = AStaruyj "стар" "старше" ;
old_A = mkA "старый" "старше" ;
open_V2= dirV2 (regV imperfective first "открыва" "ю" "открывал" "открывай" "открывать" );
--- organise_V2 = dirV2 (regV imperfective foreign "организу" "ю" "организовал" "организуй" "организовать" ); -- +++ MG_UR: added +++
paint_V2A = dirV2 (regV imperfective first "рису" "ю" "рисовал" "рисуй" "рисовать" ) ;
@@ -220,7 +220,7 @@ lin
play_V2 = mkV2 (regV imperfective first "игра" "ю" "играл" "играй" "играть" ) "c" instructive;
policeman_N = mkN "милиционер" animate ;
priest_N = mkN "священник" animate;
probable_AS = AStaruyj "возможн" "возможнее";
probable_AS = mkA "возможный" ;
pull_V2 = dirV2 (regV imperfective first "тян" "у" "тянул" "тяни" "тянуть" ) ;
push_V2 = dirV2 (regV imperfective first "толка" "ю" "толкал" "толкай" "толкать" );
put_V2 = dirV2 (regV imperfective firstE "клад" "у" "клал" "клади" "класть" );
@@ -232,7 +232,7 @@ lin
read_V2 = dirV2 (regV imperfective first "чита" "ю" "читал" "читай" "читать" );
-- ready_A = ;
reason_N = mkN "причина";
red_A = AStaruyj "красн" "краснее" ;
red_A = mkA "красный" ;
religion_N = mkN "религия" ;
restaurant_N = mkN "ресторан" ;
right_Ord = (uy_j_EndDecl "прав") ** {lock_A = <>} ;
@@ -242,8 +242,8 @@ lin
roof_N = mkN "крыша" ;
root_N = mkN "корень" ;
rope_N = mkN "верёвка" ;
rotten_A = AMolodoj "гнил" "гнилее";
round_A = AStaruyj "кругл" "круглее";
rotten_A = mkA "гнилой";
round_A = mkA "круглый";
rub_V2 = dirV2 (regV imperfective firstE "тр" "у" "тёр" "три" "тереть" );
rubber_N = mkN "резина" ;
rule_N = mkN "правило" ;
@@ -261,13 +261,13 @@ lin
sell_V3 = tvDirDir (regV imperfective firstE "прода" "ю" "продавал" "продавай" "продавать" );
send_V3 = tvDirDir (regV imperfective first "посыла" "ю" "посылал" "посылай" "посылать" );
sew_V = regV imperfective firstE "шь" "ю" "шил" "шей" "шить" ;
sharp_A = AStaruyj "остр" "острее";
sharp_A = mkA "острый";
sheep_N = mkN "овца" animate ;
ship_N = mkN "корабль" ;
shirt_N = mkN "рубашка" ;
shoe_N = mkN "туфля" "туфли" "туфле" "туфлю" "туфлей" "туфле" "туфле" "туфли" "туфель" "туфлям" "туфли" "туфлями" "туфлях" masculine inanimate ;
shop_N = mkN "магазин" ;
short_A = AMalenkij "коротк" "короче" ;
short_A = mkA "короткий" "короче" ;
silver_N = mkN "серебро" ;
sing_V = regV imperfective firstE "по" "ю" "пел" "пой" "петь" ;
sister_N = mkN "сестра" animate ;
@@ -275,10 +275,10 @@ lin
skin_N = mkN "кожа" ;
sky_N = mkN "небо" "неба" "небу" "небо" "небом" "небе" "небе" "небеса" "небес" "небесам" "небес" "небесами" "небесах" neuter inanimate ;
sleep_V = regV imperfective second "сп" "лю" "спал" "спи" "спать" ;
small_A = AMalenkij "маленьк" "меньше" ;
small_A = mkA "маленький" "меньше" ;
smell_V = regV imperfective first "пахн" "у" "пахнул" "пахни" "пахнуть" ;
smoke_N = mkN "дым" ;
smooth_A = AMalenkij "гладк" "глаже";
smooth_A = mkA "гладкий" "глаже";
snake_N = mkN "змея" animate ;
snow_N = mkN "снег" ;
sock_N = mkN "носок" ;
@@ -296,9 +296,9 @@ lin
stone_N = mkN "камень" ;
stop_V = regV imperfective first "останавлива" "ю" "останавливал" "останавливай" "останавливать";
stove_N = mkN "печь" ;
straight_A = AMolodoj "прям" "прямее";
straight_A = mkA "прямой" ;
student_N = mkN "студент" animate ;
stupid_A = AMolodoj "тупой" "тупее" ;
stupid_A = mkA "тупой" "тупее" ;
suck_V2 = dirV2 (regV imperfective firstE "сос" "у" "сосал" "соси" "сосать") ;
sun_N = mkN "солнце" "солнца" "солнцу" "солнце" "солнцем" "солнце" "солнце" "солнца" "солнц" "солнцам" "солнца" "солнцами" "солнцах" neuter inanimate ;
swell_V = regV imperfective first "опуха" "ю" "опухал" "опухай" "опухать" ;
@@ -311,8 +311,8 @@ lin
teach_V2 = dirV2 (regV imperfective second "уч" "у" "учил" "учи" "учить" );
teacher_N = mkN "учитель" animate ;
television_N = mkN "телевидение" ; -- FIXME: televizor?
thick_A = AStaruyj "толст" "толще" ;
thin_A = AMalenkij "тонк" "тоньше" ;
thick_A = mkA "толстый" "толще" ;
thin_A = mkA "тонкий" "тоньше" ;
think_V = regV imperfective first "дума" "ю" "думал" "думай" "думать" ;
throw_V2 = dirV2 (regV imperfective first "броса" "ю" "бросал" "бросай" "бросать" ) ;
tie_V2 = dirV2 (regV imperfective first "вяж" "у" "вязал" "вяжи" "вязать") ;
@@ -323,7 +323,7 @@ lin
travel_V = regV imperfective first "путешеству" "ю" "путешествовал" "путешествуй" "путешествовать" ;
tree_N = mkN "дерево" ; -- irregular
turn_V = regV imperfective first "поворачива" "ю" "поворачивал" "поворачивай" "поворачивать" ;
ugly_A = AStaruyj "некрасив" "некрасивее" ;
ugly_A = mkA "некрасивый" ;
-- uncertain_A = ;
understand_V2 = dirV2 (regV imperfective first "понима" "ю" "понимал" "понимай" "понимать" );
university_N = mkN "университет" ;
@@ -333,13 +333,13 @@ lin
walk_V = regV imperfective first "гуля" "ю" "гулял" "гуляй" "гулять" ;
--- want_V2 = dirV2 (regV imperfective mixed "хо" "чу" "хотел" "хоти" "хотеть" );
war_N = mkN "война" ;
warm_A = AStaruyj "тёпл" "теплее" ;
warm_A = mkA "тёплый" ;
wash_V2 = dirV2 (regV imperfective first "мо" "ю" "мыл" "мой" "мыть" ) ;
watch_V2 = dirV2 (regV imperfective second "смотр" "ю" "смотрел" "смотри" "смотреть" );
water_N = mkN "вода" ;
wet_A = AStaruyj "мокр" "мокрее";
white_A = AStaruyj "бел" "белее" ;
wide_A = AMalenkij "широк" "шире";
wet_A = mkA "мокрый" ;
white_A = mkA "белый" ;
wide_A = mkA "широкий" "шире";
wife_N = mkN "жена" animate ;
win_V2 = dirV2 (regV imperfective first "выигрыва" "ю" "выигрывал" "выигрывай" "выигрывать" );
wind_N = mkN "ветер" "ветра" "ветру" "ветер" "ветром" "ветра" "ветра" "ветров" "ветра" "ветрам" "ветров" "ветрами" "ветрах" masculine inanimate ;
@@ -353,6 +353,6 @@ lin
worm_N = mkN "черв" ;
write_V2 = dirV2 (regV imperfective first "пиш" "у" "писал" "пиши" "писать" );
year_N = mkN "годь" ;
yellow_A = AStaruyj "жёлт" "желтее" ;
young_A = AMolodoj "молод" "моложе";
yellow_A = mkA "жёлтый" ;
young_A = mkA "молодой" "моложе";
}

View File

@@ -305,6 +305,267 @@ oper pronVseInanimate: Pronoun =
---- namely, the String component "s" of the CommNoun type
---- without any reference to the Gender parameter "g".
--
{-
Paradigms:
1. hard regular
Masc -Consonant
Neut -o
Fem -a
1*. with vowel changes, Masc in Gen Sg, Fem and Neut in Gen Pl
2. soft regular:
Masc -ь
Neut -е
Fem -я
2*. with vowel changes, Masc in Gen Sg, Fem in Gen Pl (no Neut)
3. stem ending in г, к, х
- Masc, Fem same as 1 but use и instead of ы (Nom/Acc Pl, Gen Sg)
- Neut -кo has Nom Pl -ки instead of -кa
3* with vowel changes, Masc in Gen Sg, Fem and Neut in Gen Pl
4. stem ending in ш, ж, ч, щ, hard endings,
use и instead of ы, and use е instead of unstressed o
5. stem ending in ц, hard endings, use е instead of unstressed o
5*. with vowel changes, Masc in Gen Sg, Fem and Neut in Gen Pl
6. Masc ending in -й, Fem stem ending in vowel, Neut ending in ь?
6* with vowel changes
7. stem ending in и
8. F2, Fem ending in -ь
all -чь, -щь, -шь, -жь
all -пь, -энь, -мь, -фь,
most -дь, -ть, -сть, -сь, -вь, -бь,
8*. with vowel changes in Ins Sg, Gen Sg
9. Neut ending in -мя
10. Masc in -oнoк
11. Masc in -aнин
12. Nom Pl in -ья
-}
oper iAfter : Str -> Str = \stem ->
case stem of {
_ + ("г"|"к"|"х") => "и" ;
_ + ("ш"|"ж"|"ч"|"щ") => "и" ;
_ => "ы"
};
oper oAfter : Str -> Str = \stem ->
case stem of {
_ + ("ш"|"ж"|"ч"|"щ") => "е" ;
_ + "ц" => "е" ;
_ => "о"
};
-- 1. Hard regular masculine inanimate, e.g. spor.
-- 3. stem ending in г, к, х
-- 4. stem ending in ш, ж, ч, щ
-- 5. stem ending in ц
oper nRegHardMasc : Str ->CommNoun= \stem ->
let i = iAfter stem in
let o = oAfter stem in
{ s = table {
SF Sg Nom => stem ;
SF Sg Gen => stem+"а" ;
SF Sg Dat => stem+"у" ;
SF Sg Acc => stem ;
SF Sg Inst => stem+o+"м" ;
SF Sg (Prepos _) => stem+"е" ;
SF Pl Nom => stem+i ;
SF Pl Gen => stem+case stem of { _+("ш"|"ж"|"ч"|"щ") => "ей"; _ => "ов" } ;
SF Pl Dat => stem+"ам" ;
SF Pl Acc => stem+i ;
SF Pl Inst => stem+"ами" ;
SF Pl (Prepos _) => stem+"ах" };
g = Masc; anim = Inanimate };
-- 1. Hard regular neuter inanimate, e.g. pravilo.
-- 3. stem ending in г, к, х
-- 4. stem ending in ш, ж, ч, щ
-- 5. stem ending in ц
oper nRegHardNeut : Str ->CommNoun= \stem ->
let o = oAfter stem in
{ s = table {
SF Sg Nom => stem+o ;
SF Sg Gen => stem+"а" ;
SF Sg Dat => stem+"у" ;
SF Sg Acc => stem+o ;
SF Sg Inst => stem+o+"м" ;
SF Sg (Prepos _) => stem+"е" ;
SF Pl Nom => stem+case stem of { _+"к" => "и" ; _ => "а" } ;
SF Pl Gen => stem ;
SF Pl Dat => stem+"ам" ;
SF Pl Acc => stem+"а" ;
SF Pl Inst => stem+"ами" ;
SF Pl (Prepos _) => stem+"ах" };
g = Neut; anim = Inanimate };
-- 1. Hard regular feminine inanimate, e.g. karta.
-- 3. stem ending in г, к, х
-- 4. stem ending in ш, ж, ч, щ
-- 5. stem ending in ц
oper nRegHardFem : Str ->CommNoun= \stem ->
let i = iAfter stem in
let o = oAfter stem in
{ s = table {
SF Sg Nom => stem+"а" ;
SF Sg Gen => stem+i ;
SF Sg Dat => stem+"е" ;
SF Sg Acc => stem+"у" ;
SF Sg Inst => stem+o+"й" ;
SF Sg (Prepos _) => stem+"е" ;
SF Pl Nom => stem+i ;
SF Pl Gen => stem ;
SF Pl Dat => stem+"ам" ;
SF Pl Acc => stem+i ;
SF Pl Inst => stem+"ами" ;
SF Pl (Prepos _) => stem+"ах" };
g = Fem; anim = Inanimate };
-- 2. Soft regular masculine inanimate, e.g. vichr'
oper nRegSoftMasc : Str ->CommNoun= \stem ->
{ s = table {
SF Sg Nom => stem+"ь";
SF Sg Gen => stem+"я" ;
SF Sg Dat => stem+"ю" ;
SF Sg Acc => stem+"ь" ;
SF Sg Inst => stem+"ем" ;
SF Sg (Prepos _) => stem+"е" ;
SF Pl Nom => stem+"и" ;
SF Pl Gen => stem+"ей" ;
SF Pl Dat => stem+"ям" ;
SF Pl Acc => stem+"и" ;
SF Pl Inst => stem+"ями" ;
SF Pl (Prepos _) => stem+"ях" };
g = Masc; anim = Inanimate };
-- 2. Soft regular neuter inanimate, e.g. more
oper nRegSoftNeut : Str ->CommNoun= \stem ->
{ s = table {
SF Sg Nom => stem+"е";
SF Sg Gen => stem+"я" ;
SF Sg Dat => stem+"ю" ;
SF Sg Acc => stem+"е" ;
SF Sg Inst => stem+"ем" ;
SF Sg (Prepos _) => stem+"е" ;
SF Pl Nom => stem+"я" ;
SF Pl Gen => stem+"ей" ;
SF Pl Dat => stem+"ям" ;
SF Pl Acc => stem+"я" ;
SF Pl Inst => stem+"ями" ;
SF Pl (Prepos _) => stem+"ях" };
g = Neut; anim = Inanimate };
-- 2. Soft regular feminine inanimate, e.g. burya
oper nRegSoftFem : Str ->CommNoun= \stem ->
{ s = table {
SF Sg Nom => stem+"я";
SF Sg Gen => stem+"и" ;
SF Sg Dat => stem+"е" ;
SF Sg Acc => stem+"ю" ;
SF Sg Inst => stem+"ей" ;
SF Sg (Prepos _) => stem+"е" ;
SF Pl Nom => stem+"и" ;
SF Pl Gen => stem+"ь" ;
SF Pl Dat => stem+"ям" ;
SF Pl Acc => stem+"и" ;
SF Pl Inst => stem+"ями" ;
SF Pl (Prepos _) => stem+"ях" };
g = Fem; anim = Inanimate };
-- 6. Masc ending in -Vй (V = vowel)
oper nDecl6Masc : Str ->CommNoun= \stem ->
let n = nRegSoftMasc stem in
{ s = table {
SF Sg (Nom|Acc) => stem+"й";
SF Pl Gen => stem+"ев" ;
sf => n.s!sf };
g = n.g; anim = n.anim };
-- 6. Neut ending in -Ve (V = vowel) (not adjectives)
oper nDecl6Neut : Str ->CommNoun= \stem ->
let n = nRegSoftNeut stem in
{ s = table {
SF Pl Gen => stem+"й" ;
sf => n.s!sf };
g = n.g; anim = n.anim };
-- 6. Fem ending in -Vя (V = vowel)
oper nDecl6Fem : Str ->CommNoun= \stem ->
let n = nRegSoftFem stem in
{ s = table {
SF Pl Gen => stem+"й" ;
sf => n.s!sf };
g = n.g; anim = n.anim };
-- 7. stem ending in и
oper nDecl7Masc : Str ->CommNoun= \stem ->
let n = nDecl6Masc stem in
{ s = table {
SF Sg (Prepos _) => stem+"и" ;
sf => n.s!sf };
g = n.g; anim = n.anim };
-- 7. stem ending in и
oper nDecl7Neut : Str ->CommNoun= \stem ->
let n = nDecl6Neut stem in
{ s = table {
SF Sg (Prepos _) => stem+"и" ;
sf => n.s!sf };
g = n.g; anim = n.anim };
-- 7. stem ending in и
oper nDecl7Fem : Str ->CommNoun= \stem ->
let n = nDecl6Fem stem in
{ s = table {
SF Sg (Dat|Prepos _) => stem+"и" ;
sf => n.s!sf };
g = n.g; anim = n.anim };
-- 8. Feminine ending in soft consonant
oper nDecl8 : Str ->CommNoun= \stem ->
let a : Str = case stem of { _+("ч"|"щ"|"ш"|"ж") => "а"; _ => "я" } in
{ s = table {
SF Sg Nom => stem+"ь";
SF Sg Gen => stem+"и" ;
SF Sg Dat => stem+"и" ;
SF Sg Acc => stem+"ь" ;
SF Sg Inst => stem+"ью" ;
SF Sg (Prepos _) => stem+"и" ;
SF Pl Nom => stem+"и" ;
SF Pl Gen => stem+"ей" ;
SF Pl Dat => stem+a+"м" ;
SF Pl Acc => stem+"и" ;
SF Pl Inst => stem+a+"ми" ;
SF Pl (Prepos _) => stem+a+"х" };
g = Fem; anim = Inanimate };
-- 9. Neut ending in -мя
oper nDecl9 : Str ->CommNoun= \stem ->
{ s = table {
SF Sg Nom => stem+"мя";
SF Sg Gen => stem+"мени" ;
SF Sg Dat => stem+"мени" ;
SF Sg Acc => stem+"мя" ;
SF Sg Inst => stem+"менем" ;
SF Sg (Prepos _) => stem+"мени" ;
SF Pl Nom => stem+"мена" ;
SF Pl Gen => stem+"мён" ;
SF Pl Dat => stem+"менам" ;
SF Pl Acc => stem+"мена" ;
SF Pl Inst => stem+"менами" ;
SF Pl (Prepos _) => stem+"менах" };
g = Fem; anim = Inanimate };
-- Nouns inflected as adjectives.
oper nAdj : Adjective -> Gender ->CommNoun= \a,g ->
{ s = table {
SF Sg c => a.s!AF c Inanimate (ASg g) ;
SF Pl c => a.s!AF c Inanimate APl };
g = g; anim = Inanimate } ;
oper
CommNoun = {s : SubstForm => Str ; g : Gender ; anim : Animacy } ;
SubstFormDecl = SS1 SubstForm ;
@@ -365,42 +626,6 @@ oper eeEndInAnimateDecl: Str -> CommNoun = \obezbolivauch ->
g = Neut ; anim = Inanimate
} ;
oper oeEndInAnimateDecl: Str -> CommNoun = \snotvorn ->
{ s = table
{ SF Sg Nom => snotvorn +"ое";
SF Sg Gen => snotvorn+"ого" ;
SF Sg Dat => snotvorn+"ому" ;
SF Sg Acc => snotvorn +"ое";
SF Sg Inst => snotvorn+"ым" ;
SF Sg (Prepos _) => snotvorn+"ом" ;
SF Pl Nom => snotvorn+"ые" ;
SF Pl Gen => snotvorn+"ых" ;
SF Pl Dat => snotvorn+"ым" ;
SF Pl Acc => snotvorn+"ые" ;
SF Pl Inst => snotvorn+"ыми" ;
SF Pl (Prepos _) => snotvorn+"ых"
} ;
g = Neut ; anim = Inanimate
} ;
oper oeEndAnimateDecl: Str -> CommNoun = \snotvorn ->
{ s = table
{ SF Sg Nom => snotvorn +"ое";
SF Sg Gen => snotvorn+"ого" ;
SF Sg Dat => snotvorn+"ому" ;
SF Sg Acc => snotvorn +"ое";
SF Sg Inst => snotvorn+"ым" ;
SF Sg (Prepos _) => snotvorn+"ом" ;
SF Pl Nom => snotvorn+"ые" ;
SF Pl Gen => snotvorn+"ых" ;
SF Pl Dat => snotvorn+"ым" ;
SF Pl Acc => snotvorn+"ые" ;
SF Pl Inst => snotvorn+"ыми" ;
SF Pl (Prepos _) => snotvorn+"ых"
} ;
g = Neut ; anim = Animate
} ;
oper irregPl_StemInAnimateDecl: Str -> CommNoun = \derev ->
{ s = table
{ SF Sg Nom => derev+"о" ;
@@ -440,25 +665,6 @@ oper LittleAnimalDecl: Str -> CommNoun = \reb ->
} ;
oper aEndG_K_KH_Decl: Str -> CommNoun = \nog ->
{ s = table {
SF Sg Nom => nog+"а" ;
SF Sg Gen => nog+"и" ;
SF Sg Dat => nog+"е" ;
SF Sg Acc => nog+"у" ;
SF Sg Inst => nog+"ой" ;
SF Sg (Prepos _) => nog+"е" ;
SF Pl Nom => nog+"и" ;
SF Pl Gen => nog ;
SF Pl Dat => nog+"ам" ;
SF Pl Acc => nog+ "и" ;
SF Pl Inst => nog+"ами" ;
SF Pl (Prepos _) => nog+"ах"
} ;
g = Fem ; anim = Inanimate
} ;
oper kg_oEnd_SgDecl: Str -> CommNoun = \mnog ->
{ s = table {
SF _ Nom => mnog+"о" ;
@@ -518,73 +724,118 @@ oper eEnd_Decl: Str -> CommNoun = \vs ->
g = Neut ; anim = Inanimate
} ;
--mkAdjCommNounMascInanim: Adjective -> CommNoun =
--\a ->
--{ s = table {
-- SF Sg Nom => a.s ! AF Nom Inanimate (ASg Masc) ;
-- SF Sg Gen => a.s ! AF Gen Inanimate (ASg Masc) ;
-- SF Sg Dat => a.s ! AF Dat Inanimate (ASg Masc) ;
-- SF Sg Acc => a.s ! AF Acc Inanimate (ASg Masc) ;
-- SF Sg Inst => a.s ! AF Inst Inanimate (ASg Masc) ;
-- SF Sg (Prepos _) => a.s ! AF Prepos Inanimate (ASg Masc) ;
-- SF Pl Nom => a.s ! AF Nom Inanimate APl ;
-- SF Pl Gen => a.s ! AF Gen Inanimate APl;
-- SF Pl Dat => a.s ! AF Dat Inanimate APl ;
-- SF Pl Acc => a.s ! AF Acc Inanimate APl ;
-- SF Pl Inst => a.s ! AF Inst Inanimate APl ;
-- SF Pl (Prepos _) => a.s ! AF Prepos Inanimate APl;
-- };
-- g = Masc ;
-- anim = Inanimate
--};
----2 Adjectives
--
---- Type Adjective only has positive degree while AdjDegr type
---- includes also comparative and superlative forms.
---- The later entries can be converted into the former using
---- "extAdjective" operation defined in the syntax module
---- and vice verca using "mkAdjDeg" operation.
--
--oper
-- adjInvar: Str -> Adjective = \s -> { s = \\af => s };
--
kazhdujDet: Adjective = uy_j_EndDecl "кажд" ;
samuj: Adjective = uy_j_EndDecl "сам" ;
kazhdujDet: Adjective = aRegHardStemStress "кажд" ;
samuj : Adjective = aRegHardStemStress "сам" ;
-- lubojDet: Adjective = uy_oj_EndDecl "люб" ;
-- drugojDet: Adjective = uy_oj_EndDecl "друг" ;
-- glaznoj: Adjective = uy_oj_EndDecl "глазн" ;
kotorujDet: Adjective = uy_j_EndDecl "котор";
nekotorujDet: Adjective = uy_j_EndDecl "некотор";
takoj: Adjective = i_oj_EndDecl "так" [];
kotorujDet: Adjective = aRegHardStemStress "котор";
nekotorujDet: Adjective = aRegHardStemStress "некотор";
takoj: Adjective = aRegHardEndStress "так";
-- kakojNibudDet: Adjective = i_oj_EndDecl "как" "-нибудь";
-- kakojDet: Adjective = i_oj_EndDecl "как" [];
-- nikakojDet: Adjective = i_oj_EndDecl "никак" [];
bolshinstvoSgDet: Adjective = extAdjFromSubst (oEnd_SgDecl "большинств");
mnogoSgDet: Adjective = extAdjFromSubst (kg_oEnd_SgDecl "мног");
skolkoSgDet: Adjective = extAdjFromSubst (kg_oEnd_SgDecl "скольк");
bolshinstvoSgDet: Adjective = extAdjFromSubst (nRegHardNeut "большинств");
mnogoSgDet: Adjective = extAdjFromSubst (nRegHardNeut "мног");
nemnogoSgDet: Adjective = extAdjFromSubst (nRegHardNeut "немног");
skolkoSgDet: Adjective = extAdjFromSubst (nRegHardNeut "скольк");
-- bolshinstvoPlDet: Adjective = extAdjFromSubst (oEnd_PlDecl "большинств");
oper aRegHardStemStress : Str -> Adjective = \stem -> aRegHard stem False ;
oper aRegHardEndStress : Str -> Adjective = \stem -> aRegHard stem True;
-- 1. regular hard adjective
-- 3. stem ending with г, к, х
-- 4. stem ending with ш, ж, ч, щ
-- 5. stem ending with ц
oper aRegHard : Str -> Bool -> Adjective = \stem, endStress ->
let i = iAfter stem in
let o = case endStress of {
True => "о" ;
False => oAfter stem } in
{ s = table {
AF Nom _ (ASg Masc) => stem + case endStress of {
True => "ой";
False => iAfter stem + "й" } ;
AF Nom _ (ASg Neut) => stem + o+"е";
AF Gen _ (ASg (Masc|Neut)) => stem + o+"го";
AF Dat _ (ASg (Masc|Neut)) => stem + o+"му";
AF Acc Inanimate (ASg Masc) => stem + i+"й";
AF Acc Animate (ASg Masc) => stem + o+"го";
AF Acc _ (ASg Neut) => stem + o+"е";
AF Inst _ (ASg (Masc|Neut)) => stem + i+"м";
AF (Prepos _) _ (ASg (Masc|Neut)) => stem + o+"м";
AF Nom _ (ASg Fem) => stem + "ая";
AF Acc _ (ASg Fem) => stem + "ую";
AF _ _ (ASg Fem) => stem + o+"й";
AF Nom _ APl => stem + i+"е";
AF Acc Inanimate APl => stem + i+"е";
AF Acc Animate APl => stem + i+"х";
AF Gen _ APl => stem + i+"х";
AF Inst _ APl => stem + i+"ми";
AF Dat _ APl => stem + i+"м";
AF (Prepos _) _ APl => stem + i+"х";
AFShort (ASg Masc) => stem;
AFShort (ASg Fem) => stem + "а";
AFShort (ASg Neut) => stem + o ;
AFShort APl => stem + i;
AdvF => stem + o
} } ;
oper aRegSoft : Str -> Adjective = \stem ->
{ s = table {
AF Nom _ (ASg Masc) => stem + "ий" ;
AF Nom _ (ASg Neut) => stem + "ее";
AF Gen _ (ASg (Masc|Neut)) => stem + "его";
AF Dat _ (ASg (Masc|Neut)) => stem + "ему";
AF Acc Inanimate (ASg Masc) => stem + "ий";
AF Acc Animate (ASg Masc) => stem + "его";
AF Acc _ (ASg Neut) => stem + "ее";
AF Inst _ (ASg (Masc|Neut)) => stem + "им";
AF (Prepos _) _ (ASg (Masc|Neut)) => stem + "ем";
AF Nom _ (ASg Fem) => stem + "яя";
AF Acc _ (ASg Fem) => stem + "юю";
AF _ _ (ASg Fem) => stem + "ей";
AF Nom _ APl => stem + "ие";
AF Acc Inanimate APl => stem + "ие";
AF Acc Animate APl => stem + "их";
AF Gen _ APl => stem + "их";
AF Inst _ APl => stem + "ими";
AF Dat _ APl => stem + "им";
AF (Prepos _) _ APl => stem + "их";
AFShort (ASg Masc) => stem; -- FIXME: add e if stem ends in consonant + n
AFShort (ASg Fem) => stem + "я";
AFShort (ASg Neut) => stem + "е" ;
AFShort APl => stem + "и" ;
AdvF => stem + "е"
} } ;
bolshinstvoPlDet: Adjective = extAdjFromSubst (oEnd_PlDecl "большинств");
vseDetPl: Adjective = extAdjFromSubst (eEnd_Decl "вс") ;
extAdjFromSubst: CommNoun -> Adjective = \ vse ->
{s = \\af => vse.s ! SF (numAF af) (caseAF af) } ;
oper
AdjDegr : Type = {s : Degree => AdjForm => Str} ;
oper mkAdjDeg: Adjective -> Str -> AdjDegr = \adj, s ->
{ s = table
{
Posit => adj.s ;
Compar => \\af => s ;
Superl => \\af => samuj.s !af ++ adj.s ! af
}
};
--oper uzhasnuj: AdjDegr = mkAdjDeg (uy_j_EndDecl "ужасн") "ужаснее";
--oper schastlivyuj: AdjDegr = mkAdjDeg (uy_j_EndDecl "счастлив") "счастливее";
--oper deshevuj: AdjDegr = mkAdjDeg (uy_j_EndDecl "дешев") "дешевле";
--oper staruj: AdjDegr = mkAdjDeg (uy_j_EndDecl "стар") "старше";
oper totDet: Adjective = {s = table {
AF Nom _ (ASg Masc) => "тот";
@@ -795,210 +1046,8 @@ oper ti_j_EndDecl : Str -> Adjective = \s ->{s = table {
} ;
-}
--oper shi_j_EndDecl : Str -> Adjective = \s ->{s = table {
-- AF Nom _ (ASg Masc) => s+"ий";
-- AF Nom _ (ASg Fem) => s+"ая";
-- AF Nom _ (ASg Neut) => s+"ое";
-- AF Nom _ APl => s+"ие";
-- AF Acc Inanimate (ASg Masc) => s+"ий";
-- AF Acc Animate (ASg Masc) => s+"его";
-- AF Acc _ (ASg Fem) => s+"ую";
-- AF Acc _ (ASg Neut) => s+"ое";
-- AF Acc Inanimate APl => s+"ие";
-- AF Acc Animate APl => s+"их";
-- AF Gen _ (ASg Masc) => s+"его";
-- AF Gen _ (ASg Fem) => s+"ей";
-- AF Gen _ (ASg Neut) => s+"его";
-- AF Gen _ APl => s+"их";
-- AF Inst _ (ASg Masc) => s+"им";
-- AF Inst _ (ASg Fem) => s+"ей";
-- AF Inst _ (ASg Neut) => s+"им";
-- AF Inst _ APl => s+"ими";
-- AF Dat _ (ASg Masc) => s+"ему";
-- AF Dat _ (ASg Fem) => s+"ей";
-- AF Dat _ (ASg Neut) => s+"ему";
-- AF Dat _ APl => s+"им";
-- AF (Prepos _) _ (ASg Masc) => s+"ем";
-- AF (Prepos _) _ (ASg Fem) => s+"ей";
-- AF (Prepos _) _ (ASg Neut) => s+"ем";
-- AF (Prepos _) _ APl => s+"их";
-- AdvF => s + "о"
-- }
-- } ;
--oper indijskij: Adjective = ij_EndK_G_KH_Decl "индийск" ;
--oper francuzskij: Adjective = ij_EndK_G_KH_Decl "французск" ;
--oper anglijskij: Adjective = ij_EndK_G_KH_Decl "английск" ;
--oper datskij: Adjective = ij_EndK_G_KH_Decl "датск" ;
--oper russkij: Adjective = ij_EndK_G_KH_Decl "русск" ;
--oper italyanskij: Adjective = ij_EndK_G_KH_Decl "итальянск" ;
--oper yaponskij: Adjective = ij_EndK_G_KH_Decl "японск" ;
--oper malenkij: AdjDegr = mkAdjDeg (ij_EndK_G_KH_Decl "маленьк") "меньше" ;
--oper vusokij: AdjDegr = mkAdjDeg (ij_EndK_G_KH_Decl "высок") "выше";
oper ij_EndK_G_KH_Decl : Str -> Adjective = \s ->{s = table {
AF Nom _ (ASg Masc) => s+"ий";
AF Nom _ (ASg Fem) => s+"ая";
AF Nom _ (ASg Neut) => s+"ое";
AF Nom _ APl => s+"ие";
AF Acc Animate (ASg Masc) => s+"ого";
AF Acc Inanimate (ASg Masc) => s+"ий";
AF Acc _ (ASg Fem) => s+"ую";
AF Acc _ (ASg Neut) => s+"ое";
AF Acc Animate APl => s+"их";
AF Acc Inanimate APl => s+"ие";
AF Gen _ (ASg Masc) => s+"ого";
AF Gen _ (ASg Fem) => s+"ой";
AF Gen _ (ASg Neut) => s+"ого";
AF Gen _ APl => s+"их";
AF Inst _ (ASg Masc) => s+"им";
AF Inst _ (ASg Fem) => s+"ой";
AF Inst _ (ASg Neut) => s+"им";
AF Inst _ APl => s+"ими";
AF Dat _ (ASg Masc) => s+"ому";
AF Dat _ (ASg Fem) => s+"ой";
AF Dat _ (ASg Neut) => s+"ому";
AF Dat _ APl => s+"им";
AF (Prepos _) _ (ASg Masc) => s+"ом";
AF (Prepos _) _ (ASg Fem) => s+"ой";
AF (Prepos _) _ (ASg Neut) => s+"ом";
AF (Prepos _) _ APl => s+"их";
AFShort (ASg Masc) => s;
AFShort (ASg Fem) => s + "а";
AFShort (ASg Neut) => s + "о" ;
AFShort APl => s + "и";
AdvF => s + "о"
}
} ;
oper shij_End_Decl : Str -> Adjective = \s ->{s = table {
AF Nom _ (ASg Masc) => s+"ий";
AF Nom _ (ASg Fem) => s+"ая";
AF Nom _ (ASg Neut) => s+"ее";
AF Nom _ APl => s+"ие";
AF Acc Animate (ASg Masc) => s+"его";
AF Acc Inanimate (ASg Masc) => s+"ий";
AF Acc _ (ASg Fem) => s+"ую";
AF Acc _ (ASg Neut) => s+"ее";
AF Acc Animate APl => s+"их";
AF Acc Inanimate APl => s+"ие";
AF Gen _ (ASg Masc) => s+"его";
AF Gen _ (ASg Fem) => s+"ей";
AF Gen _ (ASg Neut) => s+"его";
AF Gen _ APl => s+"их";
AF Inst _ (ASg Masc) => s+"им";
AF Inst _ (ASg Fem) => s+"ей";
AF Inst _ (ASg Neut) => s+"им";
AF Inst _ APl => s+"ими";
AF Dat _ (ASg Masc) => s+"ему";
AF Dat _ (ASg Fem) => s+"ей";
AF Dat _ (ASg Neut) => s+"ему";
AF Dat _ APl => s+"им";
AF (Prepos _) _ (ASg Masc) => s+"ем";
AF (Prepos _) _ (ASg Fem) => s+"ей";
AF (Prepos _) _ (ASg Neut) => s+"ем";
AF (Prepos _) _ APl => s+"их";
AFShort (ASg Masc) => s;
AFShort (ASg Fem) => s + "а";
AFShort (ASg Neut) => s + "е" ;
AFShort APl => s + "и";
AdvF => s + "о"
}
} ;
--oper bolshoj: AdjDegr = mkAdjDeg (i_oj_EndDecl "больш" []) "больше";
--oper dorogoj: AdjDegr = mkAdjDeg (i_oj_EndDecl "дорог" []) "дороже";
oper i_oj_EndDecl : Str -> Str -> Adjective = \s, chastica ->{s = table {
AF Nom _ (ASg Masc) => s+"ой" + chastica ;
AF Nom _ (ASg Fem) => s+"ая"+ chastica ;
AF Nom _ (ASg Neut) => s+"ое"+ chastica ;
AF Nom _ APl => s+"ие"+ chastica ;
AF Acc Animate (ASg Masc) => s+"ого"+ chastica ;
AF Acc Inanimate (ASg Masc) => s+"ой"+ chastica ;
AF Acc _ (ASg Fem) => s+"ую"+ chastica ;
AF Acc _ (ASg Neut) => s+"ое"+ chastica ;
AF Acc Animate APl => s+"их"+ chastica ;
AF Acc Inanimate APl => s+"ие"+ chastica ;
AF Gen _ (ASg Masc) => s+"ого"+ chastica ;
AF Gen _ (ASg Fem) => s+"ой"+ chastica ;
AF Gen _ (ASg Neut) => s+"ого"+ chastica ;
AF Gen _ APl => s+"их"+ chastica ;
AF Inst _ (ASg Masc) => s+"им"+ chastica ;
AF Inst _ (ASg Fem) => s+"ой"+ chastica ;
AF Inst _ (ASg Neut) => s+"им"+ chastica ;
AF Inst _ APl => s+"ими"+ chastica ;
AF Dat _ (ASg Masc) => s+"ому"+ chastica ;
AF Dat _ (ASg Fem) => s+"ой"+ chastica ;
AF Dat _ (ASg Neut) => s+"ому"+ chastica ;
AF Dat _ APl => s+"им"+ chastica ;
AF (Prepos _) _ (ASg Masc) => s+"ом"+ chastica ;
AF (Prepos _) _ (ASg Fem) => s+"ой"+ chastica ;
AF (Prepos _) _ (ASg Neut) => s+"ом"+ chastica ;
AF (Prepos _) _ APl => s+"их" + chastica;
AFShort (ASg Masc) => s;
AFShort (ASg Fem) => s + "а";
AFShort (ASg Neut) => s + "о" ;
AFShort APl => s + "и";
AdvF => s + "о"
}
} ;
--oper molodoj: AdjDegr = mkAdjDeg (uy_oj_EndDecl "молод") "моложе";
oper uy_oj_EndDecl : Str -> Adjective = \s ->{s = table {
AF Nom _ (ASg Masc) => s+"ой";
AF Nom _ (ASg Fem) => s+"ая";
AF Nom _ (ASg Neut) => s+"ое";
AF Nom _ APl => s+"ые";
AF Acc Animate (ASg Masc) => s+"ого";
AF Acc Inanimate (ASg Masc) => s+"ой";
AF Acc _ (ASg Fem) => s+"ую";
AF Acc _ (ASg Neut) => s+"ое";
AF Acc Animate APl => s+"ых";
AF Acc Inanimate APl => s+"ые";
AF Gen _ (ASg Masc) => s+"ого";
AF Gen _ (ASg Fem) => s+"ой";
AF Gen _ (ASg Neut) => s+"ого";
AF Gen _ APl => s+"ых";
AF Inst _ (ASg Masc) => s+"ым";
AF Inst _ (ASg Fem) => s+"ой";
AF Inst _ (ASg Neut) => s+"ым";
AF Inst _ APl => s+"ыми";
AF Dat _ (ASg Masc) => s+"ому";
AF Dat _ (ASg Fem) => s+"ой";
AF Dat _ (ASg Neut) => s+"ому";
AF Dat _ APl => s+"ым";
AF (Prepos _) _ (ASg Masc) => s+"ом";
AF (Prepos _) _ (ASg Fem) => s+"ой";
AF (Prepos _) _ (ASg Neut) => s+"ом";
AF (Prepos _) _ APl => s+"ых";
AFShort (ASg Masc) => s;
AFShort (ASg Fem) => s + "а";
AFShort (ASg Neut) => s + "о" ;
AFShort APl => s + "ы";
AdvF => s + "о"
}
} ;
--oper prostuzhen: Adjective = shortDecl1 "простужен" ;
--oper beremenen: Adjective = shortDecl "беремен" ;
--oper need: Adjective = shortDecl "нуж" ;
--oper shortDecl1 : Str -> Adjective = \s ->{s = table {
-- AF _ _ (ASg Masc) => s;
-- AF _ _ (ASg Fem) => s+"а";
-- AF _ _ (ASg Neut) => s+"о";
-- AF _ _ APl => s+"ы" ;
-- AdvF => s + "о"
-- }
-- } ;
--oper shortDecl : Str -> Adjective = \s ->{s = table {
-- AF _ _ (ASg Masc) => s +"ен";
-- AF _ _ (ASg Fem) => s+"на";
-- AF _ _ (ASg Neut) => s+"но";
-- AF _ _ APl => s+"ны" ;
-- AdvF => s + "о"
-- }-- } ;
--
---- 2 Adverbs
--
--oper vsegda: Adverb = { s = "всегда" } ;

View File

@@ -122,28 +122,16 @@ oper
-- in the current description, otherwise there would be 32 forms for
-- positive degree.
-- mkA : ( : Str) -> A ;
mkA : overload {
-- The regular function captures the variants for some popular adjective
-- endings below. The first string agrument is the masculine singular form,
-- the second is comparative:
regA : Str -> Str -> A ;
-- Regular and invariant adjectives with regular comparative.
mkA : (positive : Str) -> A ;
-- Invariable adjective is a special case.
-- Adjectives with irregular comparative.
adjInvar : Str -> A ; -- khaki, mini, hindi, netto
-- Some regular patterns depending on the ending.
AStaruyj : Str -> Str -> A ; -- ending with "-ый"
AMalenkij : Str -> Str -> A ; -- ending with "-ий", Gen - "маленьк-ого"
AKhoroshij : Str -> Str -> A ; -- ending with "-ий", Gen - "хорош-его"
AMolodoj : Str -> Str -> A ; -- ending with "-ой",
-- plural - молод-ые"
AKakoj_Nibud : Str -> Str -> Str -> A ; -- ending with "-ой",
-- plural - "как-ие"
mkA : (positive, comparative : Str) -> A ;
} ;
-- Two-place adjectives need a preposition and a case as extra arguments.
@@ -286,9 +274,9 @@ foreign = Foreign; -- +++ MG_UR: added +++
-- Noun definitions
mkN = overload {
mkN : (karta : Str) -> N = regN ;
mkN : (tigr : Str) -> Animacy -> N = \nom, anim -> case anim of { Animate => animateN (regN nom) ;
Inanimate => regN nom } ;
mkN : (karta : Str) -> N = mk1N ;
mkN : (tigr : Str) -> Animacy -> N = \nom, anim -> case anim of { Animate => animateN (mk1N nom) ;
Inanimate => mk1N nom } ;
mkN : (nomSg, genSg, datSg, accSg, instSg, preposSg, prepos2Sg,
nomPl, genPl, datPl, accPl, instPl, preposPl : Str) -> Gender -> Animacy -> N = mkWorstN
} ;
@@ -338,7 +326,7 @@ foreign = Foreign; -- +++ MG_UR: added +++
anim = Animate
} ** {lock_N = <>};
oper regN : Str -> N = \x ->
oper mk1N : Str -> N = \x ->
case x of {
-- stem+"oнoк" => nDecl10 stem ;
-- stem+"aнин" => nDecl11 stem ;
@@ -348,277 +336,19 @@ foreign = Foreign; -- +++ MG_UR: added +++
stem@(_+("а"|"е"|"ё"|"о"|"у"|"ы"|"э"|"ю"|"я"))+"й" => nDecl6Masc stem ;
stem@(_+("а"|"е"|"ё"|"о"|"у"|"ы"|"э"|"ю"|"я"))+"е" => nDecl6Neut stem ;
stem@(_+("а"|"е"|"ё"|"о"|"у"|"ы"|"э"|"ю"|"я"))+"я" => nDecl6Fem stem ;
-- stem+"ее" => nAdj (regA (stem+"ий")) Neut;
-- stem+"ое" => nAdj (regA (stem+(iAfter stem)+"й")) Neut;
stem+"ее" => nAdj { s = (mk1A (stem+"ий")).s!Posit } Neut;
stem+"ое" => nAdj { s = (mk1A (stem+(iAfter stem)+"й")).s!Posit } Neut;
stem+"мя" => nDecl9 stem ;
stem@(_+("ч"|"щ"|"ш"|"ж"|"п"|"эн"|"м"|"ф"))+"ь" => nDecl8 stem ;
stem@(_+("д"|"т"|"ст"|"с"|"в"|"б"))+"ь" => nDecl8 stem ;
stem@(_+"ш"|"ж"|"ч"|"щ"|"ц")+"е" => regHardNeut stem;
stem+"е" => regSoftNeut stem ;
stem+"я" => regSoftFem stem ;
stem+"ь" => regSoftMasc stem ;
stem+"о" => regHardNeut stem ;
stem+"а" => regHardFem stem ;
stem => regHardMasc stem
};
{-
Paradigms:
1. hard regular
Masc -Consonant
Neut -o
Fem -a
1*. with vowel changes, Masc in Gen Sg, Fem and Neut in Gen Pl
2. soft regular:
Masc -ь
Neut -е
Fem -я
2*. with vowel changes, Masc in Gen Sg, Fem in Gen Pl (no Neut)
3. stem ending in г, к, х
- Masc, Fem same as 1 but use и instead of ы (Nom/Acc Pl, Gen Sg)
- Neut -кo has Nom Pl -ки instead of -кa
3* with vowel changes, Masc in Gen Sg, Fem and Neut in Gen Pl
4. stem ending in ш, ж, ч, щ, hard endings,
use и instead of ы, and use е instead of unstressed o
5. stem ending in ц, hard endings, use е instead of unstressed o
5*. with vowel changes, Masc in Gen Sg, Fem and Neut in Gen Pl
6. Masc ending in -й, Fem stem ending in vowel, Neut ending in ь?
6* with vowel changes
7. stem ending in и
8. F2, Fem ending in -ь
all -чь, -щь, -шь, -жь
all -пь, -энь, -мь, -фь,
most -дь, -ть, -сть, -сь, -вь, -бь,
8*. with vowel changes in Ins Sg, Gen Sg
9. Neut ending in -мя
10. Masc in -oнoк
11. Masc in -aнин
12. Nom Pl in -ья
-}
oper iAfter : Str -> Str = \stem ->
case stem of {
_ + ("г"|"к"|"х") => "и" ;
_ + ("ш"|"ж"|"ч"|"щ") => "и" ;
_ => "ы"
};
oper oAfter : Str -> Str = \stem ->
case stem of {
_ + ("ш"|"ж"|"ч"|"щ") => "е" ;
_ + "ц" => "е" ;
_ => "о"
};
-- 1. Hard regular masculine inanimate, e.g. spor.
-- 3. stem ending in г, к, х
-- 4. stem ending in ш, ж, ч, щ
-- 5. stem ending in ц
oper regHardMasc : Str -> N = \stem ->
let i = iAfter stem in
let o = oAfter stem in
{ s = table {
SF Sg Nom => stem ;
SF Sg Gen => stem+"а" ;
SF Sg Dat => stem+"у" ;
SF Sg Acc => stem ;
SF Sg Inst => stem+o+"м" ;
SF Sg (Prepos _) => stem+"е" ;
SF Pl Nom => stem+i ;
SF Pl Gen => stem+case stem of { _+("ш"|"ж"|"ч"|"щ") => "ей"; _ => "ов" } ;
SF Pl Dat => stem+"ам" ;
SF Pl Acc => stem+i ;
SF Pl Inst => stem+"ами" ;
SF Pl (Prepos _) => stem+"ах" };
g = Masc; anim = Inanimate } ** {lock_N = <>} ;
-- 1. Hard regular neuter inanimate, e.g. pravilo.
-- 3. stem ending in г, к, х
-- 4. stem ending in ш, ж, ч, щ
-- 5. stem ending in ц
oper regHardNeut : Str -> N = \stem ->
let o = oAfter stem in
{ s = table {
SF Sg Nom => stem+o ;
SF Sg Gen => stem+"а" ;
SF Sg Dat => stem+"у" ;
SF Sg Acc => stem+o ;
SF Sg Inst => stem+o+"м" ;
SF Sg (Prepos _) => stem+"е" ;
SF Pl Nom => stem+case stem of { _+"к" => "и" ; _ => "а" } ;
SF Pl Gen => stem ;
SF Pl Dat => stem+"ам" ;
SF Pl Acc => stem+"а" ;
SF Pl Inst => stem+"ами" ;
SF Pl (Prepos _) => stem+"ах" };
g = Neut; anim = Inanimate } ** {lock_N = <>} ;
-- 1. Hard regular feminine inanimate, e.g. karta.
-- 3. stem ending in г, к, х
-- 4. stem ending in ш, ж, ч, щ
-- 5. stem ending in ц
oper regHardFem : Str -> N = \stem ->
let i = iAfter stem in
let o = oAfter stem in
{ s = table {
SF Sg Nom => stem+"а" ;
SF Sg Gen => stem+i ;
SF Sg Dat => stem+"е" ;
SF Sg Acc => stem+"у" ;
SF Sg Inst => stem+o+"й" ;
SF Sg (Prepos _) => stem+"е" ;
SF Pl Nom => stem+i ;
SF Pl Gen => stem ;
SF Pl Dat => stem+"ам" ;
SF Pl Acc => stem+i ;
SF Pl Inst => stem+"ами" ;
SF Pl (Prepos _) => stem+"ах" };
g = Fem; anim = Inanimate } ** {lock_N = <>} ;
-- 2. Soft regular masculine inanimate, e.g. vichr'
oper regSoftMasc : Str -> N = \stem ->
{ s = table {
SF Sg Nom => stem+"ь";
SF Sg Gen => stem+"я" ;
SF Sg Dat => stem+"ю" ;
SF Sg Acc => stem+"ь" ;
SF Sg Inst => stem+"ем" ;
SF Sg (Prepos _) => stem+"е" ;
SF Pl Nom => stem+"и" ;
SF Pl Gen => stem+"ей" ;
SF Pl Dat => stem+"ям" ;
SF Pl Acc => stem+"и" ;
SF Pl Inst => stem+"ями" ;
SF Pl (Prepos _) => stem+"ях" };
g = Masc; anim = Inanimate } ** {lock_N = <>} ;
-- 2. Soft regular neuter inanimate, e.g. more
oper regSoftNeut : Str -> N = \stem ->
{ s = table {
SF Sg Nom => stem+"е";
SF Sg Gen => stem+"я" ;
SF Sg Dat => stem+"ю" ;
SF Sg Acc => stem+"е" ;
SF Sg Inst => stem+"ем" ;
SF Sg (Prepos _) => stem+"е" ;
SF Pl Nom => stem+"я" ;
SF Pl Gen => stem+"ей" ;
SF Pl Dat => stem+"ям" ;
SF Pl Acc => stem+"я" ;
SF Pl Inst => stem+"ями" ;
SF Pl (Prepos _) => stem+"ях" };
g = Neut; anim = Inanimate } ** {lock_N = <>} ;
-- 2. Soft regular feminine inanimate, e.g. burya
oper regSoftFem : Str -> N = \stem ->
{ s = table {
SF Sg Nom => stem+"я";
SF Sg Gen => stem+"и" ;
SF Sg Dat => stem+"е" ;
SF Sg Acc => stem+"ю" ;
SF Sg Inst => stem+"ей" ;
SF Sg (Prepos _) => stem+"е" ;
SF Pl Nom => stem+"и" ;
SF Pl Gen => stem+"ь" ;
SF Pl Dat => stem+"ям" ;
SF Pl Acc => stem+"и" ;
SF Pl Inst => stem+"ями" ;
SF Pl (Prepos _) => stem+"ях" };
g = Fem; anim = Inanimate } ** {lock_N = <>} ;
-- 6. Masc ending in -Vй (V = vowel)
oper nDecl6Masc : Str -> N = \stem ->
let n = regSoftMasc stem in
{ s = table {
SF Sg (Nom|Acc) => stem+"й";
SF Pl Gen => stem+"ев" ;
sf => n.s!sf };
g = n.g; anim = n.anim } ** {lock_N = <>} ;
-- 6. Neut ending in -Ve (V = vowel) (not adjectives)
oper nDecl6Neut : Str -> N = \stem ->
let n = regSoftNeut stem in
{ s = table {
SF Pl Gen => stem+"й" ;
sf => n.s!sf };
g = n.g; anim = n.anim } ** {lock_N = <>} ;
-- 6. Fem ending in -Vя (V = vowel)
oper nDecl6Fem : Str -> N = \stem ->
let n = regSoftFem stem in
{ s = table {
SF Pl Gen => stem+"й" ;
sf => n.s!sf };
g = n.g; anim = n.anim } ** {lock_N = <>} ;
-- 7. stem ending in и
oper nDecl7Masc : Str -> N = \stem ->
let n = nDecl6Masc stem in
{ s = table {
SF Sg (Prepos _) => stem+"и" ;
sf => n.s!sf };
g = n.g; anim = n.anim } ** {lock_N = <>} ;
-- 7. stem ending in и
oper nDecl7Neut : Str -> N = \stem ->
let n = nDecl6Neut stem in
{ s = table {
SF Sg (Prepos _) => stem+"и" ;
sf => n.s!sf };
g = n.g; anim = n.anim } ** {lock_N = <>} ;
-- 7. stem ending in и
oper nDecl7Fem : Str -> N = \stem ->
let n = nDecl6Fem stem in
{ s = table {
SF Sg (Dat|Prepos _) => stem+"и" ;
sf => n.s!sf };
g = n.g; anim = n.anim } ** {lock_N = <>} ;
-- 8. Feminine ending in soft consonant
oper nDecl8 : Str -> N = \stem ->
let a : Str = case stem of { _+("ч"|"щ"|"ш"|"ж") => "а"; _ => "я" } in
{ s = table {
SF Sg Nom => stem+"ь";
SF Sg Gen => stem+"и" ;
SF Sg Dat => stem+"и" ;
SF Sg Acc => stem+"ь" ;
SF Sg Inst => stem+"ью" ;
SF Sg (Prepos _) => stem+"и" ;
SF Pl Nom => stem+"и" ;
SF Pl Gen => stem+"ей" ;
SF Pl Dat => stem+a+"м" ;
SF Pl Acc => stem+"и" ;
SF Pl Inst => stem+a+"ми" ;
SF Pl (Prepos _) => stem+a+"х" };
g = Fem; anim = Inanimate } ** {lock_N = <>} ;
-- 9. Neut ending in -мя
oper nDecl9 : Str -> N = \stem ->
{ s = table {
SF Sg Nom => stem+"мя";
SF Sg Gen => stem+"мени" ;
SF Sg Dat => stem+"мени" ;
SF Sg Acc => stem+"мя" ;
SF Sg Inst => stem+"менем" ;
SF Sg (Prepos _) => stem+"мени" ;
SF Pl Nom => stem+"мена" ;
SF Pl Gen => stem+"мён" ;
SF Pl Dat => stem+"менам" ;
SF Pl Acc => stem+"мена" ;
SF Pl Inst => stem+"менами" ;
SF Pl (Prepos _) => stem+"менах" };
g = Fem; anim = Inanimate } ** {lock_N = <>} ;
-- Nouns inflected as adjectives.
oper nAdj : A -> Gender -> N = \a,g ->
{ s = table {
SF Sg c => a.s!Posit!AF c Inanimate (ASg g) ;
SF Pl c => a.s!Posit!AF c Inanimate APl };
g = g; anim = Inanimate } ** {lock_N = <>} ;
stem@(_+"ш"|"ж"|"ч"|"щ"|"ц")+"е" => nRegHardNeut stem;
stem+"е" => nRegSoftNeut stem ;
stem+"я" => nRegSoftFem stem ;
stem+"ь" => nRegSoftMasc stem ;
stem+"о" => nRegHardNeut stem ;
stem+"а" => nRegHardFem stem ;
stem => nRegHardMasc stem
} ** {lock_N = <>} ;
@@ -661,27 +391,36 @@ Paradigms:
makeNP = \x,y,z -> UsePN (mkPN x y z) ;
-- Adjective definitions
regA = \ray, comp ->
let
ay = Predef.dp 2 ray ;
rays =
case ay of {
"ый" => AStaruyj ray comp;
"ой" => AMolodoj ray comp;
"ий" => AMalenkij ray comp;
_=> AKhoroshij ray comp
}
in
rays ;
mkA = overload {
mkA : (positive : Str) -> A = mk1A ;
mkA : (positive, comparative : Str) -> A = mk2A;
} ;
adjInvar = \s -> { s = \\_,_ => s } ** {lock_A= <>};
mk1A : Str -> A = \positive ->
let stem = Predef.dp 2 positive in mk2A positive (stem+"ее") ;
mk2A : Str -> Str -> A = \positive, comparative ->
case positive of {
stem+"ый" => mkAdjDeg (aRegHardStemStress stem) comparative ;
stem+"ой" => mkAdjDeg (aRegHardEndStress stem) comparative ;
stem@(_+("г"|"к"|"х"))+"ий" => mkAdjDeg (aRegHardStemStress stem) comparative;
stem@(_+("ш"|"ж"|"ч"|"щ"))+"ий" => mkAdjDeg (aRegHardStemStress stem) comparative;
stem+"ий" => mkAdjDeg (aRegSoft stem) comparative ;
stem => mkAdjDeg (adjInvar stem) comparative
} ;
-- khaki, mini, hindi, netto
adjInvar : Str -> Adjective = \stem -> { s = \\_ => stem } ;
oper mkAdjDeg: Adjective -> Str -> A = \adj, s ->
{ s = table
{
Posit => adj.s ;
Compar => \\af => s ;
Superl => \\af => samuj.s !af ++ adj.s ! af
}
} ** {lock_A = <>};
AStaruyj s comp = mkAdjDeg (uy_j_EndDecl s) comp ** {lock_A = <>} ;
AKhoroshij s comp = mkAdjDeg (shij_End_Decl s) comp ** {lock_A= <>};
AMalenkij s comp = mkAdjDeg (ij_EndK_G_KH_Decl s) comp ** {lock_A= <>};
AMolodoj s comp = mkAdjDeg (uy_oj_EndDecl s) comp ** {lock_A= <>};
AKakoj_Nibud s t comp = mkAdjDeg (i_oj_EndDecl s t) comp ** {lock_A= <>};
mkA2 a p c= a ** {s2 = p ; c = c; lock_A2 = <>};
-- mkADeg a s = mkAdjDeg a s ** {lock_ADeg = <>}; -- defined in morpho.RusU

View File

@@ -37,7 +37,7 @@ lin
everybody_NP = mkNP Pl (UseN ((eEnd_Decl "вс")**{lock_N=<>})) ;
everything_NP = UsePron (pronVseInanimate ** {lock_Pron=<>}) ;
everywhere_Adv = ss "везде" ;
few_Det = (ij_EndK_G_KH_Decl "немног") **{lock_Det= <>; n= Sg; g = PNoGen; c = Nom}; -- AMalenkij
few_Det = nemnogoSgDet **{lock_Det= <>; n= Sg; g = PNoGen; c = Nom};
--- DEPREC first_Ord = (uy_j_EndDecl "перв" ) ** {lock_A = <>}; --AStaruyj
from_Prep = { s = "от" ; c = Gen };
he_Pron = pronOn ;