Russian_lex

This commit is contained in:
janna
2005-11-28 11:25:46 +00:00
parent 0b3d28f6d9
commit 0fbb2fe27e
10 changed files with 915 additions and 537 deletions

View File

@@ -25,7 +25,7 @@ boy_N
bread_N
break_V2
broad_ADeg
brother_N
brother_N2
brown_ADeg
butter_N
buy_V2
@@ -59,7 +59,7 @@ drink_V2
eat_V2
enemy_N
factory_N
father_N
father_N2
fear_VS
find_V2
fish_N
@@ -106,7 +106,7 @@ man_N
meat_N
milk_N
moon_N
mother_N
mother_N2
mountain_N
music_N
narrow_ADeg
@@ -162,8 +162,8 @@ stove_N
student_N
stupid_ADeg
sun_N
switch8off_V
switch8on_V
switch8off_V2
switch8on_V2
table_N
teacher_N
teach_V2
@@ -173,7 +173,7 @@ thin_ADeg
train_N
travel_V
tree_N
trousers_N
--trousers_N
ugly_ADeg
understand_V2
university_N

View File

@@ -1,206 +1,237 @@
--# -path=.:../abstract:../../prelude
--# -val
concrete BasicRus of Basic = CategoriesRus ** open ParadigmsRus in {
concrete BasicRus of Basic = CategoriesRus ** open StructuralRus, ParadigmsRus in {
flags
optimize=values ;
coding=utf8 ;
lin
airplane_N = nTelefon "самолет" ;
answer_V2S = mkV2S (caseV2 (regV "vastata") allative) ;
answer_V2S = tvDir (mkRegVerb imperfective first "отвеча" "ю" "отвечал" "отвечай" "отвечать" );
apartment_N = nMashina "квартир" ;
apple_N = nChislo "яблок" ;
art_N = nChislo "искусств" ;
ask_V2Q = mkV2Q (caseV2 (regV "kysyä") ablative) ;
ask_V2Q = tvDir (mkRegVerb imperfective first "спрашива" "ю" "спрашивал" "спрашивай" "спрашивать") ;
baby_N = nMalush "малыш";
bad_ADeg = mkADeg (nLukko "paha") "pahempi" "pahin" ;
bad_ADeg = mkADeg ( AKakoj_Nibud "плох" "") "хуже";
bank_N = nBank "банк" ;
beautiful_ADeg = mkADeg (regN "kaunis") "kauniimpi" "kaunein" ;
become_VA = mkVA (regV "tulla") translative ;
beautiful_ADeg = mkADeg( AStaruyj "красив") "красивее";
become_VA = mkRegVerb perfective first "ста" "л" "стал" "стань" "стать" ;
beer_N = nChislo "пив" ;
beg_V2V = mkV2V (caseV2 (reg2V "pyytää" "pyysi") partitive) ;
big_ADeg = mkADeg (sgpartN (nArpi "suuri") "suurta") "suurempi" "suurin" ;
bike_N = nTelefon "велосипед" ; --- for correct vowel harmony
beg_V2V = tvDir (mkRegVerb imperfective second "про" "шу" "просил" "проси" "просить" );
big_ADeg = mkADeg( AKakoj_Nibud "больш" "") "больше" ;
bike_N = nTelefon "велосипед" ;
bird_N = nEdinica "птиц" ;
black_ADeg = mkADeg (nLukko "musta") "mustempi" "mustin" ;
blue_ADeg = mkADeg (regN "sininen") "sinisempi" "sinisin" ;
black_ADeg = mkADeg( AStaruyj "чёрн") "чернее";
blue_ADeg = mkADeg( AMolodoj "голуб") "голубее";
boat_N = nMashina "лодк" ;
book_N = nMashina "книг" ;
boot_N = nBank "сапог" ;
boss_N = nStomatolog "начальник" ;
boy_N = nStomatolog "мальчик" ;
bread_N = nAdres "хлеб" ;
break_V2 = dirV2 (regV "rikkoa") ;
broad_ADeg = mkADeg (regN "leveä") "leveämpi" "levein" ;
brother_N2 = funGen (nBrat ",брат") ;
brown_ADeg = mkADeg (regN "ruskea") "ruskeampi" "ruskein" ;
break_V2 = tvDir (mkRegVerb imperfective first "прерыва" "ю" "прерывал" "прерывай" "прерывать" );
broad_ADeg = mkADeg( AMalenkij "широк") "шире";
brother_N2 = mkN2 (nBrat ",брат") ;
brown_ADeg = mkADeg( AStaruyj "коричнев") "коричневее";
buy_V2 = dirV2 (regV "ostaa") ;
butter_N = nChislo "масл";
buy_V2 = tvDir (mkRegVerb imperfective first "покупа" "ю" "покупал" "покупай" "покупать" );
cap_N = nNoga "чашк" ; чаш-ек Pl-Gen
camera_N = nMashina "kamer" ;
cap_N = nNoga "чашк" ; -- чаш-ек Pl-Gen
carpet_N = mkN "ковёр" "ковра" "ковру" "ковёр" "ковром" "ковре" "ковры" "ковров" "коврам" "ковры" "коврами" "коврах" Masc Inanimate;
car_N = nMashina "машин" ;
carpet_N = mkN "ковёр" "ковра" "ковру" "ковёр" "ковром" "ковре" "ковры" "ковров" "коврам" "ковры" "коврами" "коврах" masculine inanimate;
ceiling_N = nPotolok"потол" ;
cat_N = nMashina "кошк" ;
ceiling_N = nPotolok "потол" ;
cheese_N = nTelefon "сыр" ;
child_N = mkN "ребёнок" "ребёнка" "ребёнку" "ребёнка" "ребёнком" "ребёнке" "дети" "детей" "детям" "детей" "детьми" "детях" Masc Animate;
chair_N = nStul "стул" ;
cheese_N = nTelefon "сыр" ;
child_N = mkN "ребёнок" "ребёнка" "ребёнку" "ребёнка" "ребёнком" "ребёнке" "дети" "детей" "детям" "детей" "детьми" "детях" masculine animate ;
church_N = mkN "церковь" "церкви" "церкви" "церковь" "церковью" "церкви" "церкви" "церквей" "церквям" "церкви" "церквями" "церквях" masculine inanimate;
city_N = nAdres "город" ;
clean_ADeg = regADeg "ren" ;
clever_ADeg = regADeg "klok" ;
close_V2 = dirV2 (mk2V "stänga" "stängde") ;
city_N = nAdres "город" ;
clean_ADeg = mkADeg( AStaruyj "чист") "чище";
clever_ADeg = mkADeg( AStaruyj "умн") "умнее";
close_V2= tvDir (mkRegVerb imperfective first "закрыва" "ю" "закрывал" "закрывай" "закрывать" );
coat_N = mkIndeclinableNoun "пальто" masculine inanimate ;
cold_ADeg = mkADeg( AStaruyj "холодн") "холоднее";
come_V = mkRegVerb imperfective second "прихо" "жу" "приходил" "приходи" "приходить" ;
computer_N = nTelefon "компьютер" ;
country_N = nMashina "стран" ;
country_N = nMashina "стран" ;
cousin_N = nTelefon "кузен" ;
cousin_N = nTelefon "кузен" ;
cow_N = nMashina "коров" ;
die_V = mkRegVerb imperfective first "умира" "ю" "умирал" "умрай" "умирать" ;
dirty_ADeg = mkADeg( AStaruyj "грязн") "грязнее" ;
doctor_N = nAdres "доктор" ;
doctor_N = nAdres "доктор" ;
dog_N = nNoga "собак" ;
dog_N = nNoga "собак" ;
door_N = nBol "двер" ;
drink_V2 = tvDir (mkRegVerb imperfective second "пь" "ю" "пил" "пей" "пить" );
eat_V2 = tvDir (mkRegVerb imperfective first "куша" "ю" "кушал" "кушай" "кушать" );
eat_V2
enemy_N = nStomatolog "враг" ;
factory_N = nNoga "фабрик" ;
enemy_N = nStomatolog "враг" ;
factory_N = nNoga "фабрик" ;
father_N2 = mkN2 (mkN "отец" "отца" "отцу" "отца" "отцом" "отце" "отцы" "отцов" "отцам" "отцов" "отцами" "отцах" masculine animate);
fear_VS= mkRegVerb imperfective first "бо" "ю" "боял" "бой" "боять" ;
find_V2 = tvDir (mkRegVerb imperfective second "нахо" "жу" "находил" "находи" "находить" );
find_V2
fish_N = nMashina "рыб" ;
floor_N = nTelefon "пол" ;
fish_N = nMashina "рыб" ;
floor_N = nTelefon "пол" ;
forget_V2= tvDir (mkRegVerb imperfective first "забыва" "ю" "забывал" "забывай" "забывать" );
fridge_N = nBank "холодильник" ;
friend_N = mkN "друг" "друга" "другу" "друга" "другом" "друге" "друзья" "друзей" "друзьям" "друзей" "дузьями" "друзьях" masculine animate;
fruit_N = nTelefon "фрукт" ;
garden_N = nTelefon "сад" ;
girl_N = nNoga "девочк" ;
girl_N = nNoga "девочк" ;
glove_N = nNoga "перчатк" ;
gold_N = nChislo "золот" ;
glove_N = nNoga "перчатк" ;
gold_N = nChislo "золот" ;
good_ADeg = mkADeg(AKhoroshij "хорош") "лучше" ;
go_V= mkRegVerb imperfective second "хо" "жу" "ходил" "ходи" "ходить" ;
go_V
green_ADeg = mkADeg( AStaruyj "зелен") "зеленее" ;
harbour_N = nTelefon "залив" ;
harbour_N = nTelefon "залив" ;
hate_V2
hate_V2= tvDir (mkRegVerb imperfective second "ненави" "жу" "ненавидел" "ненавидь" "ненавидеть" );
hat_N = nMashina "шляп" ;
have_V2= tvDir (mkRegVerb imperfective second "име" "ю" "имел" "имей" "иметь" );
have_V2
hear_V2= tvDir (mkRegVerb imperfective first "слуша" "ю" "слушал" "слушай" "слушать" );
hill_N = nTelefon "холм" ;
hill_N = nTelefon "холм" ;
hope_VS= mkRegVerb imperfective first "слуша" "ю" "слушал" "слушай" "слушать" ;
horse_N = nBol "лошад" ;
horse_N = nBol "лошад" ;
hot_ADeg = mkADeg(AKhoroshij "горяч") "горячее" ;
house_N = nAdres "дом" ;
important_ADeg
important_ADeg = mkADeg( AStaruyj "важн") "важнее" ;
industry_N = nChislo "производств" ;
iron_N = nChislo "желез" ;
king_N = mkN "король" "короля" "королю" "короля" "королем" "короле" "короли" "королей" "королям" "королей" "королями" "королях" masculine animate;
king_N = mkN "король" "короля" "королю" "короля" "королем" "короле" "короли" "королей" "королям" "королей" "королями" "королях" Masc Animate;
know_V2= tvDir (mkRegVerb imperfective first "зна" "ю" "знал" "знай" "знать" );
lake_N = nChislo "озер" ;
lake_N = nChislo "озер" ;
lamp_N = nMashina "ламп" ;
learn_V2
leather_N = nEdinica "кож" ;
leave_V2
like_V2
lamp_N = nMashina "ламп" ;
learn_V2= tvDir (mkRegVerb imperfective second "уч" "у" "учил" "учи" "учить" );
leather_N = nEdinica "кож" ;
leave_V2= tvDir (mkRegVerb imperfective second "ухож" "у" "уходил" "уходи" "уходить" );
like_V2= tvDir (mkRegVerb imperfective second "нрав" "лю" "нравил" "нравь" "нравить" );
listen_V2= tvDir (mkRegVerb imperfective first "слуша" "ю" "слушал" "слушай" "слушать" );
live_V= mkRegVerb imperfective second "жив" "у" "жил" "живи" "жить" ;
live_V
long_ADeg = mkADeg( AStaruyj "длинн") "длиннее" ;
lose_V2 = tvDir (mkRegVerb imperfective first "теря" "ю" "терял" "теряй" "терять" );
love_N = nBol "любов" ;
love_V2= tvDir (mkRegVerb imperfective second "люб" "лю" "любил" "люби" "любить" );
man_N = nStomatolog "человек" ;
man_N = nStomatolog "человек" ;
meat_N =nChislo "мяс" ;
milk_N = nChislo "молок" ;
moon_N = nMashina "лун" ;
moon_N = nMashina "лун" ;
mother_N = nMashina "мам" ;
mother_N2 = mkN2 ( nMashina "мам") ;
mountain_N = nMashina "гор" ;
music_N = nNoga "музык" ;
narrow_ADeg = mkADeg( AStaruyj "узк") "уже" ;
narrow_ADeg
new_ADeg = mkADeg( AStaruyj "нов") "новее" ;
newspaper_N = nMashina "газет" ;
oil_N = nBol "нефть" ;
old_ADeg = mkADeg( AStaruyj "стар") "старше" ;
open_V2= tvDir (mkRegVerb imperfective first "открыва" "ю" "открывал" "открывай" "открывать" );
paper_N = nNoga "бумаг" ;
paper_N = nNoga "бумаг" ;
peace_N = nTelefon "мир" ;
pen_N = nNoga "ручк" ;
planet_N = nMashina "планет" ;
plastic_N = nMashina "пластмасс" ;
plastic_N = nMashina "пластмасс" ;
play_V2
policeman_N = nTelefon "милиционер" ;
play_V2 = tvDir (mkRegVerb imperfective first "игра" "ю" "играл" "играй" "играть" );
policeman_N = nTelefon "милиционер" ;
priest_N = nStomatolog "священник" ;
queen_N = nMashina "королев" ;
radio_N = mkIndeclinableNoun "радио" neuter inanimate;
radio_N = mkIndeclinableNoun "радио" ;
read_V2 = tvDir (mkRegVerb imperfective first "чита" "ю" "читал" "читай" "читать" );
red_ADeg = mkADeg( AStaruyj "красн") "краснее" ;
religion_N = nMalyariya "религи" ;
restaurant_N = nTelefon "ресторан" ;
restaurant_N = nTelefon "ресторан" ;
river_N = nNog "рек" ;
river_N = nNoga "рек" ;
rock_N = nUroven "кам" ;
roof_N = nEdinica "крыш" ;
rubber_N = nMashina "резин" ;
run_V = mkRegVerb imperfective first "бега" "ю" "бегал" "бегай" "бегать" ;
run_V
say_VS
school_N = nMashina "школ" ;
science_N = nEdinica "наук" ;
say_VS = mkRegVerb imperfective second "говор" "ю" "говорил" "говори" "говорить" ;
school_N = nMashina "школ" ;
science_N = nEdinica "наук" ;
sea_N = nProizvedenie "мор" ;
seek_V2 = tvDir (mkRegVerb imperfective first "ищ" "у" "искал" "ищи" "искать" );
seek_V2
see_V2 = tvDir (mkRegVerb imperfective second "виж" "у" "видел" "видь" "видеть" );
sell_V3 = tvDirDir (mkRegVerb imperfective first "прода" "ю" "продавал" "продавай" "продавать" );
sell_V3
send_V3 = tvDirDir (mkRegVerb imperfective first "посыла" "ю" "посылал" "посылай" "посылать" );
sheep_N = nMashina "овц" ;
sheep_N = nMashina "овц" ;
ship_N = nNol "корабл" ;
shirt_N = nNoga "рубашк" ;
shoe_N = mkN "туфля" "туфли" "туфле" "туфлю" "туфлей" "туфле" "туфли" "туфель" "туфлям" "туфли" "туфлями" "туфлях" Masc Inanimate;
shop_N = nTelefon "магазин" ;
shoe_N = mkN "туфля" "туфли" "туфле" "туфлю" "туфлей" "туфле" "туфли" "туфель" "туфлям" "туфли" "туфлями" "туфлях" masculine inanimate;
shop_N = nTelefon "магазин" ;
short_ADeg = mkADeg( AMalenkij "коротк") "короче" ;
silver_N = nChislo "серебр" ;
sister_N = nMashina "сестр" ;
sister_N = nMashina "сестр" ;
sleep_V = mkRegVerb imperfective first "сп" "лю" "спал" "спи" "спать" ;
small_ADeg = mkADeg( AMalenkij "маленьк") "меньше" ;
snake_N = nTetya"зме" ;
sock_N = nPotolok "нос" ;
speak_V2 = tvDir (mkRegVerb imperfective second "говор" "ю" "говорил" "говори" "говорить" );
star_N = nMashina "звезд" ;
steel_N = nBol "стал" ;
stone_N = nNol "камен" ;
stove_N = nBol "печ" ;
star_N = nMashina "звезд" ;
steel_N = nBol "стал" ;
stone_N = nNol "камен" ;
stove_N = nBol "печ" ;
student_N = nTelefon "студент" ;
stupid_ADeg = mkADeg( AMolodoj "тупой") "тупее" ;
sun_N = mkN "солнце" "солнца" "солнцу" "солнце" "солнцем" "солнце" "солнца" "солнц" "солнцам" "солнца" "солнцами" "солнцах" Neut Inanimate;
sun_N = mkN "солнце" "солнца" "солнцу" "солнце" "солнцем" "солнце" "солнца" "солнц" "солнцам" "солнца" "солнцами" "солнцах" neuter inanimate;
switch8off_V2 = tvDir (mkRegVerb imperfective first "выключа" "ю" "выключал" "выключай" "выключать") ;
switch8on_V
table_N = nTelefon "стол" ;
switch8on_V2 = tvDir (mkRegVerb imperfective first "включа" "ю" "включал" "включай" "включать") ;
table_N = nTelefon "стол" ;
teacher_N = nNol "учител" ;
teach_V2
teach_V2 = tvDir (mkRegVerb imperfective second "уч" "у" "учил" "учи" "учить" );
television_N = nProizvedenie "телевидени" ;
thick_ADeg
thin_ADeg
train_N = nAdres "поезд" ;
thick_ADeg = mkADeg( AStaruyj "толст") "толще" ;
thin_ADeg = mkADeg( AMalenkij "тонк") "тоньше" ;
train_N = nAdres "поезд" ;
travel_V = mkRegVerb imperfective first "путешеству" "ю" "путешествовал" "путешествуй" "путешествовать" ;
tree_N = nChislo "дерев" ;
trousers_N = mkN "" "" "" "" "" "" "штаны" "штанов" "штанам" "штаны" "штанами" "штанах" Masc Inanimate;
ugly_ADeg
understand_V2
--trousers_N = mkN "" "" "" "" "" "" "штаны" "штанов" "штанам" "штаны" "штанами" "штанах" masculine inanimate;
ugly_ADeg = mkADeg( AStaruyj "некрасив") "некрасивее" ;
understand_V2 = tvDir (mkRegVerb imperfective first "понима" "ю" "понимал" "понимай" "понимать" );
university_N = nTelefon "университет" ;
village_N = nMalyariya "деревн" ;
village_N = nMalyariya "деревн" ;
wait_V2 = tvDir (mkRegVerb imperfective first "жд" "у" "ждал" "жди" "ждать" );
walk_V
walk_V = mkRegVerb imperfective first "гуля" "ю" "гулял" "гуляй" "гулять" ;
warm_ADeg = mkADeg( AStaruyj "тёпл") "теплее" ;
war_N = nMashina "войн" ;
watch_V2
watch_V2 = tvDir (mkRegVerb imperfective second "смотр" "ю" "смотрел" "смотри" "смотреть" );
water_N = nMashina "вод" ;
white_ADeg = mkADeg( AStaruyj "бел") "белее" ;
window_N = nChislo "окн" ;
wine_N = nChislo "вин" ;
window_N = nChislo "окн" ;
wine_N = nChislo "вин" ;
win_V2 = tvDir (mkRegVerb imperfective first "выигрыва" "ю" "выигрывал" "выигрывай" "выигрывать" );
woman_N = nZhenchina "женщин" ;
wood_N = nChislo "дерев" ;
write_V2 = tvDir (mkRegVerb imperfective first "пиш" "у" "писал" "пиши" "писать" );
yellow_ADeg = mkADeg( AStaruyj "жёлт") "желтее" ;
young_ADeg = mkADeg( AMolodoj "молод") "моложе";
do_V2 = tvDir (mkRegVerb imperfective first "дела" "ю" "делал" "делай" "делать" );
now_Adv = mkAdv "сейчас" ;
already_Adv = mkAdv "уже" ;
song_N = nTetya "песн" ;
add_V3 = mkV3 (mkRegVerb imperfective first "складыва" "ю" "складывал" "складывай" "складывать" ) "" "в" accusative accusative;
number_N = nChislo "числ" ;
put_V2 = tvDir (mkRegVerb imperfective second "лож" "у" "ложил" "ложи" "ложить" );
stop_V = mkRegVerb imperfective first "останавлива" "ю" "останавливал" "останавливай" "останавливать";
jump_V = mkRegVerb imperfective first "прыга" "ю" "прыгал" "прыгай" "прыгать" ;
here_Adv = mkAdv "здесь" ;
here7to_Adv = mkAdv "сюда" ;
here7from_Adv = mkAdv "отсюда" ;
there_Adv = mkAdv "там" ;
there7to_Adv = mkAdv "туда" ;
there7from_Adv = mkAdv "оттуда" ;
distance_N3 = mkN3 (nProizvedenie "расстоян") from_Prep to_Prep ;
-- in Russian combinations with verbs are expressed with adverbs:
-- "легко понять" ("easy to understand"), which is different from
-- adjective expression "легкий для понимания" ("easy for understanding")
-- So the next to words are adjectives, since there are such adjectives
-- in Russian, but to use them with verb would be wrong in Russian:
fun_AV = AStaruyj "весёл";
easy_A2V = mkA2 (AMalenkij "легк") "для" genitive ;
empty_ADeg = mkADeg (AMolodoj "пуст") "пустее";
married_A2 = mkA2 (adjInvar "замужем") "за" instructive ;
wood_N = nChislo "дерев" ;

View File

@@ -52,18 +52,19 @@ lincat
N2 = Function ;
-- = CommNounPhrase ** Complement ;
N3 = Function ** {s3 : Str; c2: Case} ;
N3 = CommNoun3;
-- = Function ** {s3 : Str; c2: Case} ;
Num = Numeral ;
-- = {s : Case => Gender => Str} ;
V = Verbum ;
-- = {s : VerbForm => Str ; asp : Aspect } ;
VG = VerbGroup ;
-- VG = VerbGroup ;
-- = Verbum ** { w: Voice; s2 : Bool => Str ;
-- s3 : Gender => Number => Str ; negBefore: Bool} ;
VP = VerbPhrase ;
-- = Verb ** {s2 : Str ; s3 : Gender => Number => Str ;
-- negBefore: Bool} ;
-- = {s : Bool => ClForm => GenNum => Person => Str ; a : Aspect ; w: Voice} ;
-- ** {s2 : Str ; s3 : Gender => Number => Str ; negBefore: Bool} ;
V2 = TransVerb ;
-- = Verbum ** Complement ;
V3 = DitransVerb ;
@@ -73,14 +74,12 @@ lincat
VV = VerbVerb ;
-- = Verbum ;
VCl = {s : Bool => Anteriority => Str} ;
VCl = VerbPhraseClause ;
-- {s : Bool => Anteriority => Str}
-- fixed tense:
-- infinitive verb phrase (in other languages very similar to VPI,
-- but without Bool=>Anteriority)
VPI = VerbPhraseInf ;
-- {s : Str; a: Aspect; w:Voice; s2 : Str ;
-- s3 : Gender => Number => Str ; negBefore: Bool} ;
-- almost the same as VP, but VF is fixed to the infinitive form
-- and the tense field is supressed
VPI = VerbPhrase ;
Adv = Adverb ; -- sentence adverb e.g. "now", "in the house"
-- = {s : Str} ;
@@ -154,9 +153,13 @@ lincat
AS = Adverb ;
-- = {s : Str} ;
A2S = Adverb ** Complement;
AV = Adjective ; --- "eager to leave"
A2S = Adverb2 ;
-- = Adverb ** Complement;
AV = Adjective ;
-- = {s : AdjForm => Str} ;
--- "eager to leave",
-- most combinations with verbs in Russian
-- are expressed by adverb: "easy to understand"
A2V = AdjCompl ;
-- = Adjective ** Complement ;
@@ -168,10 +171,10 @@ lincat
-- similar implementation in all the languages, s-field is dummy:
TP = {s : Str ; b : Bool ; t : ClTense ; a : Anteriority} ; -- combination of the three below
TP = TensePolarity; -- combination of the three below
Tense = {s : Str ; t : ClTense} ;
Ant = {s : Str ; a : Anteriority} ; --For time agreement:
Pol = {s : Str ; p : Bool} ; --Positive or negative statement
Ant = Anterior ; --For time agreement:
Pol = Polarity ; --Positive or negative statement
Subj = {s : Str} ;
}

View File

@@ -1191,6 +1191,37 @@ oper uy_j_EndDecl : Str -> Adjective = \s ->{s = table {
AF Acc Inanimate APl => "все";
AF Acc Animate APl => "всех";
AF Gen _ (ASg Masc) => "всего";
AF Gen _ (ASg Fem) => "всей";
AF Gen _ (ASg Neut) => "всего";
AF Gen _ APl => "всех";
AF Inst _ (ASg Masc) => "всем";
AF Inst _ (ASg Fem) => "всей";
AF Inst _ (ASg Neut) => "всем";
AF Inst _ APl => "всеми";
AF Dat _ (ASg Masc) => "ему";
AF Dat _ (ASg Fem) => "ей";
AF Dat _ (ASg Neut) => "ему";
AF Dat _ APl => "всем";
AF Prepos _ (ASg Masc) => "всём";
AF Prepos _ (ASg Fem) => "всей";
AF Prepos _ (ASg Neut) => "всём";
AF Prepos _ APl => "всех" ;
AdvF => "полностью"
}
} ;
oper uy_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+"ых";
@@ -1230,6 +1261,36 @@ oper ij_EndK_G_KH_Decl : Str -> Adjective = \s ->{s = table {
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 => "о"
}
} ;
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+"ое";

View File

@@ -14,7 +14,7 @@
--
-- The following files are presupposed:
resource ParadigmsRus = open (Predef=Predef), Prelude, SyntaxRus,
resource ParadigmsRus = open (Predef=Predef), Prelude, MorphoRus, SyntaxRus,
CategoriesRus, RulesRus in {
flags coding=utf8 ;
@@ -78,27 +78,27 @@ oper
-- Feminine patterns.
nMashina : Str -> N ; -- inanimate, ending with "-а", Inst -"машин-ой"
nEdinica : Str -> N ; -- inanimate, ending with "-а", Inst -"единиц-ей"
nZhenchina : Str -> N ; -- animate, ending with "-a"
nNoga : Str -> N ; -- inanimate, ending with "г_к_х-a"
nMalyariya : Str -> N ; -- inanimate, ending with "-ия"
nTetya : Str -> N ; -- animate, ending with "-я"
nBol : Str -> N ; -- inanimate, ending with "-ь"(soft sign)
nMashina : Str -> N ; -- feminine, inanimate, ending with "-а", Inst -"машин-ой"
nEdinica : Str -> N ; -- feminine, inanimate, ending with "-а", Inst -"единиц-ей"
nZhenchina : Str -> N ; -- feminine, animate, ending with "-a"
nNoga : Str -> N ; -- feminine, inanimate, ending with "г_к_х-a"
nMalyariya : Str -> N ; -- feminine, inanimate, ending with "-ия"
nTetya : Str -> N ; -- feminine, animate, ending with "-я"
nBol : Str -> N ; -- feminine, inanimate, ending with "-ь"(soft sign)
-- Neuter patterns.
nObezbolivauchee : Str -> N ; -- inanimate, ending with "-ee"
nProizvedenie : Str -> N ; -- inanimate, ending with "-e"
nChislo : Str -> N ; -- inanimate, ending with "-o"
nObezbolivauchee : Str -> N ; -- neutral, inanimate, ending with "-ee"
nProizvedenie : Str -> N ; -- neutral, inanimate, ending with "-e"
nChislo : Str -> N ; -- neutral, inanimate, ending with "-o"
-- Masculine patterns.
Ending with consonant:
--Ending with consonant:
nBrat: Str -> N ; -- animate, брат-ья
nStul: Str -> N ; -- same as above, but inanimate
nMalush : St -> N ; -- малышей
nPotolok : St -> N ; -- потол-ок - потол-ка
nMalush : Str -> N ; -- малышей
nPotolok : Str -> N ; -- потол-ок - потол-ка
-- the next four differ in plural nominative and/or accusative form(s) :
nBank: Str -> N ; -- банк-и (Nom=Acc)
@@ -106,13 +106,14 @@ Ending with consonant:
nAdres : Str -> N ; -- адрес-а (Nom=Acc)
nTelefon : Str -> N ; -- телефон-ы (Nom=Acc)
nNol : Str -> N ; -- inanimate, ending with "-ь" (soft sign)
nUroven : Str -> N ; -- inanimate, ending with "-ень"
nNol : Str -> N ; -- masculine, inanimate, ending with "-ь" (soft sign)
nUroven : Str -> N ; -- masculine, inanimate, ending with "-ень"
-- Nouns used as functions need a preposition. The most common is with Genitive.
mkFun : N -> Preposition -> Case -> N2 ;
funGen : N -> N2 ;
mkN2 : N -> N2 ;
mkN3 : N -> Preposition -> Preposition -> N3 ;
-- Proper names.
@@ -155,8 +156,9 @@ Ending with consonant:
-- Some regular patterns depending on the ending.
AStaruyj : Str -> A ; -- ending with "-ый"
AMalenkij : Str -> A ; -- endign with "-ий"
AMolodoj : Str -> A ; -- ending with "-ой",
AMalenkij : Str -> A ; -- ending with "-ий", Gen - "маленьк-ого"
AKhoroshij : Str -> A ; -- ending with "-ий", Gen - "хорош-его"
AMolodoj : Str -> A ; -- ending with "-ой",
-- plural - молод-ые"
AKakoj_Nibud : Str -> Str -> A ; -- ending with "-ой",
-- plural - "как-ие"
@@ -181,6 +183,12 @@ Ending with consonant:
ap : A -> IsPostfixAdj -> AP ;
--2 Adverbs
-- Adverbs are not inflected. Most lexical ones have position
-- after the verb. Some can be preverbal (e.g. "always").
mkAdv : Str -> Adv ;
--2 Verbs
--
@@ -197,6 +205,13 @@ Voice: Type;
Aspect: Type;
Tense : Type;
Bool: Type;
Conjugation: Type ;
first: Conjugation;
firstE: Conjugation;
second: Conjugation;
mixed: Conjugation;
dolzhen: Conjugation;
true: Bool;
false: Bool;
@@ -215,7 +230,7 @@ past : Tense ;
-- (singular, second person: "беги"), an infinitive ("бежать").
-- Inherent aspect should also be specified.
mkVerbum : Aspect -> (_,_,_,_,_,_,_,_,_ : Str) -> Verbum ;
mkVerbum : Aspect -> (_,_,_,_,_,_,_,_,_ : Str) -> V ;
-- Common conjugation patterns are two conjugations:
-- first - verbs ending with "-ать/-ять" and second - "-ить/-еть".
@@ -228,7 +243,7 @@ past : Tense ;
-- So the definition for verb "любить" looks like:
-- mkRegVerb Imperfective Second "люб" "лю" "любил" "люби" "любить";
mkRegVerb :Aspect -> Conjugation -> (_,_,_,_,_ : Str) -> Verbum ;
mkRegVerb :Aspect -> Conjugation -> (_,_,_,_,_ : Str) -> V ;
-- For writing an application grammar one usualy doesn't need
-- the whole inflection table, since each verb is used in
@@ -245,8 +260,10 @@ past : Tense ;
-- a particle can be included in a $V$.
mkTV : V -> Str -> Case -> V2 ; -- "войти в дом"; "в", accusative
mkV3 : V -> Str -> Str -> Case -> Case -> V3 ; -- "сложить письмо в конверт"
tvDir : V -> V2 ; -- "видеть", "любить"
tvDirDir : V -> V3 ;
-- The definitions should not bother the user of the API. So they are
-- hidden from the document.
--.
@@ -258,6 +275,12 @@ past : Tense ;
Voice = SyntaxRus.Voice ;
Tense = SyntaxRus.RusTense ;
Bool = Prelude.Bool ;
Conjugation = MorphoRus.Conjugation;
first = First ;
firstE = FirstE ;
second = Second ;
mixed = Mixed ;
dolzhen = Dolzhen;
true = True;
false = False ;
@@ -339,7 +362,7 @@ past : Tense ;
nBrat = \s -> nullEndAnimateDeclBrat s** {lock_N = <>};
nStul = \s -> nullEndInAnimateDeclStul s** {lock_N = <>};
nAdres = \s -> nullEndInAnimateDecl2 s ** {lock_N = <>};
nTelefon = \s -> nullEndInAnimateDecl1 s ** {lock_N = <>};
@@ -347,7 +370,9 @@ past : Tense ;
nUroven = \s -> EN_softSignEndDeclMasc s ** {lock_N = <>};
-- mkFun defined in syntax.RusU
-- funGen defined in syntax.RusU
mkN2 n = funGen n ** {lock_N2 = <>} ; -- defined in syntax.RusU
mkN3 n p r = mkCommNoun3 n p r ** {lock_N3 = <>} ; -- defined in syntax.RusU
mkPN = \ivan, g, anim ->
case g of {
@@ -364,15 +389,18 @@ past : Tense ;
adjInvar = \s -> { s = \\af => s } ** {lock_A= <>};
AStaruyj s = uy_j_EndDecl s ** {lock_A = <>} ;
AMalenkij s = ij_EndK_G_KH_Decl s ** {lock_A= <>};
AKhoroshij s = shij_End_Decl s ** {lock_A= <>};
AMalenkij s = ij_EndK_G_KH_Decl s ** {lock_A= <>};
AMolodoj s = uy_oj_EndDecl s ** {lock_A= <>};
AKakoj_Nibud s t = i_oj_EndDecl s t ** {lock_A= <>};
mkA2 a p c= mkAdjective2 a p c ** {lock_A2 = <>};
-- mkADeg defined in morpho.RusU
mkADeg a s = mkAdjDeg a s ** {lock_ADeg = <>}; -- defined in morpho.RusU
ap a p = mkAdjPhrase a p ** {lock_AP = <>}; -- defined in syntax module
mkAdv x = ss x ** {lock_Adv = <>} ;
-- Verb definitions
mkVerbum = \asp, sgP1, sgP2, sgP3, plP1, plP2, plP3,
@@ -380,12 +408,12 @@ past : Tense ;
Perfective =>
mkVerb (perfectiveActivePattern inf imperSgP2
(presentConj sgP1 sgP2 sgP3 plP1 plP2 plP3) (pastConj sgMascPast))
(pastConj sgMascPast);
(pastConj sgMascPast) ** { lock_V=<> };
Imperfective =>
mkVerb (imperfectiveActivePattern inf imperSgP2
(presentConj sgP1 sgP2 sgP3 plP1 plP2 plP3) (pastConj sgMascPast))
(pastConj sgMascPast)
};
(pastConj sgMascPast) ** { lock_V=<> }
};
oper presentConj: (_,_,_,_,_,_: Str) -> PresentVerb =
\sgP1, sgP2, sgP3, plP1, plP2, plP3 ->
@@ -398,8 +426,8 @@ past : Tense ;
PRF APl P3 => plP3
};
mkRegVerb = verbDecl ; -- defined in morpho.RusU.gf
mkRegVerb a b c d e f g = verbDecl a b c d e f g ** {lock_V = <>} ;
-- defined in morpho.RusU.gf
{-
mkV a b = extVerb a b ** {lock_V = <>}; -- defined in types.RusU.gf
@@ -413,5 +441,7 @@ past : Tense ;
-}
mkTV a b c = mkTransVerb a b c ** {lock_V2 = <>}; -- defined in syntax.RusU.gf
tvDir v = mkDirectVerb v ** {lock_V2 = <>}; -- defined in syntax.RusU.gf
tvDirDir v = mkDirDirectVerb v ** {lock_V3 = <>}; -- defined in syntax.RusU.gf
mkV3 v s w c d = mkDitransVerb v s w c d ** {lock_V3 = <>}; -- defined in syntax.RusU.gf
} ;

View File

@@ -1,3 +1,4 @@
--# -path=.:../abstract:../../prelude
instance ResourceRus of Resource = reuse AllResourceRus ;
concrete ResourceRus of Resource = RulesRus, ClauseRus, StructuralRus ** {} ;
---- concrete ResourceRus of Resource = RulesRus, VerbphraseRus ** {} ;

View File

@@ -34,50 +34,35 @@ lin
NDetNP = nDetNP ;
NDetNum = nDetNum ;
--- PosVG = predVerbGroup True Present ;
--- NegVG = predVerbGroup False Present ;
--- PredVP = predVerbPhrase ;
--- PredV = predVerb ;
--- PredAP = predAdjective ;
--- PredCN = predCommNoun ;
--- PredV2 = complTransVerb ;
--- PredV3 = complDitransVerb ;
--- PredPassV = predPassVerb ;
--- PredNP = predNounPhrase ;
--- PredPP = predAdverb ;
--- PredVS = complSentVerb ;
--- PredVV = complVerbVerb ;
--- VTrans = verbOfTransVerb ;
-- The main uses of verbs and verb phrases have been moved to the
-- module $Verbphrase$ (deep $VP$ nesting) and its alternative,
-- $Clause$ (shallow many-place predication structure).
-- PredAS : AS -> S -> Cl ; -- "it is good that he comes"
-- PredV0 : V0 -> Cl ; -- "it is raining"
PredAS = predAS ;
PredV0 = predV0 ;
-- Partial saturation.
-- UseV2 : V2 -> V ; -- "loves"
ComplA2S = complA2S ;
-- ComplA2S : A2S -> NP -> AS ; -- "good for John"
-- UseV2V : V2V -> VV ;
-- UseV2S : V2S -> VS ;
-- UseV2Q : V2Q -> VQ ;
-- UseA2S : A2S -> AS ;
-- UseA2V : A2V -> AV ;
--- VTrans = verbOfTransVerb ;
UseV2 = verbOfTransVerb ;
UseV2V = verbOfTransVerb ;
UseV2S = verbOfTransVerb ;
UseV2Q = verbOfTransVerb ;
UseA2S = useA2S ;
UseA2V = useA2V;
-- Formation of tensed phrases.
-- AdjPart : V -> A ; -- past participle, e.g. "forgotten"
AdjPart = adjPart ;
-- UseCl : TP -> Cl -> S ;
-- UseRCl : TP -> RCl -> RS ;
-- UseQCl : TP -> QCl -> QS ;
-- UseVCl : Pol -> Ant -> VCl -> VPI ;
UseCl = useCl ;
UseRCl = useRCl ;
UseQCl = useQCl ;
UseVCl = useVCl ;
-- s field is superficial:
PosTP t a = {s = t.s ++ a.s ; b = True ; t = t.t ; a = a.a} ;
@@ -102,15 +87,13 @@ lin
PrepNP p = prepPhrase p ;
AdvVPI = adVerbPhraseInf ;
AdvCN = advCommNounPhrase ;
AdvNP = advNP ;
AdvAP = advAdjPhrase ;
AdvCl = advClause ;
AdCPhr = advSentencePhr ;
AdvPhr = advSentencePhr ;
---AdvVP = adVerbPhrase ;
---LocNP = locativeNounPhrase ;
IdRP = identRelPron ;
FunRP = funRelPron ;
@@ -118,24 +101,8 @@ lin
RelCl = relCl;
RelSlash = relSlash ;
--- ModRC = modRelClause ;
--- RelSuch = relSuch ;
--- RelVP = relVerbPhrase ;
--- PosSlashV2 = slashTransVerb True ;
--- NegSlashV2 = slashTransVerb False ;
--- OneVP = predVerbPhrase (pron2NounPhrase pronKtoTo Animate) ;
--- ThereNP = thereIs ;
ModRS = modRS ;
--- WhoOne = intPronKto Sg ;
--- WhoMany = intPronKto Pl ;
--- WhatOne = intPronChto Sg ;
--- WhatMany = intPronChto Pl ;
--- NounIPOne = nounIntPron Sg ;
--- NounIPMany = nounIntPron Pl ;
--- SuperlNP = superlNounPhrase ;
--- QuestVP = questVerbPhrase ;
--- IntVP = intVerbPhrase ;
--- ImperVP = imperVerbPhrase ;
FunIP = funIntPron ;
QuestAdv = questAdverbial ;
@@ -145,17 +112,17 @@ lin
ImperOne = imperUtterance Masc Sg ;
ImperMany = imperUtterance Masc Pl ;
-- IDetCN : IDet -> CN -> IP ; -- "which car", "which cars"
IDetCN = iDetCN;
-- SlashV2 : NP -> V2 -> Slash ; -- "(whom) John doesn't love"
-- SlashVV2 : NP -> VV -> V2 -> Slash ; -- "(which song do you) want to play"
-- SlashAdv : Cl -> Prep -> Slash ; -- "(whom) John walks with"
SlashV2 = slashV2 ;
SlashVV2 = slashVV2 ;
SlashAdv = slashAdv ;
-- IntSlash = intSlash ;
-- QuestCl : Cl -> QCl ; -- "does John walk"; "doesn't John walk"
IntSlash = intSlash ;
QuestCl = questCl ;
-- PosImpVP, NegImpVP : VCl -> Imp ; -- "(don't) be a man"
PosImpVP = posImpVP ;
NegImpVP = negImpVP ;
TwoS = twoSentence ;
ConsS = consSentence ;
@@ -186,10 +153,9 @@ lin
AdvSubj = advSubj ;
--- SubjS = subjunctSentence ;
--- SubjImper = subjunctImperative ;
--- SubjQu = subjunctQuestion ;
--- SubjVP = subjunctVerbPhrase ;
SubjS = subjunctSentence ;
SubjImper = subjunctImperative ;
PhrNP = useNounPhrase ;
PhrOneCN = useCommonNounPhrase Sg ;
@@ -205,10 +171,31 @@ lin
-- These constructs tend to have language-specific syntactic realizations.
--- IsThereNP = isThere ;
-- ExistCN = existCN ;
-- ExistNumCN = existNumCN ;
ExistCN = existCN ;
ExistNumCN = existNumCN ;
OneNP = npOne ;
--- ThereNP = thereIs ;
--- WhoOne = intPronKto Sg ;
--- WhoMany = intPronKto Pl ;
--- WhatOne = intPronChto Sg ;
--- WhatMany = intPronChto Pl ;
--- NounIPOne = nounIntPron Sg ;
--- NounIPMany = nounIntPron Pl ;
--- SuperlNP = superlNounPhrase ;
--- QuestVP = questVerbPhrase ;
--- IntVP = intVerbPhrase ;
--- ImperVP = imperVerbPhrase ;
--- SubjQu = subjunctQuestion ;
--- ModRC = modRelClause ;
--- RelSuch = relSuch ;
--- PosSlashV2 = slashTransVerb True ;
--- NegSlashV2 = slashTransVerb False ;
} ;

View File

@@ -1,5 +1,4 @@
--# -path=.:../abstract:../../prelude
--1 The Top-Level Russian Resource Grammar
--
-- Janna Khegai 2003
@@ -25,112 +24,115 @@ flags
coding=utf8 ;
lin
INP = pron2NounPhrase pronYa Animate;
ThouNP = pron2NounPhrase pronTu Animate;
HeNP = pron2NounPhrase pronOn Animate;
SheNP = pron2NounPhrase pronOna Animate;
ItNP = pron2NounPhrase pronOno Inanimate;
WeNumNP = pronWithNum (pron2NounPhrase pronMu Animate);
YeNumNP = pronWithNum (pron2NounPhrase pronVu Animate);
YouNP = pron2NounPhrase pronVu Animate;
TheyNP = pron2NounPhrase pronOni Animate;
TheyFemNP = pron2NounPhrase pronOni Animate;
EveryDet = kazhdujDet ** {n = Sg ; g = PNoGen; c= Nom} ;
AllMassDet = vesDet ** {n = Sg; g = PNoGen; c = Nom} ;
AllNumDet = mkDeterminerNum (vseDetPl ** {n = Pl; g = PNoGen; c = Nom} );
WhichDet = kotorujDet ** {n = Sg; g = PNoGen; c= Nom} ;
WhichNumDet = mkDeterminerNum (kotorujDet ** {n = Pl; g = PNoGen; c= Nom} );
MostDet = bolshinstvoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
-- inanimate, Sg: "большинство телефонов безмолству-ет"
MostsDet = bolshinstvoPlDet ** {n = Pl; g = (PGen Neut); c= Gen} ;
-- animate, Pl: "большинство учащихся хорошо подготовлен-ы"
HowManyDet = skolkoSgDet ** {n = Sg; g = (PGen Neut); c= Gen};
ManyDet = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
MuchDet = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ; -- same as previous
SomeDet = nekotorujDet ** {n = Sg; g = PNoGen; c= Nom} ;
SomeNumDet = mkDeterminerNum (nekotorujDet ** {n = Pl; g = PNoGen; c= Nom} );
AnyDet = lubojDet ** {n = Sg; g = PNoGen; c= Nom} ;
AnyNumDet = mkDeterminerNum (lubojDet ** {n = Pl; g = PNoGen; c= Nom} );
NoDet = nikakojDet ** {n = Sg; g = PNoGen; c= Nom} ;
NoNumDet = mkDeterminerNum (nikakojDet ** {n = Pl; g = PNoGen; c= Nom} );
ThisDet = etotDet ** {n = Sg; g = PNoGen; c= Nom} ;
TheseNumDet = mkDeterminerNum (etotDet ** {n = Pl; g = PNoGen; c= Nom} );
ThatDet = totDet ** {n = Sg; g = PNoGen; c= Nom} ;
ThoseNumDet = mkDeterminerNum (totDet ** {n = Pl; g = PNoGen; c= Nom} );
-- First mount the numerals.
UseNumeral i = i ;
ThisNP = det2NounPhrase etotDet ; -- inanimate form only
ThatNP = det2NounPhrase totDet ; -- inanimate form only
TheseNumNP n = { s =\\_ => [] ; n = Pl; p = P3; g= PGen Fem ; anim = Animate ; pron = True} ;
-- missing in Russian
ThoseNumNP n = { s =\\_ => [] ; n = Pl; p = P3; g=PGen Fem ; anim = Animate ; pron = True} ;
-- missing in Russian
EverybodyNP = mkNounPhrase Pl (noun2CommNounPhrase (eEnd_Decl "вс")) ;
SomebodyNP = pron2NounPhrase pronKtoTo Animate;
NobodyNP = pron2NounPhrase pronNikto Animate;
EverythingNP = pron2NounPhrase pronVseInanimate Inanimate;
SomethingNP = pron2NounPhrase pronChtoTo Inanimate ;
NothingNP = pron2NounPhrase pronNichto Inanimate;
CanVV = verbMoch ;
CanKnowVV = verbMoch ;
MustVV = verbDolzhen ;
WantVV = verbKhotet ;
-- Then an alphabetical list of structural words
HowIAdv = ss "как" ;
WhenIAdv = ss "когда" ;
WhereIAdv = ss "где" ;
WhyIAdv = ss "почему" ;
AndConj = ss "и" ** {n = Pl} ;
OrConj = ss "или" ** {n = Sg} ;
BothAnd = sd2 "как" [", так и"] ** {n = Pl} ;
EitherOr = sd2 "либо" [", либо"] ** {n = Sg} ;
above_Prep = { s2 = "над" ; c = Inst} ;
after_Prep = { s2 = "после" ; c = Gen };
all8mass_Det = vesDet ** {n = Sg; g = PNoGen; c = Nom} ;
all_NDet = vseDetPl ** { g = PNoGen; c = Nom} ;
almost_Adv = ss "почти" ;
although_Subj = ss "хотя" ;
and_Conj = ss "и" ** {n = Pl} ;
because_Subj = ss ["потому что"] ;
before_Prep ={ s2 = "перед" ; c = Inst};
behind_Prep = { s2 = "за" ; c = Inst };
between_Prep = { s2 = "между" ; c = Inst};
both_AndConjD = sd2 "как" [", так и"] ** {n = Pl} ;
by8agent_Prep = { s2 = ["с помощью"] ; c = Gen};
by8means_Prep = { s2 = ["с помощью"] ; c = Gen};
can8know_VV = verbMoch ;
can_VV = verbMoch ;
during_Prep = { s2 = ["в течение"] ; c = Gen};
either8or_ConjD = sd2 "либо" [", либо"] ** {n = Sg} ;
-- comma is not visible in GUI!
every_Det = kazhdujDet ** {n = Sg ; g = PNoGen; c= Nom} ;
everybody_NP = mkNounPhrase Pl (noun2CommNounPhrase (eEnd_Decl "вс")) ;
everything_NP = pron2NounPhrase pronVseInanimate Inanimate;
everywhere_Adv = ss "везде" ;
from_Prep = { s2 = "от" ; c = Gen };
he_NP = pron2NounPhrase pronOn Animate;
how_IAdv = ss "как" ;
how8many_IDet = skolkoSgDet ** {n = Sg; g = (PGen Neut); c= Gen};
i_NP = pron2NounPhrase pronYa Animate;
if_Subj = ss "если" ;
in8front_Prep = { s2 = "перед" ; c = Inst};
in_Prep = { s2 = "в" ; c = Prepos };
it_NP = pron2NounPhrase pronOno Inanimate;
many_Det = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
most_Det = bolshinstvoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
-- inanimate, Sg: "большинство телефонов безмолству-ет"
most8many_Det = bolshinstvoPlDet ** {n = Pl; g = (PGen Neut); c= Gen} ;
-- animate, Pl: "большинство учащихся хорошо подготовлен-ы"
much_Det = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ; -- same as previous
must_VV = verbDolzhen ;
no_Phr = ss ["Нет ."] ;
on_Prep = { s2 = "на" ; c = Prepos };
or_Conj = ss "или" ** {n = Sg} ;
otherwise_Adv = ss "иначе" ;
part_Prep = { s2 = "" ; c = Nom}; -- missing in Russian
possess_Prep = { s2 = "" ; c = Gen}; --- ?? AR 19/2/2004
quite_Adv = ss "довольно" ;
she_NP = pron2NounPhrase pronOna Animate;
so_Adv = ss "так";
somebody_NP = pron2NounPhrase pronKtoTo Animate;
some_Det = nekotorujDet ** {n = Sg; g = PNoGen; c= Nom} ;
some_NDet = nekotorujDet ** { g = PNoGen; c= Nom} ;
something_NP = pron2NounPhrase pronChtoTo Inanimate ;
somewhere_Adv = ss "где-нибудь" ;
--- TheseNumNP n = { s =\\_ => [] ; n = Pl; p = P3; g= PGen Fem ;
--- anim = Animate ; pron = True} ; -- missing in Russian
--- ThoseNumNP n = { s =\\_ => [] ; n = Pl; p = P3; g=PGen Fem ;
--- anim = Animate ; pron = True} ; -- missing in Russian
that_Det = totDet ** {n = Sg; g = PNoGen; c= Nom} ;
that_NP = det2NounPhrase totDet ; -- inanimate form only
therefore_Adv = ss "следовательно" ;
these_NDet = etotDet ** { g = PNoGen; c= Nom} ;
they8fem_NP = pron2NounPhrase pronOni Animate;
they_NP = pron2NounPhrase pronOni Animate;
this_Det = etotDet ** {n = Sg; g = PNoGen; c= Nom} ;
this_NP = det2NounPhrase etotDet ; -- inanimate form only
those_NDet = totDet ** {g = PNoGen; c= Nom} ;
thou_NP = pron2NounPhrase pronTu Animate;
through_Prep = { s2 = "через" ; c = Acc };
to_Prep = { s2 = "к" ; c = Dat };
too_Adv = ss "слишком" ;
under_Prep = { s2 = "под" ; c = Inst };
very_Adv = ss "очень" ;
want_VV = verbKhotet ;
we_NP = pron2NounPhrase pronMu Animate ;
what8many_IP = pron2NounPhraseNum pronChto Inanimate Pl;
what8one_IP = pron2NounPhraseNum pronChto Inanimate Sg;
when_IAdv = ss "когда" ;
when_Subj = ss "когда" ;
where_IAdv = ss "где" ;
which8many_IDet = kotorujDet ** {n = Pl; g = PNoGen; c= Nom} ;
which8one_IDet = kotorujDet ** {n = Sg; g = PNoGen; c= Nom} ;
who8many_IP = pron2NounPhraseNum pronKto Animate Pl;
who8one_IP = pron2NounPhraseNum pronKto Animate Sg;
why_IAdv = ss "почему" ;
with_Prep = { s2 = "с" ; c = Inst};
without_Prep = { s2 = "без" ; c = Gen};
ye_NP = pron2NounPhrase pronVu Animate;
yes_Phr = ss ["Да ."] ;
you_NP = pron2NounPhrase pronVu Animate;
--- NoDet = nikakojDet ** {n = Sg; g = PNoGen; c= Nom} ;
--- AnyDet = lubojDet ** {n = Sg; g = PNoGen; c= Nom} ;
--- AnyNumDet = mkDeterminerNum (lubojDet ** {n = Pl; g = PNoGen; c= Nom} );
--- NoNumDet = mkDeterminerNum (nikakojDet ** {n = Pl; g = PNoGen; c= Nom} );
---NobodyNP = pron2NounPhrase pronNikto Animate;
---NothingNP = pron2NounPhrase pronNichto Inanimate;
-- In case of "neither.. no" expression double negation is not
-- only possible, but also required in Russian.
-- There is no means of control for this however in the resource grammar.
NeitherNor = sd2 "ни" [", ни"] ** {n = Sg} ;
IfSubj = ss "если" ;
WhenSubj = ss "когда" ;
AlthoughSubj = ss "хотя" ;
PhrYes = ss ["Да ."] ;
PhrNo = ss ["Нет ."] ;
EverywhereNP = ss "везде" ;
SomewhereNP = ss "где-нибудь" ;
NowhereNP = ss "нигде" ;
VeryAdv = ss "очень" ;
TooAdv = ss "слишком" ;
OtherwiseAdv = ss "иначе" ;
AlmostAdv = ss "почти" ;
QuiteAdv = ss "довольно" ;
ThereforeAdv = ss "следовательно" ;
InPrep = { s2 = "в" ; c = Prepos };
OnPrep = { s2 = "на" ; c = Prepos };
ToPrep = { s2 = "к" ; c = Dat };
ThroughPrep = { s2 = "через" ; c = Acc };
AbovePrep = { s2 = "над" ; c = Inst};
UnderPrep = { s2 = "под" ; c = Inst };
InFrontPrep = { s2 = "перед" ; c = Inst};
BehindPrep = { s2 = "за" ; c = Inst };
BetweenPrep = { s2 = "между" ; c = Inst};
FromPrep = { s2 = "от" ; c = Gen };
BeforePrep = { s2 = "перед" ; c = Inst};
DuringPrep = { s2 = ["в течение"] ; c = Gen};
AfterPrep = { s2 = "после" ; c = Gen };
WithPrep = { s2 = "с" ; c = Inst};
WithoutPrep = { s2 = "без" ; c = Gen};
ByMeansPrep = { s2 = ["с помощью"] ; c = Gen};
PossessPrep = { s2 = "" ; c = Gen}; --- ?? AR 19/2/2004
PartPrep = { s2 = "" ; c = Nom}; -- missing in Russian
AgentPrep = { s2 = "" ; c = Nom}; -- missing in Russian
--- NeitherNor = sd2 "ни" [", ни"] ** {n = Sg} ;
--- NowhereNP = ss "нигде" ;
--- AgentPrep = { s2 = "" ; c = Nom}; -- missing in Russian
} ;

View File

@@ -83,10 +83,15 @@ Numeral : Type = {s : Case => Gender => Str} ;
n = n ; g = PGen chelovek.g ; p = P3 ; pron =False ;
anim = chelovek.anim
} ;
pron2NounPhrase : Pronoun -> Animacy -> NounPhrase = \ona, anim ->
{s = ona.s ; n = ona.n ; g = ona.g ;
pron = ona.pron; p = ona.p ; anim = anim } ;
pron2NounPhraseNum : Pronoun -> Animacy -> Number -> NounPhrase = \ona, anim, num ->
{s = ona.s ; n = num ; g = ona.g ;
pron = ona.pron; p = ona.p ; anim = anim } ;
det2NounPhrase : Adjective -> NounPhrase = \eto ->
{s = \\pf => eto.s ! (AF (extCase pf) Inanimate (ASg Neut)); n = Sg ; g = PGen Neut ; pron = False ; p = P3 ; anim = Inanimate } ;
@@ -228,37 +233,6 @@ nDetNP : NoNumberDeterminer -> Numeral -> CommNounPhrase -> NounPhrase =\eti,py
--2 Adjectives
--3 Simple adjectives
--
-- A special type of adjectives just having positive forms
-- (for semantic reasons) is useful, e.g. "русский".
oper
extAdjective : AdjDegr -> Adjective = \adj ->
{ s = \\af => adj.s ! Pos ! af } ;
-- Coercions between the compound gen-num type and gender and number:
gNum : Gender -> Number -> GenNum = \g,n ->
case n of
{ Sg => case g of
{ Fem => ASg Fem ;
Masc => ASg Masc ;
Neut => ASg Neut } ;
Pl => APl
} ;
pgNum : PronGen -> Number -> GenNum = \g,n ->
case n of
{ Sg => case g of
{ PGen Fem => ASg Fem ;
PGen Masc => ASg Masc ;
PGen Neut => ASg Neut ;
_ => ASg Masc } ;
Pl => APl
} ;
-- _ => variants {ASg Masc ; ASg Fem} } ;
-- "variants" version cause "no term variants" error during linearization
--3 Adjective phrases
--
-- An adjective phrase may contain a complement, e.g. "моложе Риты".
@@ -328,15 +302,15 @@ pgNum : PronGen -> Number -> GenNum = \g,n ->
p = True
} ;
complVerbAdj : Adjective -> VerbPhraseInf -> AdjPhrase = \zhazhduuchii,zhit ->
{s = \\af => zhazhduuchii.s ! af ++ zhit.s2 ++ zhit.s ;
complVerbAdj : Adjective -> VerbPhrase -> AdjPhrase = \zhazhduuchii,zhit ->
{s = \\af => zhazhduuchii.s ! af ++ zhit.s2 ++ zhit.s!ClInfinit !APl! P3 ;
p = True
} ;
complObjA2V: AdjCompl -> NounPhrase -> VerbPhraseInf -> AdjPhrase =
complObjA2V: AdjCompl -> NounPhrase -> VerbPhrase -> AdjPhrase =
\ legkii, mu, zapomnit ->
{ s = \\af => legkii.s ! AdvF ++ zapomnit.s2 ++ zapomnit.s ++
{ s = \\af => legkii.s ! AdvF ++ zapomnit.s2 ++ zapomnit.s!ClInfinit!APl!P3 ++
mu. s ! (mkPronForm legkii.c No NonPoss);
p = True
};
@@ -365,7 +339,7 @@ complObjA2V: AdjCompl -> NounPhrase -> VerbPhraseInf -> AdjPhrase =
-- are counterexamples to the liberal choice we've made.
Function = CommNounPhrase ** Complement ;
CommNoun3 = Function ** {s3 : Str ; c2 : Case} ;
-- The application of a function gives, in the first place, a common noun:
-- "ключ от дома". From this, other rules of the resource grammar
@@ -393,6 +367,8 @@ complObjA2V: AdjCompl -> NounPhrase -> VerbPhraseInf -> AdjPhrase =
mkFun : CommNoun -> Str -> Case -> Function = \f,p,c ->
(n2n f) ** {s2 = p ; c = c} ;
mkCommNoun3: CommNoun -> Preposition-> Preposition -> CommNoun3 = \f,p,r ->
(n2n f) ** {s2 = p.s2 ; c=p.c; s3=r.s2 ; c2=r.c} ;
-- The commonest cases are functions with Genitive.
@@ -429,6 +405,14 @@ let {n = ivan.n ; nf = if_then_else Number coll Sg n} in
anim = novayaMashina.anim
} ;
modRS : CommNounPhrase -> RelPron -> CommNounPhrase =
\chelovek, kotorujSmeetsya ->
{ s = \\n,c => chelovek.s!n!c ++
kotorujSmeetsya.s!(gNum chelovek.g n)!c!chelovek.anim;
g = chelovek.g;
anim = chelovek.anim
};
--2 Verbs
--3 Transitive verbs
@@ -452,6 +436,15 @@ let {n = ivan.n ; nf = if_then_else Number coll Sg n} in
mkTransVerb : Verbum -> Str -> Case -> TransVerb = \v,p,cas ->
v ** {s2 = p ; c = cas } ;
-- dummy function, since formally there are no past participle in Russian:
-- забыть - забытый, поймать - пойманный:
adjPart : Verbum -> Adjective = \zabuvat ->
{ s = \\af => case zabuvat.asp of
{ Perfective => zabuvat.s! VFORM Act VINF;
Imperfective => []
}
};
mkDirectVerb : Verbum -> TransVerb = \v ->
mkTransVerb v nullPrep Acc;
@@ -459,29 +452,49 @@ let {n = ivan.n ; nf = if_then_else Number coll Sg n} in
nullPrep : Str = [] ;
-- The rule for using transitive verbs is the complementization rule:
complTransVerb :TransVerb -> NounPhrase -> VerbGroup = \se,tu ->
complTransVerb :TransVerb -> NounPhrase -> VerbPhrase = \se,tu ->
{s =\\clf,gn,p => se.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p)
++ se.s2 ++ tu.s ! (mkPronForm se.c No NonPoss) ;
asp = se.asp ;
w = Act;
s2 = table{_ => ""};
w = Act;
s2 = "";
s3 = \\g,n => "";
negBefore = True
} ;
--3 Verb phrases
--
-- Verb phrases are discontinuous: the parts of a verb phrase are
-- Verb phrases are discontinuous: the parts of a verb phrase are
-- (s) an inflected verb, (s2) verb adverbials (not negation though), and
-- (s3) complement. This discontinuity is needed in sentence formation
-- to account for word order variations.
VerbPhrase : Type = Verb ** {s2: Str; s3 : Gender => Number => Str ;
negBefore: Bool} ;
VerbPhraseInf : Type = {s : Str; a: Aspect; w:Voice; s2 : Str ;
s3 : Gender => Number => Str ; negBefore: Bool} ;
-- VerbGroup is new in "lib"-verion of the resource.
reflTransVerb : TransVerb -> VerbPhrase = \v ->
{ s = \\clf,gn,p => v.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ v.s2 ++ sebya!v.c;
asp = v.asp ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n=> ""
} ;
VerbPhraseInf : Type = {s : Str; a: Aspect; w:Voice; s2 :Str; s3: Gender => Number => Str ; negBefore: Bool} ;
VerbPhraseClause = {s : Bool => Anteriority => ClForm=>GenNum=> Person=> Str; a: Aspect; w:Voice; s2: Str; s3 : Gender => Number => Str ; negBefore: Bool} ;
Polarity = {s : Str ; p : Bool} ;
Anterior = {s : Str ; a : Anteriority};
useVCl : Polarity -> Anterior -> VerbPhraseClause -> VerbPhrase=
\p,a, v -> {s = v.s!p.p!a.a ; s2 = case p.p of {True =>v.s2; False => "не"++v.s2}; s3 = v.s3;
asp = v.a; w = v.w; negBefore = v.negBefore } ;
{-
-- VerbGroup is in 0.6-version of the resource.
-- VerbGroup does not have RusTense parameter fixed.
-- It also not yet negated (s2):
@@ -495,30 +508,35 @@ let {n = ivan.n ; nf = if_then_else Number coll Sg n} in
s2 = negation b ;
s3 = vidit.s3 ;
negBefore = vidit.negBefore
} ;
-}
passVerb : Verbum -> VerbPhrase = \se ->
{s=\\clf,gn,p => se.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ;
asp=se.asp; w=Pass; s2 = "";
negBefore = True;
s3 = table{_=> table{_ => ""}}
};
-- A simple verb can be made into a verb phrase with an empty complement.
-- There are two versions, depending on if we want to negate the verb.
-- N.B. negation is *not* a function applicable to a verb phrase, since
-- double negations with "inte" are not grammatical.
predVerb : Verbum -> VerbGroup = \se ->
predVerb : Verbum -> VerbPhrase = \se ->
{s=\\clf,gn,p => se.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ;
asp = se.asp ;
w=Act;
s2 = "";
negBefore = True;
s3 = table{_=> table{_ => ""}}
} ;
predPassVerb : Verbum -> VerbGroup = \se ->
se ** {w=Pass; s2 = table{True => ""; False => "не"};
negBefore = True;
s3 = table{_=> table{_ => ""}}
};
negation : Bool -> Str = \b -> if_then_else Str b [] "не" ;
-- Sometimes we want to extract the verb part of a verb phrase.
verbOfPhrase : VerbPhrase -> Verb = \v ->
verbOfPhrase : VerbPhrase -> Verb = \v ->
{s = v.s; t = v.t ; asp = v.asp ; w =v.w} ;
-- Verb phrases can also be formed from adjectives (" молод"),
@@ -528,25 +546,31 @@ let {n = ivan.n ; nf = if_then_else Number coll Sg n} in
-- Note: we omit a dash "-" because it will cause problems with negation word order:
-- "Я не - волшебник". Alternatively, we can consider verb-based VP and
-- all the rest.
predAdverb : Adverb -> VerbGroup = \zloj ->
{ s= table {
VFORM _ (VIMP Sg _) => "будь" ++ zloj.s; -- person is ignored !
VFORM _ (VIMP Pl _) => "будьте" ++ zloj.s;
VFORM _ VINF => "быть" ++ zloj.s;
VFORM _ (VIND _ (VPresent _)) => zloj.s ;
VFORM _ (VIND (ASg Fem) VPast) => "была" ++ zloj.s;
VFORM _ (VIND (ASg Masc) VPast) => "был" ++ zloj.s;
VFORM _ (VIND (ASg Neut) VPast) => "было" ++ zloj.s;
VFORM _ (VIND APl VPast) => "были" ++ zloj.s;
VFORM _ (VIND (ASg _) (VFuture _)) => "будет" ++ zloj.s;
-- all the rest.
predAdverb : Adverb -> VerbPhrase = \zloj ->
{ s= \\clf,gn,p => case clf of {
ClImper => case gn of
{ ASg _ => "будь" ++ zloj.s; -- person is ignored !
APl => "будьте" ++ zloj.s
};
ClInfinit => "быть" ++ zloj.s;
ClIndic Present _ => zloj.s ;
ClIndic Past _ => case gn of
{ (ASg Fem) => "была" ++ zloj.s;
(ASg Masc) => "был" ++ zloj.s;
(ASg Neut) => "было" ++ zloj.s;
APl => "были" ++ zloj.s
};
ClIndic Future _ => case gn of
{ (ASg _) => "будет" ++ zloj.s;
APl => "будут" ++ zloj.s
};
ClCondit => ""
} ;
asp = Imperfective ;
asp = Imperfective ;
w = Act;
s2 = table{True => ""; False => "не"};
s2 = "";
negBefore = True;
s3 = \\g,n => ""
} ;
@@ -567,34 +591,109 @@ let {n = ivan.n ; nf = if_then_else Number coll Sg n} in
-- We treat so far only the rule in which the ditransitive
-- verb takes both complements to form a verb phrase.
DitransVerb = TransVerb ** {s4 : Str; c2: Case} ;
DitransVerb = TransVerb ** {s4 : Str; c2: Case} ;
mkDitransVerb : Verbum -> Str -> Str -> Case -> Case -> DitransVerb =
v ** {s2 = ""; c = c1; s4 = ""; c2=c2 } ;
\v,s1,s2,c1,c2 -> v ** {s2 = s1; c = c1; s4 = s2; c2=c2 } ;
mkDirDirectVerb : Verbum -> DitransVerb = \v ->
mkDitransVerb v "" "" Acc Dat ;
complDitransAdjVerb : TransVerb -> NounPhrase -> AdjPhrase -> VerbPhrase =
\obechat,tu,molodoj ->
{s = \\clf,gn,p => obechat.s2++obechat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ tu.s ! PF obechat.c No NonPoss ++molodoj.s!AF Inst tu.anim (pgNum tu.g tu.n) ;
asp = obechat.asp ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n =>""
} ;
complDitransSentVerb : TransVerb -> NounPhrase -> Sentence ->VerbPhrase = \dat,tu, chtoOnPridet ->
{s = \\clf,gn,p =>
dat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++
dat.s2 ++ tu.s ! PF dat.c No NonPoss ++ chtoOnPridet.s;
asp = dat.asp ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n=> "" } ;
complAdjVerb : Verbum -> AdjPhrase -> VerbPhrase =
\vuglyadet,molodoj ->
{s = \\clf,gn,p => vuglyadet.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ;
asp = vuglyadet.asp ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n => molodoj.s!(AF Inst Animate (gNum g n))
} ;
complDitransVerb : DitransVerb -> NounPhrase -> NounPhrase -> VerbPhrase =
\dat,tu,pivo ->
let
tebepivo = dat.s2 ++
tu.s ! PF dat.c No NonPoss ++ dat.s4 ++ pivo.s ! PF dat.c2 Yes NonPoss
tu.s ! PF dat.c No NonPoss ++ dat.s4 ++ pivo.s ! PF dat.c2 Yes NonPoss
in
{s = \\clf,gn,p => dat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ tebepivo ;
asp = dat.asp ;
asp = dat.asp ;
s2 = table{True => ""; False => "не"};
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n=> ""
} ;
complQuestVerb: Verbum -> Question -> VerbPhrase =
\dat, esliOnPridet ->
{s = \\clf,gn,p => dat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ esliOnPridet.s ! DirQ ;
asp = dat.asp ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n=> ""
} ;
complDitransQuestVerb : TransVerb -> NounPhrase -> Question -> VerbPhrase =
\dat,tu, esliOnPridet ->
let
tebeEsliOnPridet = dat.s2 ++
tu.s ! PF dat.c No NonPoss ++ esliOnPridet.s ! DirQ
in
{s = \\clf,gn,p => dat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ tebeEsliOnPridet ;
asp = dat.asp ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n=> ""
} ;
complDitransVerbVerb : TransVerb -> NounPhrase -> VerbPhrase -> VerbPhrase =
\obechat,tu,ukhodit ->
{s = \\clf,gn,p => obechat.s2++obechat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ tu.s ! PF obechat.c No NonPoss ++ukhodit.s!ClInfinit!gn!p ;
asp = ukhodit.asp ;
w = ukhodit.w;
negBefore = ukhodit.negBefore;
s2 = ukhodit.s2;
s3 = ukhodit.s3
} ;
complDitransVerbVerb_2 : TransVerb -> NounPhrase -> VerbPhrase -> VerbPhrase =
\obechat,tu,ukhodit ->
{s = \\clf,gn,p => obechat.s2++obechat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ tu.s ! PF obechat.c No NonPoss ++ukhodit.s!ClInfinit!(pgNum tu.g tu.n)!tu.p ;
asp = ukhodit.asp ;
w = ukhodit.w;
negBefore = ukhodit.negBefore;
s2 = ukhodit.s2;
s3 = ukhodit.s3
} ;
--2 Adverbials
--
adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \poet, khorosho ->
--
adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \poet, khorosho ->
{s = \\clf,gn,p => poet.s ! clf!gn!p; s2 = poet.s2 ++ khorosho.s; s3 = poet.s3;
a = poet.a; w = poet.w; t = poet.t ; negBefore = poet.negBefore } ;
adVerbPhraseInf : VerbPhraseInf -> Adverb -> VerbPhraseInf = \poet, khorosho ->
{s = khorosho.s ++ poet.s ; s2 = poet.s2; s3 = poet.s3;
asp = poet.asp; w = poet.w; t = poet.t ; negBefore = poet.negBefore } ;
adVerbPhraseInf : VerbPhrase -> Adverb -> VerbPhrase = \pet, khorosho ->
{s = pet.s ; s2 = pet.s2; s3 =\\g,n => khorosho.s ++ pet.s3!g!n;
asp = pet.asp; w = pet.w; negBefore = pet.negBefore } ;
-- Adverbials are typically generated by prefixing prepositions.
@@ -602,6 +701,19 @@ let {n = ivan.n ; nf = if_then_else Number coll Sg n} in
-- is a little shaky: "в России" but "на острове".
-- Adverbials are typically generated by prefixing prepositions.
-- The rule for creating locative noun phrases by the preposition "in"
-- is a little shaky, since other prepositions may be preferred ("on", "at").
Adverb2 = Adverb**Complement ;
complA2S : Adverb2 -> NounPhrase -> Adverb =
\khoroshoDlya, ivan ->
{ s= khoroshoDlya.s ++ khoroshoDlya.s2 ++
ivan.s ! PF khoroshoDlya.c Yes NonPoss};
useA2S : Adverb2 -> Adverb = \khoroshoDlya ->
{ s= khoroshoDlya.s };
useA2V : AdjCompl -> Adjective = \khoroshijDlya->
{s = khoroshijDlya.s } ;
prepPhrase : Preposition -> NounPhrase -> Adverb = \na, stol ->
@@ -622,13 +734,22 @@ let {n = ivan.n ; nf = if_then_else Number coll Sg n} in
{s = \\n,c => chelovek.s ! n ! c ++ uTelevizora.s ;
g = chelovek.g ;
anim = chelovek.anim
} ;
advNP : NounPhrase -> Adverb -> NounPhrase =
\dom, vMoskve ->
{s = \\pf => dom.s!pf ++ vMoskve.s ;
n = dom.n ;
p = dom.p;
g = dom.g;
anim = dom.anim;
pron = dom.pron
} ;
advAdjPhrase : SS -> AdjPhrase -> AdjPhrase = \ochen, khorosho ->
{s = \\a => ochen.s ++ khorosho.s ! a ;
p = khorosho.p
} ;
--2 Sentences
@@ -644,40 +765,60 @@ oper
predVerbPhrase : NounPhrase -> VerbPhrase -> SlashNounPhrase =
\Ya, tebyaNeVizhu -> { s = \\b,clf =>
let
{ ya = Ya.s ! (mkPronForm Nom No NonPoss);
let
{ ya = Ya.s ! (mkPronForm Nom No NonPoss);
khorosho = tebyaNeVizhu.s2;
vizhu = tebyaNeVizhu.s ! clf !(gNum (pgen2gen Ya.g) Ya.n)! Ya.p;
tebya = tebyaNeVizhu.s3 ! (pgen2gen Ya.g) ! Ya.n
}
in
if_then_else Str tebyaNeVizhu.negBefore
(ya ++ ne ++ vizhu ++ tebya)
}
in
ya ++ khorosho ++ vizhu ++ tebya;
s2= "";
c = Nom
} ;
} ;
param
Anteriority = Simul | Anter ;
-- for compatibility with Rules.gf:
ClTense = ClPresent | ClPast | ClFuture | ClConditional;
-- for compatibility with Rules.gf:
ClTense = ClPresent | ClPast | ClFuture | ClConditional;
oper
TensePolarity = {s : Str ; b : Bool ; t : ClTense ; a : Anteriority} ;
getRusTense : ClTense -> RusTense = \clt ->
case clt of
{
ClPresent => Present;
ClFuture => Future;
_ => Past
};
getActVerbForm : ClForm -> Gender -> Number -> Person -> VerbForm = \clf,g,n, p -> case clf of
{ ClIndic Future _ => VFORM Act (VIND (gNum g n) (VFuture p));
ClIndic Past _ => VFORM Act (VIND (gNum g n) VPast);
ClIndic Present _ => VFORM Act (VIND (gNum g n) (VPresent p));
ClCondit => VFORM Act (VSUB (gNum g n));
ClInfinit => VFORM Act VINF ;
ClImper => VFORM Act (VIMP n p)
};
oper
Clause = {s : Bool => ClForm => Str} ;
predV0 : Verbum -> Clause = \v ->
{s= \\ b, clf => v.s! (VFORM Act (VIND (ASg Masc) (VPresent P3))) };
predAS : Adverb -> Sentence -> Clause=\vazhno, onPrishel ->
{s= \\ b, clf => vazhno.s ++ [", что"] ++ onPrishel.s };
useCl: TensePolarity ->Clause ->Sentence = \tp, cl ->
{s = cl.s!tp.b! ClIndic (getRusTense tp.t) tp.a};
predVerbGroupClause : NounPhrase -> VerbPhrase -> Clause =
predVerbGroupClause : NounPhrase -> VerbGroup -> Clause =
\Ya, tebyaNeVizhu -> { s = \\b,clf =>
let {
let {
ya = Ya.s ! (case clf of {
ClInfinit => (mkPronForm Acc No NonPoss);
ClInfinit => (mkPronForm Acc No NonPoss);
_ =>(mkPronForm Nom No NonPoss)
});
ne = tebyaNeVizhu.s2 ! b;
vizhu = tebyaNeVizhu.s ! (case c of {
ClInfinit => VFORM tebyaNeVizhu.w (VIMP Ya.n Ya.p);
_ => (mkPronForm Nom No NonPoss)
});
ne = case b of {True=>""; False=>"не"};
vizhu = tebyaNeVizhu.s ! clf ! (pgNum Ya.g Ya.n)! Ya.p;
@@ -686,11 +827,12 @@ oper
in
if_then_else Str tebyaNeVizhu.negBefore
(ya ++ ne ++ vizhu ++ tebya)
(ya ++ vizhu ++ ne ++ tebya)
} ;
{-
-- This is a macro for simultaneous predication and complementation.
predTransVerb : Bool -> TransVerb -> NounPhrase -> NounPhrase -> Sentence =
\b,vizhu,ya,tu -> {s= (predVerbPhrase ya (predVerbGroup b Present (complTransVerb vizhu tu))).s!True!ClIndic Present Simul};
-}
@@ -699,14 +841,15 @@ oper
-- Sentence-complement verbs take sentences as complements.
SentenceVerb : Type = Verbum ;
-- To generate "сказал, что Иван гуляет" / "не сказал, что Иван гуляет":
complSentVerb : SentenceVerb -> Sentence -> VerbPhrase =
\vidit,tuUlubaeshsya ->
{s = \\clf,gn,p => vidit.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p)
{s = \\vf => vidit.s ! vf ++ [", что"] ++ tuUlubaeshsya.s ;
++ [", что"] ++ tuUlubaeshsya.s ;
asp = vidit.asp;
w = Act;
w = Act;
s2="";
negBefore = True;
s3 = \\g,n => ""
@@ -725,15 +868,18 @@ oper
VerbVerb : Type = Verbum ;
-- To generate "can walk"/"can't walk"; "tries to walk"/"does not try to walk":
-- The contraction of "not" is not provided, since it would require changing
-- To generate "can walk"/"can't walk"; "tries to walk"/"does not try to walk":
-- The contraction of "not" is not provided, since it would require changing
-- the verb parameter type.
complVerbVerb : VerbVerb -> VerbGroup -> VerbGroup = \putatsya,bezhat ->
complVerbVerb : VerbVerb -> VerbPhrase -> VerbPhrase = \putatsya,bezhat ->
asp = putatsya.asp ;
{ s = \\clf,gn,p => putatsya.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ bezhat.s!clf!gn!p ;
asp = putatsya.asp ;
w = Act;
negBefore = True;
s2 = "";
s3 =\\g,n => ""
} ;
predVerbGroupI: VerbPhrase -> VerbPhraseClause = \v ->
{s=\\b,ant,clf,gn,p => case b of {True => v.s!clf!gn!p; False=> "не"++v.s!clf!gn!p }; a=v.asp; w=v.w; s2=v.s2; s3=v.s3; negBefore=v.negBefore};
@@ -745,24 +891,35 @@ oper
-- We cannot have - nor would we want to have - a productive slash-category former.
-- Perhaps a handful more will be needed.
--
-- Notice that the slash category has the same relation to sentences as
-- Notice that the slash category has the same relation to sentences as
-- transitive verbs have to verbs: it's like a *sentence taking a complement*.
SlashNounPhrase = Clause ** Complement ;
slashTransVerb : Bool -> NounPhrase -> TransVerb -> SlashNounPhrase =
{-
slashTransVerb : Bool -> NounPhrase -> TransVerb -> SlashNounPhrase =
predVerbPhrase ivan (predVerbGroup b Present ((verbOfTransVerb lubit)**
\b,ivan,lubit ->
predVerbPhrase ivan (predVerbGroup b Present ((verbOfTransVerb lubit)**
w = Act;
{ w = Act;
negBefore = True;
s3 = table{_=> table{_ => ""}} })) **
s2 = table{_=> table{_ => ""}} })) **
complementOfTransVerb lubit ;
thereIs : NounPhrase -> Sentence = \bar ->
-}
thereIs : NounPhrase -> Sentence = \bar ->
{s = "есть" ++ bar.s ! PF Nom No NonPoss} ;
existCN : CommNounPhrase -> Clause = \bar ->
{s =\\b,clf => case b of
{True => verbByut.s ! (getActVerbForm clf bar.g Sg P3)
++ bar.s ! Sg ! Nom ;
--existCN : CommNoun -> Clause = \ bar ->
False => "не" ++ verbByut.s ! (getActVerbForm clf bar.g Sg P3)
++ bar.s ! Sg ! Nom
}
} ;
existNumCN: Numeral -> CommNounPhrase -> Clause=\tri, bar ->
{s =\\b,clf => case b of
{True => verbByut.s ! (getActVerbForm clf bar.g Sg P3)
++ tri.s!Nom!bar.g ++bar.s ! Pl ! Nom ;
False => "не" ++ verbByut.s ! (getActVerbForm clf bar.g Sg P3)
++ tri.s !Nom!bar.g ++bar.s ! Pl ! Nom
@@ -790,6 +947,9 @@ oper
--2 Relative pronouns and relative clauses
--
oper
identRelPron : RelPron = { s = \\gn, c, anim =>
kotorujDet.s ! (AF c anim gn )} ;
useRCl : TensePolarity -> RelClause -> RelPron = \tp, rcl ->
@@ -804,7 +964,7 @@ oper
-- Relative clauses can be formed from both verb phrases ("видит Машу") and
-- slash expressions ("я вижу").
RelClause : Type = {s : Bool => ClForm => GenNum => Case => Animacy => Str} ;
relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \kotoruj, gulyaet ->
@@ -830,7 +990,7 @@ relCl : Clause -> RelClause =\ A ->
-- The main use of relative clauses is to modify common nouns.
-- The result is a common noun, out of which noun phrases can be formed
-- by determiners. A comma is used before the relative clause.
modRelClause : CommNounPhrase -> RelClause -> CommNounPhrase =
\chelovek,kotorujSmeetsya ->
@@ -867,16 +1027,14 @@ relCl : Clause -> RelClause =\ A ->
nounIntPron : Number -> CommNounPhrase -> IntPron = \n, x ->
detNounPhrase (kakojDet ** {n = n ; g = PNoGen; c = Nom}) x ;
{ s = table {
intPronKto : Number -> IntPron = \num ->
{ s = table {
PF Gen _ _ => "кого" ;
PF Nom _ _ => "кто" ;
PF Gen _ _ => "кого" ;
PF Dat _ _ => "кому" ;
PF Acc _ _ => "кого" ;
PF Inst _ _ => "кем" ;
PF Prepos _ _ => ["о ком"]
g = PGen Masc ;
anim = Animate ;
} ;
g = PGen Masc ;
@@ -886,8 +1044,8 @@ relCl : Clause -> RelClause =\ A ->
n = num ;
p = P3 ;
pron = False
PF Nom _ _ => "что" ;
PF Gen _ _ => "чего" ;
} ;
intPronChto : Number -> IntPron = \num ->
{ s = table {
PF Nom _ _ => "что" ;
@@ -915,8 +1073,8 @@ relCl : Clause -> RelClause =\ A ->
-- and one-word utterances. The rules are far from complete.
--
-- N.B. we have not included rules for texts, which we find we cannot say much
indicUtt : Sentence -> Utterance = \x -> postfixSS "." (defaultSentence x) ;
-- about on this level. In semantically rich GF grammars, texts, dialogues, etc,
-- will of course play an important role as categories not reducible to utterances.
-- An example is proof texts, whose semantics show a dependence between premises
-- and conclusions. Another example is intersentential anaphora.
@@ -931,6 +1089,9 @@ oper
phrVPI: VerbPhrase -> Utterance = \v ->
{s = v.s2++v.s!ClInfinit!APl!P3 ++ v.s3!Masc!Sg} ;
--2 Questions
--
-- Questions are either direct ("Ты счастлив?")
-- or indirect ("Потом он спросил счастлив ли ты").
param
@@ -943,33 +1104,50 @@ oper
useQCl : TensePolarity -> QuestionCl -> Question = \tp, qcl ->
{s = qcl.s!tp.b! ClIndic (getRusTense tp.t) tp.a };
-- Note: The particle "ли" can also be used in direct questions:
-- Видел ли ты что-нибудь подобное?
--3 Yes-no questions
--
-- Yes-no questions are used both independently ("Ты взял мяч?")
-- and after interrogative adverbials ("Почему ты взял мяч?").
-- Note: The particle "ли" can also be used in direct questions:
-- Видел ли ты что-нибудь подобное?
-- but we are not considering this case.
questVerbPhrase : NounPhrase -> VerbPhrase -> Question =
\tu,spish ->
let { vu = tu.s ! (mkPronForm Nom No NonPoss);
spish = spish.s2 ++
spish.s ! (ClIndic Present Simul) !(gNum (pgen2gen tu.g) tu.n)! tu.p ++ spish.s3 ! (pgen2gen tu.g) ! tu.n } in
}
{ s = table {
DirQ => vu ++ spish ;
IndirQ => spish ++ "ли" ++ vu
}
} ;
(predVerbGroup True Present (predNounPhrase bar)) ;
--3 Wh-questions
questCl : Clause -> QuestionCl = \cl-> {s = \\b,cf,_ => cl.s ! b ! cf } ;
{-
isThere : NounPhrase -> Question = \bar ->
questVerbPhrase
({s = \\_ => ["есть ли"] ; n = bar.n ; p = P3; g = bar.g; anim = bar.anim; pron = bar.pron})
(predVerbGroup True Present (predNounPhrase bar)) ;
-}
--3 Wh-questions
--
-- Wh-questions are of two kinds: ones that are like $NP - VP$ sentences,
-- others that are like $S/NP - NP$ sentences.
intVerbPhrase : IntPron -> VerbPhrase -> QuestionCl = \kto,spit ->
{s = \\b,clf,qf => (predVerbPhrase kto spit).s!b!clf } ;
intSlash : IntPron -> SlashNounPhrase -> QuestionCl = \Kto, yaGovoruO ->
let { kom = Kto.s ! (mkPronForm yaGovoruO.c No NonPoss) ; o = yaGovoruO.s2 } in
{s = \\b,clf,_ => o ++ kom ++ yaGovoruO.s ! b ! clf
} ;
slashAdv : Clause -> Preposition -> SlashNounPhrase=
\cl,p -> {s=cl.s; s2=p.s2; c=p.c} ;
slashV2 : NounPhrase -> TransVerb -> SlashNounPhrase = \ivan, lubit->
{ s=\\b,clf => ivan.s ! PF Nom No NonPoss ++ lubit.s! (getActVerbForm clf (pgen2gen ivan.g) ivan.n ivan.p) ; s2=lubit.s2; c=lubit.c };
@@ -986,8 +1164,7 @@ isThere : NounPhrase -> Question = \bar ->
--3 Interrogative adverbials
--
-- These adverbials will be defined in the lexicon: they include
IntAdverb = SS ;
-- "когда", "где", "как", "почему", etc, which are all invariant one-word
-- expressions. In addition, they can be formed by adding prepositions
-- to interrogative pronouns, in the same way as adverbials are formed
-- from noun phrases. N.B. we rely on record subtyping when ignoring the
@@ -1001,10 +1178,20 @@ isThere : NounPhrase -> Question = \bar ->
questAdverbial_1 : IntAdverb -> NounPhrase -> VerbPhrase -> Question =
\kak, tu, pozhivaesh ->
{s = \\q => kak.s ++ tu.s ! (mkPronForm Nom No NonPoss) ++ pozhivaesh.s2 ++pozhivaesh.s ! (ClIndic Present Simul )!(gNum (pgen2gen tu.g) tu.n) ! tu.p ++
--2 Imperatives
pozhivaesh.s3 ! (pgen2gen tu.g) ! tu.n } ;
questAdverbial : IntAdverb -> Clause -> QuestionCl =
\kak, tuPozhivaesh ->
{s = \\b,clf,q => kak.s ++ tuPozhivaesh.s!b!clf } ;
--2 Imperatives
--
-- We only consider second-person imperatives.
Imperative: Type = { s: Gender => Number => Str } ;
imperVerbPhrase : VerbPhrase -> Imperative = \budGotov ->
{s = \\g, n => budGotov.s ! ClImper ! (gNum g n) ! P2 ++ budGotov.s2++budGotov.s3 ! g ! n} ;
-- infinitive verbPhrase,
-- however in Russian Infinitive and Imperative is totally different
@@ -1211,85 +1398,125 @@ isThere : NounPhrase -> Question = \bar ->
useNounPhrase (indefNounPhrase n mashina) ;
useRegularName : Gender -> SS -> NounPhrase = \g, masha ->
ss (masha.s ! PF Nom No NonPoss) ;
defaultQuestion : Question -> SS = \ktoTu ->
ss (ktoTu.s ! DirQ) ;
defaultSentence : Sentence -> Utterance = \x ->
x ;
predNounPhrase : NounPhrase -> VerbGroup = \masha -> { s= table {
VFORM _ (VSUB _) => "" ;
VFORM _ (VIMP Sg _) => "будь" ++ masha.s ! (mkPronForm Inst No NonPoss);
VFORM _ (VIMP Pl _) => "будьте" ++ masha.s ! (mkPronForm Inst No NonPoss) ;
VFORM _ VINF => "быть" ++ masha.s ! (mkPronForm Inst No NonPoss);
VFORM _ (VIND _ (VPresent _)) => masha.s ! (mkPronForm Nom No NonPoss) ;
VFORM _ (VIND (ASg Fem) VPast) =>"была"++masha.s ! (mkPronForm Inst No NonPoss);
VFORM _ (VIND (ASg Masc) VPast) =>"был" ++ masha.s!(mkPronForm Inst No NonPoss);
VFORM _ (VIND (ASg Neut) VPast) =>"было" ++ masha.s!(mkPronForm Inst No NonPoss);
nameNounPhrase (case g of { Masc => mkProperNameMasc masha.s Animate;
_ => mkProperNameFem masha.s Animate }) ;
-- Here are some default forms.
defaultNounPhrase : NounPhrase -> SS = \masha ->
ss (masha.s ! PF Nom No NonPoss) ;
defaultQuestion : Question -> SS = \ktoTu ->
ss (ktoTu.s ! DirQ) ;
defaultSentence : Sentence -> Utterance = \x ->
x ;
predNounPhrase : NounPhrase -> VerbPhrase = \masha ->
{ s=\\clf,gn,p => case clf of
{
(ClIndic Present _) => masha.s ! (mkPronForm Nom No NonPoss) ;
(ClIndic Past _) => case gn of
{ (ASg Fem) =>"была"++masha.s ! (mkPronForm Inst No NonPoss);
(ASg Masc) =>"был" ++ masha.s!(mkPronForm Inst No NonPoss);
(ASg Neut) =>"было" ++ masha.s!(mkPronForm Inst No NonPoss);
APl => "были" ++ masha.s ! (mkPronForm Inst No NonPoss)
};
(ClIndic Future _) => case gn of
{ APl => case p of
{ P3 => "будут"++masha.s ! (mkPronForm Inst No NonPoss);
P2 => "будете"++masha.s !(mkPronForm Inst No NonPoss);
P1 => "будем"++masha.s ! (mkPronForm Inst No NonPoss)
};
(ASg _) => case p of
VFORM _ (VIND APl (VFuture P2)) => "будете"++masha.s !(mkPronForm Inst No NonPoss);
{ P3=>"будет"++masha.s!(mkPronForm Inst No NonPoss) ;
VFORM _ (VIND (ASg _) (VFuture P3))=>"будет"++masha.s!(mkPronForm Inst No NonPoss) ;
VFORM _ (VIND (ASg _) (VFuture P2)) => "будешь"++ masha.s ! (mkPronForm Inst No NonPoss) ;
P2 => "будешь"++ masha.s ! (mkPronForm Inst No NonPoss) ;
P1=> "буду"++ masha.s ! (mkPronForm Inst No NonPoss)
} --case p
}; --case gn
asp = Imperfective ;
w = Act;
s2 = table{True => ""; False => "не"};
negBefore = True;
s3 = table{_=> table{_ => ""}}
} ;
predCommNoun : CommNounPhrase -> VerbGroup = \chelovek ->
{ s= table {
VFORM _ (VIMP Sg _) => "будь" ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss);
VFORM _ (VIMP Pl _) => "будьте" ++ (indefNounPhrase Pl chelovek ).s ! (mkPronForm Inst No NonPoss) ;
-- person is ignored !
VFORM _ VINF => "быть" ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss) ;
VFORM _ (VIND gn (VPresent _)) => (indefNounPhrase (numGNum gn) chelovek ).s ! (mkPronForm Nom No NonPoss);
VFORM _ (VIND (ASg Fem) VPast) => "была" ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss);
VFORM _ (VIND (ASg Masc) VPast) => "был" ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss);
VFORM _ (VIND (ASg Neut) VPast) => "было" ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss);
VFORM _ (VIND APl VPast) => "были" ++ (indefNounPhrase Pl chelovek ).s ! (mkPronForm Inst No NonPoss);
ClCondit => "" ;
ClImper => case (numGNum gn) of
{Sg => "будь" ++ masha.s ! (mkPronForm Inst No NonPoss);
Pl => "будьте" ++ masha.s ! (mkPronForm Inst No NonPoss)
};
ClInfin => "быть" ++ masha.s ! (mkPronForm Inst No NonPoss)
}; -- case clf
asp = Imperfective ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n => ""
} ;
predCommNoun : CommNounPhrase -> VerbPhrase = \chelovek ->
{ s=\\clf,gn,p =>
case clf of
{
ClInfinit =>"быть" ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss) ;
ClCondit => case gn of
{
(ASg _) => ["был бы"] ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss);
APl => ["были бы"] ++ (indefNounPhrase Pl chelovek ).s ! (mkPronForm Inst No NonPoss)
} ;
ClImper => case gn of
{
(ASg _) => "будь" ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss);
APl => "будьте" ++ (indefNounPhrase Pl chelovek ).s ! (mkPronForm Inst No NonPoss)
};
ClIndic Present _ => (indefNounPhrase (numGNum gn) chelovek ).s ! (mkPronForm Nom No NonPoss);
ClIndic Past _ => case gn of
{
(ASg Masc) => "был" ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss);
(ASg Fem) => "была" ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss);
(ASg Neut) => "было" ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss);
APl => "были" ++ (indefNounPhrase Pl chelovek ).s ! (mkPronForm Inst No NonPoss)
};
ClIndic Future _ => case gn of
{
(ASg _) => case p of
{
VFORM _ (VIND APl (VFuture P1)) => "будем" ++ (indefNounPhrase Pl chelovek ).s ! (mkPronForm Inst No NonPoss);
P3 => "будет" ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss);
VFORM _ (VIND (ASg g) (VFuture P2)) => "будешь"++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss);
VFORM _ (VIND (ASg g) (VFuture P1))=> "буду" ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss);
P2 => "будешь"++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss);
P1 => "буду" ++ (indefNounPhrase Sg chelovek ).s ! (mkPronForm Inst No NonPoss)
} ;
APl => case p of
asp = Imperfective ;
w = Act;
s2 = table{True => ""; False => "не"};
negBefore = True;
{
P3 => "будут" ++ (indefNounPhrase Pl chelovek ).s ! (mkPronForm Inst No NonPoss);
P2 =>"будете" ++ (indefNounPhrase Pl chelovek ).s ! (mkPronForm Inst No NonPoss);
P1 => "будем" ++ (indefNounPhrase Pl chelovek ).s ! (mkPronForm Inst No NonPoss)
} -- p
} -- gn
} ; -- clf
asp = Imperfective ;
w = Act;
negBefore = True;
predAdjective : AdjPhrase -> VerbGroup = \zloj ->
{ s= table {
VFORM _ (VIMP Sg _) => "будь" ++ zloj.s ! AF Inst Animate (ASg Masc);
VFORM _ (VIMP Pl _) => "будьте" ++ zloj.s ! AF Inst Animate APl ;
-- person is ignored !
VFORM _ VINF => "быть" ++ zloj.s ! AF Inst Animate (ASg Masc) ;
-- infinitive does not save GenNum,
-- but indicative does for the sake of adjectival predication !
VFORM _ (VIND gn (VPresent _)) => zloj.s ! AF Nom Animate gn ;
VFORM _ (VIND (ASg Fem) VPast) => "была" ++ zloj.s! AF Nom Animate (ASg Fem);
VFORM _ (VIND (ASg Masc) VPast) => "был" ++ zloj.s! AF Nom Animate (ASg Masc);
VFORM _ (VIND (ASg Neut) VPast) => "был" ++ zloj.s! AF Nom Animate (ASg Neut);
s2 = "";
s3= \\g,n => ""
} ;
predAdjective : AdjPhrase -> VerbPhrase = \zloj ->{
s= \\clf,gn,p => case clf of {
-- person is ignored !
ClInfinit => "быть" ++ zloj.s ! AF Inst Animate (ASg Masc) ;
ClImper => case gn of
{ (ASg _) => "будь" ++ zloj.s ! AF Inst Animate (ASg Masc);
APl => "будьте" ++ zloj.s ! AF Inst Animate APl
};
-- infinitive does not save GenNum,
-- but indicative does for the sake of adjectival predication !
ClIndic Present _ => zloj.s ! AF Nom Animate gn ;
ClIndic Past _ => case gn of
{ (ASg Fem) => "была" ++ zloj.s! AF Nom Animate (ASg Fem);
(ASg Masc) => "был" ++ zloj.s! AF Nom Animate (ASg Masc);
(ASg Neut) => "был" ++ zloj.s! AF Nom Animate (ASg Neut);
APl => "были" ++ zloj.s! AF Nom Animate APl
};
ClIndic Future _ => case gn of
VFORM _ (VIND APl (VFuture P2)) => "будете" ++ zloj.s! AF Nom Animate APl;
{ APl => case p of
VFORM _ (VIND (ASg g) (VFuture P3)) => "будет" ++ zloj.s! AF Nom Animate (ASg g);
VFORM _ (VIND (ASg g) (VFuture P2)) => "будешь"++ zloj.s! AF Nom Animate (ASg g);
{ P3 => "будут" ++ zloj.s! AF Nom Animate APl;
P2 => "будете" ++ zloj.s! AF Nom Animate APl;
P1 => "будем" ++ zloj.s! AF Nom Animate APl
VFORM _ (VSUB _) => ""
} ;
(ASg _) => case p of

View File

@@ -30,6 +30,10 @@ param
AfterPrep = Yes | No ;
Possessive = NonPoss | Poss GenNum ;
Animacy = Animate | Inanimate ;
Anteriority = Simul | Anter ;
ClForm = ClIndic RusTense Anteriority | ClCondit | ClInfinit | ClImper;
-- "naked infinitive" clauses
-- A number of Russian nouns have common gender. They can
-- denote both males and females: "умница" (a clever person), "инженер" (an engineer).
@@ -144,6 +148,31 @@ param
GenNum = ASg Gender | APl ;
-- Coercions between the compound gen-num type and gender and number:
oper
gNum : Gender -> Number -> GenNum = \g,n ->
case n of
{ Sg => case g of
{ Fem => ASg Fem ;
Masc => ASg Masc ;
Neut => ASg Neut } ;
Pl => APl
} ;
pgNum : PronGen -> Number -> GenNum = \g,n ->
case n of
{ Sg => case g of
{ PGen Fem => ASg Fem ;
PGen Masc => ASg Masc ;
PGen Neut => ASg Neut ;
_ => ASg Masc } ;
Pl => APl
} ;
-- _ => variants {ASg Masc ; ASg Fem} } ;
-- "variants" version cause "no term variants" error during linearization
oper numGNum : GenNum -> Number = \gn ->
case gn of { APl => Pl ; _ => Sg } ;
@@ -190,6 +219,12 @@ oper
Adjective : Type = {s : AdjForm => Str} ;
-- A special type of adjectives just having positive forms
-- (for semantic reasons) is useful, e.g. "русский".
oper
extAdjective : AdjDegr -> Adjective = \adj ->
{ s = \\af => adj.s ! Pos ! af } ;
--3 Verbs
@@ -253,24 +288,25 @@ oper
-- The conjugation parameters left (Gender, Number, Person)
-- are combined in the "VF" type:
param VF =
VFin GenNum Person | VImper Number Person | VInf | VSubj GenNum;
--param VF = VFin GenNum Person | VImper Number Person | VInf | VSubj GenNum;
oper
Verb : Type = {s : VF => Str ; t: RusTense ; a : Aspect ; w: Voice} ;
-- Verb : Type = {s : VF => Str ; t: RusTense ; a : Aspect ; w: Voice} ;
Verb : Type = {s : ClForm => GenNum => Person => Str ; asp : Aspect ; w: Voice} ;
extVerb : Verbum -> Voice -> RusTense -> Verb = \aller, vox, t ->
{ s = table {
VFin gn p => case t of {
Present => aller.s ! VFORM vox (VIND gn (VPresent p)) ;
Past => aller.s ! VFORM vox (VIND gn VPast ) ;
Future => aller.s ! VFORM vox (VIND gn (VFuture p))
} ;
VImper n p => aller.s ! VFORM vox (VIMP n p) ;
VInf => aller.s ! VFORM vox VINF ;
VSubj gn => aller.s ! VFORM vox (VSUB gn)
}; t = t ; a = aller.asp ; w = vox } ;
extVerb : Verbum -> Voice -> Verb = \aller, vox, ->
{ s = \\clf, gn,p => case clf of
{
ClIndic Present _ => aller.s ! VFORM vox (VIND gn (VPresent p)) ;
ClIndic Past _ => aller.s ! VFORM vox (VIND gn VPast ) ;
ClIndic Future _ => aller.s ! VFORM vox (VIND gn (VFuture p)) ;
ClCondit => aller.s ! VFORM vox (VSUB gn);
ClImper => aller.s ! VFORM vox (VIMP (numGNum gn) p) ;
ClInfinit => aller.s ! VFORM vox VINF
} ;
asp = aller.asp ;
w = vox
} ;
--3 Other open classes