From a0a9c31745811d83ca37ce258761daa58f5181d8 Mon Sep 17 00:00:00 2001 From: EkaterinaVoloshina Date: Mon, 11 Mar 2024 11:53:39 +0100 Subject: [PATCH 1/6] updated AdjType --- src/russian/LexiconRus.gf | 87 ++++++++++++++++++------------------- src/russian/ParadigmsRus.gf | 40 ++++++++--------- 2 files changed, 63 insertions(+), 64 deletions(-) diff --git a/src/russian/LexiconRus.gf b/src/russian/LexiconRus.gf index f6f57808..4f9f665d 100644 --- a/src/russian/LexiconRus.gf +++ b/src/russian/LexiconRus.gf @@ -13,16 +13,16 @@ lin apartment_N = mkN "квартира" ; apple_N = mkN "яблоко" neuter inanimate "3a(1)" ; art_N = mkN "искусство" ; - ashes_N = mkN "пепел" masculine inanimate "1*a" only_singular; + ashes_N = mkN "пепел" masculine inanimate "1*a" only_singular(mkA "пепельный") ; ask_V2Q = dirV2 (mkV perfective transitive "спросить" "спрошу" "спросит" "4c") ; baby_N = mkN "малыш" masculine animate "4b" ; - back_N = mkN "спина" ; + back_N = mkN "спина" (mkA "спинной") ; bad_A = mkA "плохой" "хуже" "3b/c'"; bank_N = mkN "банк" ; bark_N = (mkNplus (mkN "кора")) ** {mayben=only_singular} ; beautiful_A = mkA "красивый" ; become_VA = mkV imperfective intransitive "становиться" "становлюсь" "становится"; - beer_N = mkN "пиво" neuter inanimate ; + beer_N = mkN "пиво" neuter inanimate (mkA "пивной") ; beg_V2V = dirV2 (mkV imperfective transitive "просить" "прошу" "просит" "4c"); belly_N = mkN "живот" ; big_A = (mkAltShort (mkA "большой" "больше" "4b") (mkA "великий")) ; @@ -33,9 +33,9 @@ lin blood_N = mkN "кровь" ; blow_V = mkV imperfective "дуть" "дую" "дует"; blue_A = mkA "голубой" ; - boat_N = mkN "лодка" ; - bone_N = mkN "кость" ; - book_N = mkN "книга" ; + boat_N = mkN "лодка" (mkA "лодочный") ; + bone_N = mkN "кость" (mkA "костный") ; + book_N = mkN "книга" (mkA "книжный") ; boot_N = mkN "сапог" ; boss_N = mkN "начальник" masculine animate ; boy_N = mkN "мальчик" masculine animate ; @@ -54,16 +54,16 @@ lin car_N = mkN "машина" ; carpet_N = mkN "ковёр" masculine inanimate "1*b" ; cat_N = mkN "кошка" feminine animate "3*a" ; - ceiling_N = mkN "потолок" masculine inanimate "3*b"; + ceiling_N = mkN "потолок" masculine inanimate "3*b"(mkA "потолочный") ; chair_N = (mkNplus (mkN "стул" masculine inanimate "1a")) ** {pnom="стулья";pgen="стульев";pdat="стульям";pacc="стулья";pins="стульями";pprep="стульях"} ; - cheese_N = mkN "сыр" ; + cheese_N = mkN "сыр" (mkA "сырный") ; child_N = (mkNAltPl (mkN "ребёнок" masculine animate "3*a") (mkN "деть")) ** {pins="детьми"}; - church_N = mkN "церковь" feminine animate "8*e" ; - city_N = mkN "город" masculine inanimate "1c(1)" ; + church_N = mkN "церковь" feminine animate "8*e" (mkA "церковный") ; + city_N = mkN "город" masculine inanimate "1c(1)" (mkA "городской") ; clean_A = mkA "чистый" "чище"; clever_A = mkA "умный" "" "1*a/b"; close_V2 = mkV2 (mkV imperfective "закрывать" "закрываю"); - cloud_N = mkN "облако" neuter inanimate "3c(2)" ; + cloud_N = mkN "облако" neuter inanimate "3c(2)" (mkA "облачный") ; coat_N = mkN "пальто" masculine inanimate "0"; cold_A = mkA "холодный"; come_V = mkV imperfective intransitive "приходить" "прихожу" "приходит" "4c" ; @@ -91,11 +91,11 @@ lin earth_N = mkN "земля" feminine inanimate "2*d" ; easy_A2V = mkA2 (mkA "лёгкий" "легче" "3*a/b") for_Prep ; eat_V2 = mkV2 (mkV imperfective "кушать" "кушаю"); - egg_N = (mkNplus (mkN "яйцо" neuter inanimate "5*d")) ** {pgen="яиц"} ; + egg_N = (mkNplus (mkN "яйцо" neuter inanimate "5*d" (mkA "яичный"))) ** {pgen="яиц"} ; empty_A = mkA "пустой" ; - enemy_N = mkN "враг" masculine animate ; + enemy_N = mkN "враг" masculine animate (mkA "вражеский") ; eye_N = mkN "глаз" masculine inanimate "1c(1)(2)" ; - factory_N = mkN "фабрика" ; + factory_N = mkN "фабрика" (mkA "фабричный") ; fall_V = mkV imperfective intransitive "падать" "падаю" "падает"; far_Adv = mkAdv "далеко"; fat_N = mkN "жир" ; @@ -105,7 +105,7 @@ lin feather_N = (mkNplus (mkN "перо" neuter inanimate "1d")) ** {pnom="перья";pgen="перьев";pdat="перьям";pacc="перья";pins="перьями";pprep="перьях"}; fight_V2 = mkV2 (mkV imperfective intransitive "бороться" "борюсь" "борется") with_Prep ; find_V2 = mkV2 (mkV imperfective "находить" "нахожу" "находит"); - fingernail_N = mkN "ноготь" masculine inanimate "2*e" ; + fingernail_N = mkN "ноготь" masculine inanimate "2*e" (mkA "ногтевой") ; fire_N = mkN "огонь" masculine inanimate "2*b" ; fish_N = mkN "рыба" feminine animate ; float_V = mkV imperfective intransitive "плавать" "плаваю"; @@ -113,9 +113,9 @@ lin flow_V = mkV imperfective intransitive "течь" "теку" "течёт"; flower_N = mkN "цветок" masculine inanimate "3*b"; fly_V = mkV imperfective intransitive "летать" "летаю" ; - fog_N = mkN "туман" ; + fog_N = mkN "туман" (mkA "туманный") ; foot_N = mkN "ступня" feminine inanimate "2*b" ; - forest_N = (mkNplus (mkN "лес" masculine inanimate "1c(1)")) ** {sloc="лесу"} ; + forest_N = (mkNplus (mkN "лес" masculine inanimate "1c(1)" (mkA "лесной"))) ** {sloc="лесу"} ; forget_V2 = mkV2 (mkV imperfective "забывать" "забываю"); freeze_V = mkV imperfective intransitive "замерзать" "замерзаю"; fridge_N = mkN "холодильник" ; @@ -148,14 +148,14 @@ lin hold_V2 = mkV2 (mkV imperfective "держать" "держу" "держит") ; hope_VS = mkVS (mkV imperfective "надеяться" "надеюсь") ; horn_N = mkN "рог" masculine inanimate "3c(1)" ; - horse_N = mkN "лошадь" feminine animate "8e" ; + horse_N = mkN "лошадь" feminine animate "8e" (mkA "лошадиный") ; hot_A = mkA "горячий" "" "4a/b"; - house_N = mkN "дом" masculine inanimate "1c(1)" ; + house_N = mkN "дом" masculine inanimate "1c(1)" (mkA "домашний") ; hunt_V2 = mkV2 (mkV imperfective intransitive "охотиться" "охочусь" "охотится") on2_Prep ; husband_N = (mkNplus (mkN "муж" masculine animate "4c")) ** {pnom="мужья";pgen="мужей";pdat="мужьям";pacc="мужей";pins="мужьями";pprep="мужьях"}; ice_N = (mkNplus (mkN "лёд" masculine animate "1*b")) ** {sloc="льду";sptv="льду"} ; important_A = mkA "важный" ; - industry_N = mkN "промышленность" ; + industry_N = mkN "промышленность" (mkA "промышленный") ; iron_N = (mkNplus (mkN "железо")) ** {mayben=only_singular}; john_PN = mkPN "Иван" masculine animate ; jump_V = mkV imperfective intransitive "прыгать" "прыгаю" "прыгает"; @@ -167,7 +167,7 @@ lin know_VS = mkVS (mkV imperfective "знать" "знаю") ; lake_N = (mkNplus (mkN "озеро" neuter inanimate "1a")) ** {pnom="озёра";pgen="озёр";pdat="озёрам";pacc="озёра";pins="озёрами";pprep="озёрах"} ; lamp_N = mkN "лампа" ; - language_N = mkN "язык" ; + language_N = mkN "язык" (mkA "языковой") ; laugh_V = mkV imperfective "смеяться" "смеюсь" "смеётся"; leaf_N = (mkNplus (mkN "лист" masculine inanimate "1d")) ** {pnom="листья";pgen="листьев";pdat="листьям";pacc="листья";pins="листьями";pprep="листьях"} ; learn_V2 = mkV2 (mkV imperfective transitive "учить" "учу" "учит" "4c"); @@ -193,22 +193,22 @@ lin mother_N2 = (mkN2plus (mkN2 "матерь" feminine animate "8e" nullPrep)) ** {snom="мать";sacc="мать";svoc="мать";} ; mountain_N = mkN "гора" ; mouth_N = (mkNplus (mkN "рот" masculine inanimate "1*b")) ** {sloc="рту"} ; - music_N = mkN "музыка" ; + music_N = mkN "музыка" (mkA "музыкальный") ; name_N = mkN "имя" neuter inanimate "8°c"; narrow_A = mkA "узкий" "уже" "3*a/c'"; near_A = mkA "близкий" "ближе" "3*a/c'"; neck_N = mkN "шея" feminine inanimate "6a"; new_A = mkA "новый" ; newspaper_N = mkN "газета" ; - night_N = (mkNplus (mkN "ночь" feminine inanimate "8e")) ** {sloc="ночь"}; + night_N = (mkNplus (mkN "ночь" feminine inanimate "8e" (mkA "ночной"))) ** {sloc="ночь"}; nose_N = mkN "нос" ; now_Adv = mkAdv "сейчас" ; - number_N = mkN "число" neuter inanimate "1*d" ; + number_N = mkN "число" neuter inanimate "1*d" (mkA "числовой") ; oil_N = mkN "нефть" ; old_A = mkA "старый" "старше" "1a/c''"; -- Grammatically correct variant "старее" is being used less open_V2 = mkV2 (mkV imperfective "открывать" "открываю"); paint_V2A = mkV2 (mkV imperfective "рисовать" "рисую") Ins; - paper_N = mkN "бумага" ; + paper_N = mkN "бумага" (mkA "бумажный") ; paris_PN = mkPN "Париж" masculine inanimate ; peace_N = mkN "мир" ; pen_N = mkN "ручка" ; @@ -224,7 +224,7 @@ lin push_V2 = mkV2 (mkV imperfective "толкать" "толкаю"); put_V2 = mkV2 (mkV imperfective "класть" "кладу" "кладёт"); queen_N = mkN "королева" feminine animate ; - question_N = mkN "вопрос" ; + question_N = mkN "вопрос" (mkA "вопросительный") ; radio_N = mkN "радио" neuter inanimate "0" ; rain_N = mkN "дождь" ; rain_V0 = mkV imperfective "дождить" "дождю" "дождит" ; -- * TODO: check @@ -232,19 +232,19 @@ lin ready_A = mkA "готовый" ; reason_N = mkN "причина"; red_A = mkA "красный" ; - religion_N = mkN "религия" ; - restaurant_N = mkN "ресторан" ; + religion_N = mkN "религия" (mkA "религиозный") ; + restaurant_N = mkN "ресторан" (mkA "ресторанный") ; right_Ord = mkOrd "правый"; river_N = mkN "рекa" feminine inanimate "3d'" ; road_N = mkN "дорогa" feminine inanimate "3a" ; rock_N = mkN "камень" masculine inanimate "2*e" ; roof_N = mkN "крыша" feminine inanimate "4a" ; - root_N = mkN "корень" masculine inanimate "2*e" ; + root_N = mkN "корень" masculine inanimate "2*e" (mkA "корневой") ; rope_N = mkN "верёвка" ; rotten_A = mkA "гнилой" "" "1b/c"; round_A = mkA "круглый" "" "1a/c'"; rub_V2 = mkV2 (mkV imperfective "тереть" "тру" "трёт"); - rubber_N = mkN "резина" ; + rubber_N = mkN "резина" (mkA "резиновый") ; rule_N = mkN "правило" ; run_V = mkV imperfective intransitive "бегать" "бегаю" "бегает" ; salt_N = mkN "соль" ; @@ -253,7 +253,7 @@ lin school_N = mkN "школа" ; science_N = mkN "наука" ; scratch_V2 = mkV2 (mkV imperfective "чесать" "чешу" "чешет"); - sea_N = mkN "море" neuter inanimate "2c" ; + sea_N = mkN "море" neuter inanimate "2c" (mkA "морской") ; see_V2 = (mkV2plus (mkV2 (mkV imperfective transitive "видеть" "вижу" "видит" "5a"))) ** {pppss="виден"; ppps="виденн"} ; seed_N = mkN "семя" neuter inanimate "8°c" ; seek_V2 = mkV2 (mkV imperfective "искать" "ищу" "ищет"); @@ -261,10 +261,10 @@ lin send_V3 = tvDirDir (mkV imperfective "посылать" "посылаю"); sew_V = mkV imperfective "шить" "шью" "шьёт"; sharp_A = mkA "острый"; - sheep_N = mkN "овца" feminine animate "5*d" ; + sheep_N = mkN "овца" feminine animate "5*d" (mkA "овечий") ; ship_N = mkN "корабль" masculine inanimate "2b"; shirt_N = mkN "рубашка" ; - shoe_N = mkN "туфля" feminine inanimate "2*a" ; + shoe_N = mkN "туфля" feminine inanimate "2*a" (mkA "туфельный") ; shop_N = mkN "магазин" ; short_A = mkA "короткий" "короче" "3*a/c'"; silver_N = (mkNplus (mkN "серебро")) ** {mayben=only_singular}; @@ -280,7 +280,7 @@ lin snake_N = mkN "змея" feminine animate "6d"; snow_N = (mkNplus (mkN "снег" masculine inanimate "3c①")) ** {sloc="снегу"; sptv="снегу"} ; sock_N = mkN "носок" masculine inanimate "3*b"; - song_N = mkN "песня" feminine inanimate "2*a"; + song_N = mkN "песня" feminine inanimate "2*a"(mkA "песенный") ; speak_V2 = mkV2 (mkV imperfective "говорить" "говорю" "говорит") on_Prep; spit_V = mkV imperfective "плевать" "плюю" "плюёт"; split_V2 = mkV2 (mkV imperfective "разбивать" "разбиваю"); @@ -288,16 +288,16 @@ lin stab_V2 = mkV2 (mkV imperfective "колоть" "колю" "колет"); stand_V = mkV imperfective intransitive "стоять" "стою" "стоит"; star_N = mkN "звезда" ; - steel_N = mkN "сталь" ; + steel_N = mkN "сталь" (mkA "стальной") ; stick_N = mkN "палка" ; stone_N = mkN "камень" masculine inanimate "2*e"; stop_V = mkV imperfective "останавливать" "останавливаю" ; stove_N = (mkNplus (mkN "печь" feminine inanimate "8e")) ** {sloc="печь"} ; straight_A = mkA "прямой" "" "1b/c'"; - student_N = mkN "студент" masculine animate ; + student_N = mkN "студент" masculine animate (mkA "студенческий") ; stupid_A = mkA "тупой" ; suck_V2 = mkV2 (mkV imperfective "сосать" "сосу" "сосёт"); - sun_N = mkN "солнце" neuter inanimate "5a"; + sun_N = mkN "солнце" neuter inanimate "5a"(mkA "солнечный") ; swell_V = mkV imperfective intransitive "опухать" "опухаю" "опухает"; swim_V = mkV imperfective intransitive "плыть" "плыву" "плывёт"; switch8off_V2 = mkV2 (mkV imperfective "выключать" "выключаю" "выключает"); @@ -315,20 +315,20 @@ lin tie_V2 = mkV2 (mkV imperfective transitive "вязать" "вяжу" "вяжет" "6c"); today_Adv = mkAdv "сегодня" ; tongue_N = mkN "язык" ; - tooth_N = mkN "зуб" ; + tooth_N = mkN "зуб" (mkA "зубной") ; train_N = mkN "поезд" ; travel_V = mkV imperfective intransitive "путешествовать" "путешествовую" "путешествовует"; - tree_N = (mkNplus (mkN "дерево" neuter inanimate "1a")) ** {pnom="деревья";pgen="деревьев";pdat="деревьям";pacc="деревья";pins="деревьями";pprep="деревьях"} ; + tree_N = (mkNplus (mkN "дерево" neuter inanimate "1a" (mkA "деревянный"))) ** {pnom="деревья";pgen="деревьев";pdat="деревьям";pacc="деревья";pins="деревьями";pprep="деревьях"} ; turn_V = mkV imperfective "поворачивать" "поворачиваю" "поворачивает"; ugly_A = mkA "некрасивый" ; uncertain_A = mkA "неопределённый" ; understand_V2 = mkV2 (mkV imperfective "понимать" "понимаю" "понимает"); university_N = mkN "университет" ; - village_N = (mkNplus (mkN "деревня" feminine inanimate "2*e")) ** {pgen="деревень"} ; + village_N = (mkNplus (mkN "деревня" feminine inanimate "2*e" (mkA "деревенский"))) ** {pgen="деревень"} ; vomit_V = mkV imperfective "блевать" "блюю" "блюёт"; -- better alternatives require more specific use wait_V2 = mkV2 (mkV imperfective "ждать" "жду" "ждёт"); walk_V = mkV imperfective "гулять" "гуляю" "гуляет"; - war_N = mkN "война" ; + war_N = mkN "война" (mkA "военный") ; warm_A = (mkAltShort (mkA "тёплый" "теплее" "1*a/b") (mkA "теплый" "" "1*a/b")) ** {sm="тёплый"} ; -- workaround TODO: Any way to remove yo from stem? wash_V2 = mkV2 (mkV imperfective "мыть" "мою" "моет"); watch_V2 = mkV2 (mkV imperfective "смотреть" "смотрю" "смотрит"); @@ -340,7 +340,7 @@ lin win_V2 = mkV2 (mkV imperfective "выигрывать" "выигрываю" "выигрывает"); wind_N = mkN "ветер" masculine inanimate "1*e" ; window_N = mkN "окно" neuter inanimate "1*d"; - wine_N = mkN "вино" neuter inanimate "1*d" ; + wine_N = mkN "вино" neuter inanimate "1*d" (mkA "винный") ; wing_N = (mkNplus (mkN "крыло" neuter inanimate "1d")) ** {pnom="крылья";pgen="крыльев";pdat="крыльям";pacc="крылья";pins="крыльями";pprep="крыльях"}; wipe_V2 = mkV2 (mkV imperfective "вытирать" "вытираю"); woman_N = mkN "женщина" feminine animate ; @@ -348,7 +348,6 @@ lin wood_N = mkN "древесина" feminine inanimate "1a" ; worm_N = mkN "червь" masculine animate ; write_V2 = mkV2 (mkV imperfective "писать" "пишу" "пишет"); - year_N = (mkNplus (mkN "год")) ** {sloc="году"; pgen="лет"}; + year_N = (mkNplus (mkN "год" (mkA "годовой"))) ** {sloc="году"; pgen="лет"}; yellow_A = (mkAplus (mkA "жёлтый" "желтее" "1a/c''") ** {sf="желта"}) ; -- TODO: variants - young_A = mkA "молодой" "моложе" "1b/c"; } \ No newline at end of file diff --git a/src/russian/ParadigmsRus.gf b/src/russian/ParadigmsRus.gf index b77efa84..8e3603e9 100644 --- a/src/russian/ParadigmsRus.gf +++ b/src/russian/ParadigmsRus.gf @@ -103,13 +103,13 @@ oper mkN : overload { mkN : Str -> N ; -- can guess declension and gender of some nouns given nominative - mkN : Str -> NRelType -> A -> N ; + mkN : Str -> A -> N ; mkN : Str -> Gender -> Animacy -> N ; - mkN : Str -> Gender -> Animacy -> NRelType -> A -> N ; -- can guess declension of more nouns + mkN : Str -> Gender -> Animacy -> A -> N ; -- can guess declension of more nouns mkN : Str -> Gender -> Animacy -> (idx : Str) -> N ; -- Fourth parameter is a declension type index (based on Zaliznyak's dictionary), for example, "1*a(1)" - mkN : Str -> Gender -> Animacy -> NRelType -> A -> (idx : Str) -> N ; + mkN : Str -> Gender -> Animacy -> (idx : Str) -> A -> N ; mkN : Str -> Gender -> Animacy -> (idx : Str) -> MaybeNumber -> N ; - mkN : Str -> Gender -> Animacy -> NRelType -> A -> (idx : Str) -> MaybeNumber -> N ; -- Same, but number restrictions can be added + mkN : Str -> Gender -> Animacy -> (idx : Str) -> MaybeNumber -> A -> N ; -- Same, but number restrictions can be added mkN : A -> Gender -> Animacy -> N ; -- for nouns, which decline as adjective mkN : A -> Gender -> Animacy -> MaybeNumber -> N ; -- same, with possibility to limit number (usually to only_singular) mkN : N -> (link : Str) -> N -> N ; -- compound noun. Link can end on "-", in which case parts are glued together. First one characterizes the whole. @@ -249,26 +249,26 @@ oper mkN = overload { mkN : Str -> N = \nom -> lin N (guessNounForms nom (guessAdjectiveForms nonExist) GenType); -- the default type of compound - mkN : Str -> NRelType -> A -> N - = \nom, rt, rel -> lin N (guessNounForms nom rel rt) ; - mkN : Str -> Animacy -> NRelType -> A -> N - = \nom,anim,rt,rel -> lin N (guessNounForms nom rel rt) ** {anim=anim} ; + mkN : Str -> A -> N + = \nom, rel -> lin N (guessNounForms nom rel AdjType) ; + mkN : Str -> Animacy -> A -> N + = \nom,anim,rel -> lin N (guessNounForms nom rel AdjType) ** {anim=anim} ; mkN : Str -> Gender -> Animacy -> N = \nom, g, anim -> lin N (guessLessNounForms nom g anim (guessAdjectiveForms nonExist) GenType) ; - mkN : Str -> Gender -> Animacy -> NRelType -> A -> N - = \nom, g, anim, rt, rel -> lin N (guessLessNounForms nom g anim rel rt) ; + mkN : Str -> Gender -> Animacy -> A -> N + = \nom, g, anim, rel -> lin N (guessLessNounForms nom g anim rel AdjType) ; mkN : Str -> Gender -> Animacy -> Z.ZNIndex -> N = \word, g, anim, z -> lin N (noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms nonExist) GenType z)) ; - mkN : Str -> Gender -> Animacy -> NRelType -> A -> Z.ZNIndex -> N - = \word, g, anim, rt, rel, z -> lin N (noMinorCases (Z.makeNoun word g anim rel rt z)) ; + mkN : Str -> Gender -> Animacy -> Z.ZNIndex -> A -> N + = \word, g, anim, z, rel -> lin N (noMinorCases (Z.makeNoun word g anim rel AdjType z)) ; mkN : Str -> Gender -> Animacy -> Str -> N = \word, g, anim, zi -> lin N (noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms nonExist) GenType (Z.parseIndex zi))) ; - mkN : Str -> Gender -> Animacy -> NRelType -> A -> Str -> N - = \word, g, anim, rt, rel, zi -> lin N (noMinorCases (Z.makeNoun word g anim rel rt (Z.parseIndex zi))) ; + mkN : Str -> Gender -> Animacy -> Str -> A -> N + = \word, g, anim, zi, rel -> lin N (noMinorCases (Z.makeNoun word g anim rel AdjType (Z.parseIndex zi))) ; mkN : Str -> Gender -> Animacy -> Str -> MaybeNumber -> N = \word, g, anim, zi, mbn -> lin N (applyMaybeNumber ((noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms nonExist) GenType (Z.parseIndex zi))) ** {mayben=mbn})) ; - mkN : Str -> Gender -> Animacy -> NRelType -> A -> Str -> MaybeNumber -> N - = \word, g, anim, rt, rel, zi, mbn -> lin N (applyMaybeNumber ((noMinorCases (Z.makeNoun word g anim rel rt (Z.parseIndex zi))) ** {mayben=mbn})) ; + mkN : Str -> Gender -> Animacy -> Str -> MaybeNumber -> A -> N + = \word, g, anim, zi, mbn, rel-> lin N (applyMaybeNumber ((noMinorCases (Z.makeNoun word g anim rel AdjType (Z.parseIndex zi))) ** {mayben=mbn})) ; mkN : A -> Gender -> Animacy -> N = \a, g, anim -> lin N (makeNFFromAF a g anim) ; mkN : A -> Gender -> Animacy -> MaybeNumber -> N @@ -378,8 +378,8 @@ oper = \n, p -> lin N2 (mkFun n p) ; mkN2 : Str -> Gender -> Animacy -> Str -> Prep -> N2 = \word, g, anim, zi, p -> lin N2 (mkFun (noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms nonExist) GenType (Z.parseIndex zi))) p) ; - mkN2 : Str -> Gender -> Animacy -> Str -> NRelType -> Str -> Prep -> N2 - = \word, g, anim, rel, rt, zi, p -> lin N2 (mkFun (noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms rel) rt (Z.parseIndex zi))) p) ; + mkN2 : Str -> Gender -> Animacy -> Str -> A -> Prep -> N2 + = \word, g, anim, zi, rel, p -> lin N2 (mkFun (noMinorCases (Z.makeNoun word g anim rel AdjType (Z.parseIndex zi))) p) ; } ; nullPrep : Prep = lin Prep {s=[] ; c=Gen ; neggen=False ; hasPrep=False} ; @@ -389,8 +389,8 @@ oper = \n, p2, p3 -> lin N3 (mkFun2 n p2 p3) ; mkN3 : Str -> Gender -> Animacy -> Str -> Prep -> Prep -> N3 = \word, g, anim, zi, p2, p3 -> lin N3 (mkFun2 (noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms nonExist) GenType (Z.parseIndex zi))) p2 p3) ; - mkN3 : Str -> Gender -> Animacy -> Str -> NRelType -> Str -> Prep -> Prep -> N3 - = \word, g, anim, rel, rt, zi, p2, p3 -> lin N3 (mkFun2 (noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms rel) rt (Z.parseIndex zi))) p2 p3) ; + mkN3 : Str -> Gender -> Animacy -> Str -> A -> Prep -> Prep -> N3 + = \word, g, anim, zi, rel, p2, p3 -> lin N3 (mkFun2 (noMinorCases (Z.makeNoun word g anim rel AdjType (Z.parseIndex zi))) p2 p3) ; } ; From bffdfdb79027a5d675aca13b9c0ff997e8ebdbbd Mon Sep 17 00:00:00 2001 From: EkaterinaVoloshina Date: Mon, 11 Mar 2024 17:24:31 +0100 Subject: [PATCH 2/6] fixed inflection for russian --- src/russian/InflectionRus.gf | 83 +++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/src/russian/InflectionRus.gf b/src/russian/InflectionRus.gf index 2511af94..00a5bec6 100644 --- a/src/russian/InflectionRus.gf +++ b/src/russian/InflectionRus.gf @@ -286,6 +286,7 @@ oper } } ; + makeNoun : Str -> Gender -> Animacy -> AdjForms -> NRelType -> ZNIndex -> NounFormsBase = \word, g, anim, rel, rt, z -> case z of { @@ -354,7 +355,7 @@ oper formsSelectionNoun : Str -> Gender -> Animacy -> DeclType -> AlterType -> StressSchema -> AdjForms -> NRelType -> ZCirc -> NounFormsBase = \word, g, anim, dt, at, ss, rel, rt, ci -> let stem = stemFromNoun word g dt in - let nef = endingsSelectionNoun g anim dt at ss ci in + let nef = endingsSelectionNoun word g anim dt at ss ci in let nef' = specialEndingsNoun word stem nef g dt in let alternated = alterForms stem nef' g anim dt at ss rel rt in animacySelectionNoun dt alternated nef' g anim @@ -362,7 +363,7 @@ oper stemFromNoun : Str -> Gender -> DeclType -> Str = \word, g, dt -> - let end1 = (gDtBasedSelectionNoun g dt).snom.p1 in + let end1 = (gDtBasedSelectionNoun word g dt).snom.p1 in case end1 of { "" => word ; _ => Predef.tk 1 word @@ -393,10 +394,10 @@ oper sins=frm.sins -- TODO: there can be variants {} ю in addition to й } ; - endingsSelectionNoun : Gender -> Animacy -> DeclType -> AlterType -> StressSchema -> ZCirc -> NounEndForms - = \g, anim, dt, at, ss, ci -> - let gDtBased = gDtBasedSelectionNoun g dt in - let gDtBasedCirc = circCorrectionNoun gDtBased g dt ci in + endingsSelectionNoun : Str -> Gender -> Animacy -> DeclType -> AlterType -> StressSchema -> ZCirc -> NounEndForms + = \word, g, anim, dt, at, ss, ci -> + let gDtBased = gDtBasedSelectionNoun word g dt in + let gDtBasedCirc = circCorrectionNoun word gDtBased g dt ci in gDtSsBasedSelectionNoun gDtBasedCirc ss ; @@ -410,17 +411,17 @@ oper _ => nef1 } ; - circCorrectionNoun : NounEndFormsS1 -> Gender -> DeclType -> ZCirc -> NounEndFormsS1 - = \nef1, g, dt, ci -> + circCorrectionNoun : Str -> NounEndFormsS1 -> Gender -> DeclType -> ZCirc -> NounEndFormsS1 + = \word, nef1, g, dt, ci -> let trans1 : NounEndFormsS1 = case of { - => nef1 ** {pnom=(gDtBasedSelectionNoun Neut dt).pnom} ; - => nef1 ** {pnom=(gDtBasedSelectionNoun Masc dt).pnom} ; + => nef1 ** {pnom=(gDtBasedSelectionNoun word Neut dt).pnom} ; + => nef1 ** {pnom=(gDtBasedSelectionNoun word Masc dt).pnom} ; _ => nef1 } in case of { - => trans1 ** {pgen=(gDtBasedSelectionNoun Neut dt).pgen} ; - => trans1 ** {pgen=(gDtBasedSelectionNoun Masc dt).pgen} ; - => trans1 ** {pgen=(gDtBasedSelectionNoun Masc dt).pgen} ; + => trans1 ** {pgen=(gDtBasedSelectionNoun word Neut dt).pgen} ; + => trans1 ** {pgen=(gDtBasedSelectionNoun word Masc dt).pgen} ; + => trans1 ** {pgen=(gDtBasedSelectionNoun word Masc dt).pgen} ; _ => trans1 } ; @@ -468,33 +469,35 @@ oper <_, _> => Unstressed } ; - gDtBasedSelectionNoun : Gender -> DeclType -> NounEndFormsS1 - = \g, dt -> case of { - <_, 0> => immutableCasesS1 ; - => {snom=<"","">;pnom=<"ы","ы">;sgen=<"а","а">;pgen=<"ов","ов">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"ь","ь">;pnom=<"и","и">;sgen=<"я","я">;pgen=<"ей","ей">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; - => {snom=<"","">;pnom=<"и","и">;sgen=<"а","а">;pgen=<"ов","ов">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"","">;pnom=<"и","и">;sgen=<"а","а">;pgen=<"ей","ей">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"","">;pnom=<"ы","ы">;sgen=<"а","а">;pgen=<"ев","ов">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"й","й">;pnom=<"и","и">;sgen=<"я","я">;pgen=<"ев","ёв">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; - => {snom=<"й","й">;pnom=<"и","и">;sgen=<"я","я">;pgen=<"ев","ёв">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"и","е">;pprep=<"ях","ях">} ; - => {snom=<"ь","ь">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ей","ей">;sdat=<"и","и">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"и","и">;pprep=<"ях","ях">} ; - => {snom=<"а","а">;pnom=<"ы","ы">;sgen=<"ы","ы">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ой","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ь","ей">;sdat=<"е","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; - => {snom=<"а","а">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ой","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"а","а">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"","ей">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ей","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"а","а">;pnom=<"ы","ы">;sgen=<"ы","ы">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ей","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"й","й">;sdat=<"е","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; - => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"й","й">;sdat=<"и","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"и","е">;pprep=<"ях","ях">} ; - => {snom=<"ь","ь">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ей","ей">;sdat=<"и","и">;pdat=<"ям","ям">;sacc=<"ь","ь">;pacc=<"?","?">;sins=<"ью","ью">;pins=<"ями","ями">;sprep=<"и","и">;pprep=<"ях","ях">} ; - => {snom=<"о","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"е","е">;pnom=<"я","я">;sgen=<"я","я">;pgen=<"ь","ей">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; - => {snom=<"о","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"е","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","ей">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"е","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"е","е">;pnom=<"я","я">;sgen=<"я","я">;pgen=<"й","й">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; - => {snom=<"е","е">;pnom=<"я","я">;sgen=<"я","я">;pgen=<"й","й">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"и","е">;pprep=<"ях","ях">} ; - => {snom=<"о","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"и","и">;pprep=<"ах","ах">} + gDtBasedSelectionNoun : Str -> Gender -> DeclType -> NounEndFormsS1 + = \word, g, dt -> case of { + <_, _, 0> => immutableCasesS1 ; + <_ + "а", Masc, 1> => {snom=<"а","а">;pnom=<"ы","ы">;sgen=<"ы","ы">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ой","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_ + "я", Masc, 1> => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ь","ей">;sdat=<"е","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Masc, 1> => {snom=<"","">;pnom=<"ы","ы">;sgen=<"а","а">;pgen=<"ов","ов">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Masc, 2> => {snom=<"ь","ь">;pnom=<"и","и">;sgen=<"я","я">;pgen=<"ей","ей">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Masc, 3> => {snom=<"","">;pnom=<"и","и">;sgen=<"а","а">;pgen=<"ов","ов">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Masc, 4> => {snom=<"","">;pnom=<"и","и">;sgen=<"а","а">;pgen=<"ей","ей">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Masc, 5> => {snom=<"","">;pnom=<"ы","ы">;sgen=<"а","а">;pgen=<"ев","ов">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Masc, 6> => {snom=<"й","й">;pnom=<"и","и">;sgen=<"я","я">;pgen=<"ев","ёв">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Masc, 7> => {snom=<"й","й">;pnom=<"и","и">;sgen=<"я","я">;pgen=<"ев","ёв">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"и","е">;pprep=<"ях","ях">} ; + <_, Masc, 8> => {snom=<"ь","ь">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ей","ей">;sdat=<"и","и">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"и","и">;pprep=<"ях","ях">} ; + <_, Fem, 1> => {snom=<"а","а">;pnom=<"ы","ы">;sgen=<"ы","ы">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ой","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Fem, 2> => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ь","ей">;sdat=<"е","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Fem, 3> => {snom=<"а","а">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ой","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Fem, 4> => {snom=<"а","а">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"","ей">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ей","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Fem, 5> => {snom=<"а","а">;pnom=<"ы","ы">;sgen=<"ы","ы">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ей","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Fem, 6> => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"й","й">;sdat=<"е","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Fem, 7> => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"й","й">;sdat=<"и","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"и","е">;pprep=<"ях","ях">} ; + <_, Fem, 8> => {snom=<"ь","ь">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ей","ей">;sdat=<"и","и">;pdat=<"ям","ям">;sacc=<"ь","ь">;pacc=<"?","?">;sins=<"ью","ью">;pins=<"ями","ями">;sprep=<"и","и">;pprep=<"ях","ях">} ; + <_, Neut, 1> => {snom=<"о","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Neut, 2> => {snom=<"е","е">;pnom=<"я","я">;sgen=<"я","я">;pgen=<"ь","ей">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Neut, 3> => {snom=<"о","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Neut, 4> => {snom=<"е","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","ей">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Neut, 5> => {snom=<"е","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Neut, 6> => {snom=<"е","е">;pnom=<"я","я">;sgen=<"я","я">;pgen=<"й","й">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Neut, 7> => {snom=<"е","е">;pnom=<"я","я">;sgen=<"я","я">;pgen=<"й","й">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"и","е">;pprep=<"ях","ях">} ; + <_, Neut, 8> => {snom=<"о","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"и","и">;pprep=<"ах","ах">} } ; ------------- From 2eb19b5a2d6163fc4d151c290ae11f4fd1be48a7 Mon Sep 17 00:00:00 2001 From: Ekaterina Voloshina <42929264+EkaterinaVoloshina@users.noreply.github.com> Date: Tue, 12 Mar 2024 07:34:19 +0100 Subject: [PATCH 3/6] updated inflection for masculine nouns (#456) * updated AdjType * fixed inflection for russian --- src/russian/InflectionRus.gf | 83 +++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/src/russian/InflectionRus.gf b/src/russian/InflectionRus.gf index 2511af94..00a5bec6 100644 --- a/src/russian/InflectionRus.gf +++ b/src/russian/InflectionRus.gf @@ -286,6 +286,7 @@ oper } } ; + makeNoun : Str -> Gender -> Animacy -> AdjForms -> NRelType -> ZNIndex -> NounFormsBase = \word, g, anim, rel, rt, z -> case z of { @@ -354,7 +355,7 @@ oper formsSelectionNoun : Str -> Gender -> Animacy -> DeclType -> AlterType -> StressSchema -> AdjForms -> NRelType -> ZCirc -> NounFormsBase = \word, g, anim, dt, at, ss, rel, rt, ci -> let stem = stemFromNoun word g dt in - let nef = endingsSelectionNoun g anim dt at ss ci in + let nef = endingsSelectionNoun word g anim dt at ss ci in let nef' = specialEndingsNoun word stem nef g dt in let alternated = alterForms stem nef' g anim dt at ss rel rt in animacySelectionNoun dt alternated nef' g anim @@ -362,7 +363,7 @@ oper stemFromNoun : Str -> Gender -> DeclType -> Str = \word, g, dt -> - let end1 = (gDtBasedSelectionNoun g dt).snom.p1 in + let end1 = (gDtBasedSelectionNoun word g dt).snom.p1 in case end1 of { "" => word ; _ => Predef.tk 1 word @@ -393,10 +394,10 @@ oper sins=frm.sins -- TODO: there can be variants {} ю in addition to й } ; - endingsSelectionNoun : Gender -> Animacy -> DeclType -> AlterType -> StressSchema -> ZCirc -> NounEndForms - = \g, anim, dt, at, ss, ci -> - let gDtBased = gDtBasedSelectionNoun g dt in - let gDtBasedCirc = circCorrectionNoun gDtBased g dt ci in + endingsSelectionNoun : Str -> Gender -> Animacy -> DeclType -> AlterType -> StressSchema -> ZCirc -> NounEndForms + = \word, g, anim, dt, at, ss, ci -> + let gDtBased = gDtBasedSelectionNoun word g dt in + let gDtBasedCirc = circCorrectionNoun word gDtBased g dt ci in gDtSsBasedSelectionNoun gDtBasedCirc ss ; @@ -410,17 +411,17 @@ oper _ => nef1 } ; - circCorrectionNoun : NounEndFormsS1 -> Gender -> DeclType -> ZCirc -> NounEndFormsS1 - = \nef1, g, dt, ci -> + circCorrectionNoun : Str -> NounEndFormsS1 -> Gender -> DeclType -> ZCirc -> NounEndFormsS1 + = \word, nef1, g, dt, ci -> let trans1 : NounEndFormsS1 = case of { - => nef1 ** {pnom=(gDtBasedSelectionNoun Neut dt).pnom} ; - => nef1 ** {pnom=(gDtBasedSelectionNoun Masc dt).pnom} ; + => nef1 ** {pnom=(gDtBasedSelectionNoun word Neut dt).pnom} ; + => nef1 ** {pnom=(gDtBasedSelectionNoun word Masc dt).pnom} ; _ => nef1 } in case of { - => trans1 ** {pgen=(gDtBasedSelectionNoun Neut dt).pgen} ; - => trans1 ** {pgen=(gDtBasedSelectionNoun Masc dt).pgen} ; - => trans1 ** {pgen=(gDtBasedSelectionNoun Masc dt).pgen} ; + => trans1 ** {pgen=(gDtBasedSelectionNoun word Neut dt).pgen} ; + => trans1 ** {pgen=(gDtBasedSelectionNoun word Masc dt).pgen} ; + => trans1 ** {pgen=(gDtBasedSelectionNoun word Masc dt).pgen} ; _ => trans1 } ; @@ -468,33 +469,35 @@ oper <_, _> => Unstressed } ; - gDtBasedSelectionNoun : Gender -> DeclType -> NounEndFormsS1 - = \g, dt -> case of { - <_, 0> => immutableCasesS1 ; - => {snom=<"","">;pnom=<"ы","ы">;sgen=<"а","а">;pgen=<"ов","ов">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"ь","ь">;pnom=<"и","и">;sgen=<"я","я">;pgen=<"ей","ей">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; - => {snom=<"","">;pnom=<"и","и">;sgen=<"а","а">;pgen=<"ов","ов">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"","">;pnom=<"и","и">;sgen=<"а","а">;pgen=<"ей","ей">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"","">;pnom=<"ы","ы">;sgen=<"а","а">;pgen=<"ев","ов">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"й","й">;pnom=<"и","и">;sgen=<"я","я">;pgen=<"ев","ёв">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; - => {snom=<"й","й">;pnom=<"и","и">;sgen=<"я","я">;pgen=<"ев","ёв">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"и","е">;pprep=<"ях","ях">} ; - => {snom=<"ь","ь">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ей","ей">;sdat=<"и","и">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"и","и">;pprep=<"ях","ях">} ; - => {snom=<"а","а">;pnom=<"ы","ы">;sgen=<"ы","ы">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ой","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ь","ей">;sdat=<"е","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; - => {snom=<"а","а">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ой","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"а","а">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"","ей">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ей","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"а","а">;pnom=<"ы","ы">;sgen=<"ы","ы">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ей","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"й","й">;sdat=<"е","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; - => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"й","й">;sdat=<"и","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"и","е">;pprep=<"ях","ях">} ; - => {snom=<"ь","ь">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ей","ей">;sdat=<"и","и">;pdat=<"ям","ям">;sacc=<"ь","ь">;pacc=<"?","?">;sins=<"ью","ью">;pins=<"ями","ями">;sprep=<"и","и">;pprep=<"ях","ях">} ; - => {snom=<"о","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"е","е">;pnom=<"я","я">;sgen=<"я","я">;pgen=<"ь","ей">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; - => {snom=<"о","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"е","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","ей">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"е","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; - => {snom=<"е","е">;pnom=<"я","я">;sgen=<"я","я">;pgen=<"й","й">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; - => {snom=<"е","е">;pnom=<"я","я">;sgen=<"я","я">;pgen=<"й","й">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"и","е">;pprep=<"ях","ях">} ; - => {snom=<"о","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"и","и">;pprep=<"ах","ах">} + gDtBasedSelectionNoun : Str -> Gender -> DeclType -> NounEndFormsS1 + = \word, g, dt -> case of { + <_, _, 0> => immutableCasesS1 ; + <_ + "а", Masc, 1> => {snom=<"а","а">;pnom=<"ы","ы">;sgen=<"ы","ы">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ой","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_ + "я", Masc, 1> => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ь","ей">;sdat=<"е","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Masc, 1> => {snom=<"","">;pnom=<"ы","ы">;sgen=<"а","а">;pgen=<"ов","ов">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Masc, 2> => {snom=<"ь","ь">;pnom=<"и","и">;sgen=<"я","я">;pgen=<"ей","ей">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Masc, 3> => {snom=<"","">;pnom=<"и","и">;sgen=<"а","а">;pgen=<"ов","ов">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Masc, 4> => {snom=<"","">;pnom=<"и","и">;sgen=<"а","а">;pgen=<"ей","ей">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Masc, 5> => {snom=<"","">;pnom=<"ы","ы">;sgen=<"а","а">;pgen=<"ев","ов">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Masc, 6> => {snom=<"й","й">;pnom=<"и","и">;sgen=<"я","я">;pgen=<"ев","ёв">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Masc, 7> => {snom=<"й","й">;pnom=<"и","и">;sgen=<"я","я">;pgen=<"ев","ёв">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"и","е">;pprep=<"ях","ях">} ; + <_, Masc, 8> => {snom=<"ь","ь">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ей","ей">;sdat=<"и","и">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"и","и">;pprep=<"ях","ях">} ; + <_, Fem, 1> => {snom=<"а","а">;pnom=<"ы","ы">;sgen=<"ы","ы">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ой","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Fem, 2> => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ь","ей">;sdat=<"е","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Fem, 3> => {snom=<"а","а">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ой","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Fem, 4> => {snom=<"а","а">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"","ей">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ей","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Fem, 5> => {snom=<"а","а">;pnom=<"ы","ы">;sgen=<"ы","ы">;pgen=<"","">;sdat=<"е","е">;pdat=<"ам","ам">;sacc=<"у","у">;pacc=<"?","?">;sins=<"ей","ой">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Fem, 6> => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"й","й">;sdat=<"е","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Fem, 7> => {snom=<"я","я">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"й","й">;sdat=<"и","е">;pdat=<"ям","ям">;sacc=<"ю","ю">;pacc=<"?","?">;sins=<"ей","ёй">;pins=<"ями","ями">;sprep=<"и","е">;pprep=<"ях","ях">} ; + <_, Fem, 8> => {snom=<"ь","ь">;pnom=<"и","и">;sgen=<"и","и">;pgen=<"ей","ей">;sdat=<"и","и">;pdat=<"ям","ям">;sacc=<"ь","ь">;pacc=<"?","?">;sins=<"ью","ью">;pins=<"ями","ями">;sprep=<"и","и">;pprep=<"ях","ях">} ; + <_, Neut, 1> => {snom=<"о","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Neut, 2> => {snom=<"е","е">;pnom=<"я","я">;sgen=<"я","я">;pgen=<"ь","ей">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Neut, 3> => {snom=<"о","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Neut, 4> => {snom=<"е","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","ей">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Neut, 5> => {snom=<"е","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ом">;pins=<"ами","ами">;sprep=<"е","е">;pprep=<"ах","ах">} ; + <_, Neut, 6> => {snom=<"е","е">;pnom=<"я","я">;sgen=<"я","я">;pgen=<"й","й">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"е","е">;pprep=<"ях","ях">} ; + <_, Neut, 7> => {snom=<"е","е">;pnom=<"я","я">;sgen=<"я","я">;pgen=<"й","й">;sdat=<"ю","ю">;pdat=<"ям","ям">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ем","ём">;pins=<"ями","ями">;sprep=<"и","е">;pprep=<"ях","ях">} ; + <_, Neut, 8> => {snom=<"о","о">;pnom=<"а","а">;sgen=<"а","а">;pgen=<"","">;sdat=<"у","у">;pdat=<"ам","ам">;sacc=<"?","?">;pacc=<"?","?">;sins=<"ом","ом">;pins=<"ами","ами">;sprep=<"и","и">;pprep=<"ах","ах">} } ; ------------- From a338c2c60e0eaa8824d5f1ed448dab7a2b5b0155 Mon Sep 17 00:00:00 2001 From: EkaterinaVoloshina Date: Wed, 13 Mar 2024 16:35:58 +0100 Subject: [PATCH 4/6] added compounds for LN and PN --- src/russian/ParadigmsRus.gf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/russian/ParadigmsRus.gf b/src/russian/ParadigmsRus.gf index 8e3603e9..2717ee0e 100644 --- a/src/russian/ParadigmsRus.gf +++ b/src/russian/ParadigmsRus.gf @@ -371,6 +371,17 @@ oper } ; } ; + + compoundPN : (PN -> Str -> PN) + = \pn, adv -> pn ** { + s = \\c => pn.s ! c ++ adv + } ; + + compoundLN : (LN -> Str -> LN) + = \ln, adv -> ln ** { + s = \\c => ln.s ! c ++ adv + } ; + mkN2 = overload { mkN2 : N -> N2 = \n -> lin N2 (mkFun n nullPrep) ; From 6ae9123f87b488964d361c175a4f1b42955eca7b Mon Sep 17 00:00:00 2001 From: EkaterinaVoloshina Date: Fri, 15 Mar 2024 17:16:52 +0100 Subject: [PATCH 5/6] fixed passive voice --- src/russian/ExtendRus.gf | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/russian/ExtendRus.gf b/src/russian/ExtendRus.gf index 35929b06..03812a9d 100644 --- a/src/russian/ExtendRus.gf +++ b/src/russian/ExtendRus.gf @@ -175,19 +175,30 @@ lin } ; -- : VPSlash -> VP ; -- be forced to sleep - PassVPSlash vps = vps ** { + PassVPSlash vps = case vps.verb.asp of { + Perfective => vps ** { verb=copulaEll ; compl=\\p,a => vps.compl ! p ! a ++ shortPastPassPart vps.verb (agrGenNum a) ++ vps.c.s } ; + Imperfective => vps ** { + verb=(passivate vps.verb); + } + }; + -- PresPartAP : VP -> AP ; -- (the man) looking at Mary -- use PlP2 + "ый" -- : VPSlash -> VP - PassAgentVPSlash vps np = - vps ** { - verb=copulaEll ; - compl=\\p,a => vps.compl ! p ! a ++ shortPastPassPart vps.verb (agrGenNum a) ++ vps.c.s ++ np.s ! Ins + PassAgentVPSlash vps np = case vps.verb.asp of { + Perfective => vps ** { + verb=copulaEll ; + compl=\\p,a => shortPastPassPart vps.verb (agrGenNum a) ++ vps.c.s ++ vps.compl ! p ! a ++ np.s ! Ins } ; + Imperfective => vps ** { + verb=(passivate vps.verb); + compl=\\p,a => vps.compl ! p ! a ++ np.s ! Ins + } + }; -- : Pron -> Pron ; -- unstressed subject pronoun becomes empty: "am tired" From d6cb2806ff021fda3f6be63294af9d2445426171 Mon Sep 17 00:00:00 2001 From: EkaterinaVoloshina Date: Fri, 15 Mar 2024 17:29:34 +0100 Subject: [PATCH 6/6] fixed order in passive voice --- src/russian/ExtendRus.gf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/russian/ExtendRus.gf b/src/russian/ExtendRus.gf index 03812a9d..8ebc302b 100644 --- a/src/russian/ExtendRus.gf +++ b/src/russian/ExtendRus.gf @@ -178,7 +178,7 @@ lin PassVPSlash vps = case vps.verb.asp of { Perfective => vps ** { verb=copulaEll ; - compl=\\p,a => vps.compl ! p ! a ++ shortPastPassPart vps.verb (agrGenNum a) ++ vps.c.s + compl=\\p,a => shortPastPassPart vps.verb (agrGenNum a) ++ vps.compl ! p ! a ++ vps.c.s } ; Imperfective => vps ** { verb=(passivate vps.verb);