russian4
This commit is contained in:
1 parent
05688d59bf
commit
2f0310edb8
11 files changed
+209
-170
No files matched your search
@@ -25,12 +25,12 @@ flags coding=utf8 ;
|
||||
} ;
|
||||
|
||||
ReflA2 vlublen =
|
||||
{s = \\af => vlublen.s !Posit! af ++ vlublen.s2 ++ "себя";
|
||||
{s = \\af => vlublen.s !Posit! af ++ vlublen.s2 ++ sam.s ! vlublen.c;
|
||||
p = True
|
||||
} ;
|
||||
|
||||
SentAP vlublen sent=
|
||||
{s = \\af => vlublen.s ! af ++ sent.s;
|
||||
{s = \\af => vlublen.s ! af ++ [", "] ++ sent.s;
|
||||
p = True
|
||||
} ;
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ concrete IdiomRus of Idiom = CatRus ** open Prelude, ResRus, MorphoRus in {
|
||||
lin
|
||||
ExistNP = \bar ->
|
||||
{s =\\b,clf => case b of
|
||||
{Pos => verbByut.s ! (getActVerbForm clf (pgen2gen bar.g) Sg P3)
|
||||
{Pos => verbSuchestvovat.s ! (getActVerbForm clf (pgen2gen bar.g) Sg P3)
|
||||
++ bar.s ! PF Nom No NonPoss;
|
||||
Neg => "не" ++ verbByut.s ! (getActVerbForm clf (pgen2gen bar.g) Sg P3)
|
||||
Neg => "не" ++ verbSuchestvovat.s ! (getActVerbForm clf (pgen2gen bar.g) Sg P3)
|
||||
++ bar.s ! PF Nom No NonPoss
|
||||
}
|
||||
} ;
|
||||
@@ -17,20 +17,24 @@ concrete IdiomRus of Idiom = CatRus ** open Prelude, ResRus, MorphoRus in {
|
||||
ExistIP Kto =
|
||||
let { kto = Kto.s ! (PF Nom No NonPoss) } in
|
||||
{s = \\b,clf,_ => case b of
|
||||
{Pos => kto ++ verbByut.s ! (getActVerbForm clf (pgen2gen Kto.g) Sg P3) ;
|
||||
Neg => kto ++ "не" ++ verbByut.s ! (getActVerbForm clf (pgen2gen Kto.g) Sg P3)
|
||||
{Pos => kto ++ verbSuchestvovat.s ! (getActVerbForm clf (pgen2gen Kto.g) Sg P3) ;
|
||||
Neg => kto ++ "не" ++ verbSuchestvovat.s ! (getActVerbForm clf (pgen2gen Kto.g) Sg P3)
|
||||
}
|
||||
} ;
|
||||
|
||||
CleftAdv adv sen = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
|
||||
in
|
||||
"это" ++ ne ++ adv.s ++ sen.s };
|
||||
"это" ++ ne ++ adv.s ++ [", "]++ sen.s };
|
||||
|
||||
CleftNP np rs = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
|
||||
CleftNP np rs = {s= \\ b, clf =>
|
||||
let
|
||||
ne= case b of {Pos =>[]; Neg =>"не"};
|
||||
gn = case np.n of {Pl => APl; _=> ASg (pgen2gen np.g)}
|
||||
in
|
||||
"это" ++ ne ++ np.s ! (PF Nom No NonPoss) ++ rs.s ! ASg Masc!Nom!Animate };
|
||||
"это" ++ ne ++ np.s ! (PF Nom No NonPoss) ++
|
||||
rs.s ! gn !Nom!Animate };
|
||||
|
||||
ImpPl1 vp = {s= "давайте" ++ vp.s! (ClIndic Future Simul)! APl ! P2 };
|
||||
ImpPl1 vp = {s= "давайте" ++ vp.s! (ClIndic Future Simul)! APl ! P1};
|
||||
|
||||
ImpersCl vp = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
|
||||
in
|
||||
@@ -44,9 +48,9 @@ concrete IdiomRus of Idiom = CatRus ** open Prelude, ResRus, MorphoRus in {
|
||||
-- The closest subject is "ты" (you), which is omitted in the final sentence:
|
||||
-- "Если очень захочешь, можешь в космос улететь"
|
||||
|
||||
GenericCl vp = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>""}
|
||||
GenericCl vp = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
|
||||
in
|
||||
ne ++ vp.s! clf! (ASg Masc) ! P3 };
|
||||
"ты" ++ ne ++ vp.s! clf! (ASg Masc) ! P2 };
|
||||
|
||||
ProgrVP vp = vp ;
|
||||
|
||||
|
||||
@@ -20,21 +20,21 @@ lin
|
||||
beautiful_A = AStaruyj "красив" "красивее";
|
||||
become_VA = regV perfective second "станов" "лю" "стал" "стань" "стать" ;
|
||||
beer_N = nChislo "пив" ;
|
||||
beg_V2V = dirV2 (regV imperfective second "про" "шу" "просил" "проси" "просить" );
|
||||
beg_V2V = dirV2 (mkVerbum imperfective "прошу" "просишь" "просит" "просим" "просите" "просят" "просил" "проси" "просить" );
|
||||
big_A = AKakoj_Nibud "больш" "" "больше" ;
|
||||
bike_N = nTelefon "велосипед" ;
|
||||
bird_N = nEdinica "птиц" ;
|
||||
black_A = AStaruyj "чёрн" "чернее";
|
||||
blue_A = AMolodoj "голуб" "голубее";
|
||||
boat_N = nMashina "лодк" ;
|
||||
book_N = nMashina "книг" ;
|
||||
book_N = nNoga "книг" ;
|
||||
boot_N = nBank "сапог" ;
|
||||
boss_N = nStomatolog "начальник" ;
|
||||
boy_N = nStomatolog "мальчик" ;
|
||||
bread_N = nAdres "хлеб" ;
|
||||
break_V2 = dirV2 (regV imperfective first "прерыва" "ю" "прерывал" "прерывай" "прерывать" );
|
||||
␍ broad_A = AMalenkij "широк" "шире";
|
||||
brother_N2 = mkN2 (nBrat ",брат") ;
|
||||
brother_N2 = mkN2 (nBrat "брат") ;
|
||||
brown_A = AStaruyj "коричнев" "коричневее";
|
||||
butter_N = nChislo "масл";
|
||||
buy_V2 = dirV2 (regV imperfective first "покупа" "ю" "покупал" "покупай" "покупать" );
|
||||
@@ -59,7 +59,7 @@ child_N = mkN "ребёнок" "ребёнка" "ребёнку" "ребёнка
|
||||
country_N = nMashina "стран" ;
|
||||
cousin_N = nTelefon "кузен" ;
|
||||
cow_N = nMashina "коров" ;
|
||||
die_V = regV imperfective first "умира" "ю" "умирал" "умрай" "умирать" ;
|
||||
die_V = regV imperfective first "умира" "ю" "умирал" "умирай" "умирать" ;
|
||||
dirty_A = AStaruyj "грязн" "грязнее" ;
|
||||
doctor_N = nAdres "доктор" ;
|
||||
dog_N = nNoga "собак" ;
|
||||
@@ -70,7 +70,7 @@ enemy_N = nStomatolog "враг" ;
|
||||
factory_N = nNoga "фабрик" ;
|
||||
father_N2 = mkN2 (mkN "отец" "отца" "отцу" "отца" "отцом" "отце" "отцы" "отцов" "отцам" "отцов" "отцами" "отцах" masculine animate);
|
||||
fear_VS= regV imperfective second "бо" "ю" "боял" "бой" "боять" ;
|
||||
find_V2 = dirV2 (regV imperfective second "нахо" "жу" "находил" "находи" "находить" );
|
||||
find_V2 = dirV2 (mkVerbum imperfective "нахожу" "находишь" "находит" "находим" "находите" "находят" "находил" "находи" "находить" );
|
||||
fish_N = nMashina "рыб" ;
|
||||
floor_N = nTelefon "пол" ;
|
||||
forget_V2= dirV2 (regV imperfective first "забыва" "ю" "забывал" "забывай" "забывать" );
|
||||
@@ -129,7 +129,7 @@ peace_N = nTelefon "мир" ;
|
||||
pen_N = nNoga "ручк" ;
|
||||
planet_N = nMashina "планет" ;
|
||||
plastic_N = nMashina "пластмасс" ;
|
||||
play_V2 = dirV2 (regV imperfective first "игра" "ю" "играл" "играй" "играть" );
|
||||
play_V2 = mkV2 (regV imperfective first "игра" "ю" "играл" "играй" "играть" ) "c" instructive;
|
||||
policeman_N = nTelefon "милиционер" ;
|
||||
priest_N = nStomatolog "священник" ;
|
||||
queen_N = nMashina "королев" ;
|
||||
@@ -145,7 +145,7 @@ rubber_N = nMashina "резин" ;
|
||||
run_V = regV imperfective first "бега" "ю" "бегал" "бегай" "бегать" ;
|
||||
say_VS = regV imperfective second "говор" "ю" "говорил" "говори" "говорить" ;
|
||||
school_N = nMashina "школ" ;
|
||||
science_N = nEdinica "наук" ;
|
||||
science_N = nNoga "наук" ;
|
||||
sea_N = nProizvedenie "мор" ;
|
||||
seek_V2 = dirV2 (regV imperfective first "ищ" "у" "искал" "ищи" "искать" );
|
||||
see_V2 = dirV2 (regV imperfective second "виж" "у" "видел" "видь" "видеть" );
|
||||
@@ -213,7 +213,7 @@ young_A = AMolodoj "молод" "моложе";
|
||||
stop_V = regV imperfective first "останавлива" "ю" "останавливал" "останавливай" "останавливать";
|
||||
jump_V = regV imperfective first "прыга" "ю" "прыгал" "прыгай" "прыгать" ;
|
||||
|
||||
distance_N3 = mkN3 (nProizvedenie "расстоян") from_Prep to_Prep ;
|
||||
distance_N3 = mkN3 (nProizvedenie "расстояни") from_Prep to_Prep ;
|
||||
|
||||
-- in Russian combinations with verbs are expressed with adverbs:
|
||||
-- "легко понять" ("easy to understand"), which is different from
|
||||
@@ -221,12 +221,12 @@ distance_N3 = mkN3 (nProizvedenie "расстоян") from_Prep to_Prep ;
|
||||
-- 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 ;
|
||||
easy_A2V = mkA2 (AMalenkij "лёгк" "легче") "для" genitive ;
|
||||
|
||||
empty_A = AMolodoj "пуст" "пустее";
|
||||
married_A2 = mkA2 (adjInvar "замужем") "за" instructive ;
|
||||
paint_V2A = dirV2 (regV imperfective first "рису" "ю" "рисовал" "рисуй" "рисовать" ) ;
|
||||
probable_AS = AStaruyj "возможный" "возможнее";
|
||||
probable_AS = AStaruyj "возможн" "возможнее";
|
||||
rain_V0 = idetDozhd verbIdti; -- No such verb in Russian!
|
||||
talk_V3 = mkV3 (regV imperfective second "говор" "ю" "говорил" "говори" "говорить" ) "с" "о" instructive prepositional;
|
||||
wonder_VQ = regV imperfective first "интересу" "ю" "интересовал" "интересуй" "интересовать";
|
||||
|
||||
@@ -1196,8 +1196,8 @@ oper odinDet: Adjective = {s = table {
|
||||
AF Prepos _ (ASg Masc) => "одном";
|
||||
AF Prepos _ (ASg Fem) => "одной";
|
||||
AF Prepos _ (ASg Neut) => "одном";
|
||||
AF Prepos _ APl => "дних";
|
||||
AdvF => "одно"
|
||||
AF Prepos _ APl => "одних";
|
||||
AdvF => "одно"
|
||||
}
|
||||
} ;
|
||||
oper etotDet: Adjective = {s = table {
|
||||
@@ -1227,7 +1227,7 @@ oper etotDet: Adjective = {s = table {
|
||||
AF Prepos _ (ASg Fem) => "этой";
|
||||
AF Prepos _ (ASg Neut) => "этом";
|
||||
AF Prepos _ APl => "этих";
|
||||
AdvF => "это"
|
||||
AdvF => "это"
|
||||
}
|
||||
} ;
|
||||
oper vesDet: Adjective = {s = table {
|
||||
@@ -1257,37 +1257,37 @@ oper vesDet: Adjective = {s = table {
|
||||
AF Prepos _ (ASg Fem) => "всей";
|
||||
AF Prepos _ (ASg Neut) => "всём";
|
||||
AF Prepos _ APl => "всех" ;
|
||||
AdvF => "полностью"
|
||||
AdvF => "полностью"
|
||||
}
|
||||
} ;
|
||||
oper uy_j_EndDecl : Str -> Adjective = \s ->{s = table {
|
||||
AF Nom _ (ASg Masc) => Prelude.glue s "ый";
|
||||
AF Nom _ (ASg Fem) => Prelude.glue s "ая";
|
||||
AF Nom _ (ASg Neut) => Prelude.glue s "ое";
|
||||
AF Nom _ APl => Prelude.glue s "ые";
|
||||
AF Acc Inanimate (ASg Masc) => Prelude.glue s "ый";
|
||||
AF Acc Animate (ASg Masc) => Prelude.glue s "ого";
|
||||
AF Acc _ (ASg Fem) => Prelude.glue s "ую";
|
||||
AF Acc _ (ASg Neut) => Prelude.glue s "ое";
|
||||
AF Acc Inanimate APl => Prelude.glue s "ые";
|
||||
AF Acc Animate APl => Prelude.glue s "ых";
|
||||
AF Gen _ (ASg Masc) => Prelude.glue s "ого";
|
||||
AF Gen _ (ASg Fem) => Prelude.glue s "ой";
|
||||
AF Gen _ (ASg Neut) => Prelude.glue s "ого";
|
||||
AF Gen _ APl => Prelude.glue s "ых";
|
||||
AF Inst _ (ASg Masc) => Prelude.glue s "ым";
|
||||
AF Inst _ (ASg Fem) => Prelude.glue s "ой";
|
||||
AF Inst _ (ASg Neut) => Prelude.glue s "ым";
|
||||
AF Inst _ APl => Prelude.glue s "ыми";
|
||||
AF Dat _ (ASg Masc) => Prelude.glue s "ому";
|
||||
AF Dat _ (ASg Fem) => Prelude.glue s "ой";
|
||||
AF Dat _ (ASg Neut) => Prelude.glue s "ому";
|
||||
AF Dat _ APl => Prelude.glue s "ым";
|
||||
AF Prepos _ (ASg Masc) => Prelude.glue s "ом";
|
||||
AF Prepos _ (ASg Fem) => Prelude.glue s "ой";
|
||||
AF Prepos _ (ASg Neut) => Prelude.glue s "ом";
|
||||
AF Prepos _ APl => Prelude.glue s "ых";
|
||||
AdvF => "о"
|
||||
AF Nom _ (ASg Masc) => s+ "ый";
|
||||
AF Nom _ (ASg Fem) => s + "ая";
|
||||
AF Nom _ (ASg Neut) => s + "ое";
|
||||
AF Nom _ APl => s + "ые";
|
||||
AF Acc Inanimate (ASg Masc) => s + "ый";
|
||||
AF Acc Animate (ASg Masc) => s + "ого";
|
||||
AF Acc _ (ASg Fem) => s + "ую";
|
||||
AF Acc _ (ASg Neut) => s + "ое";
|
||||
AF Acc Inanimate APl => s + "ые";
|
||||
AF Acc Animate APl => s + "ых";
|
||||
AF Gen _ (ASg Masc) => s + "ого";
|
||||
AF Gen _ (ASg Fem) => s + "ой";
|
||||
AF Gen _ (ASg Neut) => s + "ого";
|
||||
AF Gen _ APl => s + "ых";
|
||||
AF Inst _ (ASg Masc) => s + "ым";
|
||||
AF Inst _ (ASg Fem) => s + "ой";
|
||||
AF Inst _ (ASg Neut) => s + "ым";
|
||||
AF Inst _ APl => s + "ыми";
|
||||
AF Dat _ (ASg Masc) => s + "ому";
|
||||
AF Dat _ (ASg Fem) => s + "ой";
|
||||
AF Dat _ (ASg Neut) => s + "ому";
|
||||
AF Dat _ APl => s + "ым";
|
||||
AF Prepos _ (ASg Masc) => s + "ом";
|
||||
AF Prepos _ (ASg Fem) => s + "ой";
|
||||
AF Prepos _ (ASg Neut) => s + "ом";
|
||||
AF Prepos _ APl => s + "ых";
|
||||
AdvF => s +"о"
|
||||
}
|
||||
} ;
|
||||
oper ti_j_EndDecl : Str -> Adjective = \s ->{s = table {
|
||||
@@ -1317,7 +1317,7 @@ oper ti_j_EndDecl : Str -> Adjective = \s ->{s = table {
|
||||
AF Prepos _ (ASg Fem) => s+"ьей";
|
||||
AF Prepos _ (ASg Neut) => s+"ьем";
|
||||
AF Prepos _ APl => s+"ьих";
|
||||
AdvF => "ье"
|
||||
AdvF => s + "ье"
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -1348,7 +1348,7 @@ oper ti_j_EndDecl : Str -> Adjective = \s ->{s = table {
|
||||
-- AF Prepos _ (ASg Fem) => s+"ей";
|
||||
-- AF Prepos _ (ASg Neut) => s+"ем";
|
||||
-- AF Prepos _ APl => s+"их";
|
||||
-- AdvF => "о"
|
||||
-- AdvF => s + "о"
|
||||
-- }
|
||||
-- } ;
|
||||
--
|
||||
@@ -1388,7 +1388,7 @@ oper ij_EndK_G_KH_Decl : Str -> Adjective = \s ->{s = table {
|
||||
AF Prepos _ (ASg Fem) => s+"ой";
|
||||
AF Prepos _ (ASg Neut) => s+"ом";
|
||||
AF Prepos _ APl => s+"их";
|
||||
AdvF => "о"
|
||||
AdvF => s + "о"
|
||||
}
|
||||
} ;
|
||||
oper shij_End_Decl : Str -> Adjective = \s ->{s = table {
|
||||
@@ -1418,7 +1418,7 @@ oper shij_End_Decl : Str -> Adjective = \s ->{s = table {
|
||||
AF Prepos _ (ASg Fem) => s+"ей";
|
||||
AF Prepos _ (ASg Neut) => s+"ем";
|
||||
AF Prepos _ APl => s+"их";
|
||||
AdvF => "о"
|
||||
AdvF => s + "о"
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -1430,7 +1430,7 @@ oper i_oj_EndDecl : Str -> Str -> Adjective = \s, chastica ->{s = table {
|
||||
AF Nom _ (ASg Neut) => s+"ое"+ chastica ;
|
||||
AF Nom _ APl => s+"ие"+ chastica ;
|
||||
AF Acc Animate (ASg Masc) => s+"ого"+ chastica ;
|
||||
AF Acc Inanimate (ASg Masc) => s+"ое"+ chastica ;
|
||||
AF Acc Inanimate (ASg Masc) => s+"ой"+ chastica ;
|
||||
AF Acc _ (ASg Fem) => s+"ую"+ chastica ;
|
||||
AF Acc _ (ASg Neut) => s+"ое"+ chastica ;
|
||||
AF Acc Animate APl => s+"их"+ chastica ;
|
||||
@@ -1439,7 +1439,8 @@ oper i_oj_EndDecl : Str -> Str -> Adjective = \s, chastica ->{s = table {
|
||||
AF Gen _ (ASg Fem) => s+"ой"+ chastica ;
|
||||
AF Gen _ (ASg Neut) => s+"ого"+ chastica ;
|
||||
AF Gen _ APl => s+"их"+ chastica ;
|
||||
AF Inst _ (ASg Masc) => s+"им"+ chastica ; ␍ AF Inst _ (ASg Fem) => s+"ой"+ chastica ;
|
||||
AF Inst _ (ASg Masc) => s+"им"+ chastica ;
|
||||
␍ AF Inst _ (ASg Fem) => s+"ой"+ chastica ;
|
||||
AF Inst _ (ASg Neut) => s+"им"+ chastica ;
|
||||
AF Inst _ APl => s+"ими"+ chastica ;
|
||||
AF Dat _ (ASg Masc) => s+"ому"+ chastica ;
|
||||
@@ -1450,7 +1451,7 @@ oper i_oj_EndDecl : Str -> Str -> Adjective = \s, chastica ->{s = table {
|
||||
AF Prepos _ (ASg Fem) => s+"ой"+ chastica ;
|
||||
AF Prepos _ (ASg Neut) => s+"ом"+ chastica ;
|
||||
AF Prepos _ APl => s+"их" + chastica;
|
||||
AdvF => "о"
|
||||
AdvF => s + "о"
|
||||
}
|
||||
} ;
|
||||
--oper molodoj: AdjDegr = mkAdjDeg (uy_oj_EndDecl "молод") "моложе";
|
||||
@@ -1482,7 +1483,7 @@ oper uy_oj_EndDecl : Str -> Adjective = \s ->{s = table {
|
||||
AF Prepos _ (ASg Fem) => s+"ой";
|
||||
AF Prepos _ (ASg Neut) => s+"ом";
|
||||
AF Prepos _ APl => s+"ых";
|
||||
AdvF => "о"
|
||||
AdvF => s + "о"
|
||||
}
|
||||
} ;
|
||||
--oper prostuzhen: Adjective = shortDecl1 "простужен" ;
|
||||
@@ -1493,7 +1494,7 @@ oper uy_oj_EndDecl : Str -> Adjective = \s ->{s = table {
|
||||
-- AF _ _ (ASg Fem) => s+"а";
|
||||
-- AF _ _ (ASg Neut) => s+"о";
|
||||
-- AF _ _ APl => s+"ы" ;
|
||||
-- AdvF => "о"
|
||||
-- AdvF => s + "о"
|
||||
-- }
|
||||
-- } ;
|
||||
--oper shortDecl : Str -> Adjective = \s ->{s = table {
|
||||
@@ -1501,7 +1502,7 @@ oper uy_oj_EndDecl : Str -> Adjective = \s ->{s = table {
|
||||
-- AF _ _ (ASg Fem) => s+"на";
|
||||
-- AF _ _ (ASg Neut) => s+"но";
|
||||
-- AF _ _ APl => s+"ны" ;
|
||||
-- AdvF => "о"
|
||||
-- AdvF => s + "о"
|
||||
-- }␍-- } ;
|
||||
--
|
||||
---- 2 Adverbs
|
||||
@@ -1522,13 +1523,14 @@ oper uy_oj_EndDecl : Str -> Adjective = \s ->{s = table {
|
||||
---- patterns in the present tense in the indicative mood.
|
||||
--
|
||||
param Conjugation = First | FirstE | Second | Mixed | Dolzhen;
|
||||
|
||||
--
|
||||
--3 First conjugation (in Present) verbs :
|
||||
|
||||
oper verbIdti : Verbum = verbDecl Imperfective First "ид" "у" "шел" "иди" "идти";
|
||||
|
||||
--oper verbGulyat : Verbum = verbDecl Imperfective First "гуля" "ю" "гулял" "гуляй" "гулять";
|
||||
--oper verbVkluchat : Verbum = verbDecl Imperfective First "включа" "ю" "включал" "включай" "включать";
|
||||
--oper verbSuchestvovat : Verbum = verbDecl Imperfective First "существу" "ю" "существовал" "существуй" "существовать";
|
||||
oper verbSuchestvovat : Verbum = verbDecl Imperfective First "существу" "ю" "существовал" "существуй" "существовать";
|
||||
--oper verbVukluchat : Verbum = verbDecl Imperfective First "выключа" "ю" "выключал" "выключай" "выключать";
|
||||
--oper verbZhdat : Verbum = verbDecl Imperfective First "жд" "у" "ждал" "жди" "ждать" ;
|
||||
--oper verbBegat : Verbum = verbDecl Imperfective First "бега" "ю" "бегал" "бегай" "бегать";
|
||||
@@ -1537,26 +1539,33 @@ oper verbIdti : Verbum = verbDecl Imperfective First "ид" "у" "шел" "ид
|
||||
--oper verbPredpochitat : Verbum = verbDecl Imperfective First "предпочита" "ю" "предпочитал" "предпочитай" "предпочитать";
|
||||
--oper verbOtpravlyat : Verbum = verbDecl Imperfective First "отправля" "ю" "отправлял" "отправляй" "отправлять";
|
||||
--oper verbSlomat : Verbum = verbDecl Perfective First "слома" "ю" "сломал" "сломай" "сломать";
|
||||
oper verbByut : Verbum = verbDecl Perfective First "буд" "у" "был" "будь" "быть";
|
||||
|
||||
oper verbMoch : Verbum = verbDeclMoch Imperfective First "мог" "у" "мог" "моги" "мочь" "мож";
|
||||
|
||||
---- Verbs with vowel "ё": "даёшь" (give), "пьёшь" (drink) :
|
||||
--oper verbDavat : Verbum = verbDecl Imperfective FirstE "да" "ю" "давал" "давай" "давать";
|
||||
--oper verbPit : Verbum = verbDecl Imperfective FirstE "пь" "ю" "пил" "пей" "пить";
|
||||
--
|
||||
|
||||
|
||||
oper verbByut : Verbum = verbDecl Perfective First "буд" "у" "был" "будь" "быть";
|
||||
|
||||
oper verbMoch : Verbum = verbDeclMoch Imperfective First "мог" "у" "мог" "моги" "мочь" "мож";
|
||||
|
||||
----3 Second conjugation (in Present) verbs :
|
||||
--
|
||||
--oper verbLubit : Verbum = verbDecl Imperfective Second "люб" "лю" "любил" "люби" "любить";
|
||||
--oper verbGovorit : Verbum = verbDecl Imperfective Second "говор" "ю" "говорил" "говори" "говорить";
|
||||
--␍--oper verbBolet_2 : Verbum = verbDecl Imperfective Second "бол" "ю" "болел" "боли" "болеть";
|
||||
--
|
||||
--oper verbBolet_2 : Verbum = verbDecl Imperfective Second "бол" "ю" "болел" "боли" "болеть";
|
||||
--oper verbPoranit : Verbum = verbDecl Perfective Second "поран" "ю" "поранил" "порань" "поранить";
|
||||
--␍-- Irregular Mixed:
|
||||
--
|
||||
-- Irregular Mixed:
|
||||
oper verbKhotet : Verbum = verbDecl Imperfective Mixed "хоч" "у" "хотел" "хоти" "хотеть";
|
||||
|
||||
-- Irregular
|
||||
oper verbDolzhen : Verbum = verbDecl Imperfective Dolzhen "долж" "ен" "долж" ["будь должен"] ["быть должным"] ;
|
||||
|
||||
|
||||
-- To reduces the redundancies in the definitions
|
||||
-- we introduce some intermediate types,
|
||||
-- so that the full type can be described as a combination
|
||||
@@ -1595,7 +1604,7 @@ oper presentConjMixed: Str -> Str -> PresentVerb = \del, sgP1End ->
|
||||
PRF APl P3 => del+ "ят"
|
||||
};
|
||||
oper presentConj2: Str -> Str -> PresentVerb = \del, sgP1End ->
|
||||
table {
|
||||
table {
|
||||
PRF (ASg _) P1 => del+ sgP1End ;
|
||||
PRF (ASg _) P2 => del+ "ишь" ;
|
||||
PRF (ASg _) P3 => del+ "ит" ;
|
||||
@@ -1623,7 +1632,7 @@ oper presentConj1: Str -> Str -> PresentVerb = \del, sgP1End ->
|
||||
PRF APl P3 => del+ sgP1End + "т"
|
||||
};
|
||||
oper presentConj1Moch: Str -> Str -> Str -> PresentVerb = \del, sgP1End, altRoot ->
|
||||
table {
|
||||
table {
|
||||
PRF (ASg _) P1 => del + sgP1End ;
|
||||
PRF (ASg _) P2 => altRoot + "ешь" ;
|
||||
PRF (ASg _) P3 => altRoot + "ет" ;
|
||||
@@ -1708,10 +1717,10 @@ oper mkPassive: AspectVoice -> PastVerb -> AspectVoice = \av, pv ->
|
||||
VIMP Pl P2 => av.s! (VIMP Pl P2) +"сь";
|
||||
VIMP Sg P3 => av.s ! (VIMP Sg P3) +"ся";
|
||||
VIMP Pl P3 => av.s ! (VIMP Pl P3) +"ся";
|
||||
VSUB (ASg Masc) => pv ! (PSF (ASg Masc)) + "ся"+[" бы"];
|
||||
VSUB (ASg Fem) => pv ! (PSF (ASg Fem)) + "сь"+[" бы"];
|
||||
VSUB (ASg Neut) => pv ! (PSF (ASg Neut)) + "сь"+[" бы"];
|
||||
VSUB APl => pv ! (PSF APl) + "сь"+[" бы"] ;
|
||||
VSUB (ASg Masc) => pv ! (PSF (ASg Masc)) + "ся"++"бы";
|
||||
VSUB (ASg Fem) => pv ! (PSF (ASg Fem)) + "сь"++"бы";
|
||||
VSUB (ASg Neut) => pv ! (PSF (ASg Neut)) + "сь"++"бы";
|
||||
VSUB APl => pv ! (PSF APl) + "сь"+"бы" ;
|
||||
VIND (ASg _) (VPresent P1) =>
|
||||
-- case av.asp of { Imperfective =>
|
||||
av.s ! (VIND (ASg Masc) (VPresent P1)) + "сь" ;
|
||||
@@ -1743,28 +1752,28 @@ oper
|
||||
imperfectiveActivePattern : Str -> Str -> PresentVerb -> PastVerb -> AspectVoice =
|
||||
\inf, imper, presentFuture, past -> { s= table {
|
||||
VINF => inf ;
|
||||
VIMP Sg P1 => ["давайте "]+ inf ;
|
||||
VIMP Pl P1 => ["давайте "] + inf ;
|
||||
VIMP Sg P1 => "давайте" ++ inf ;
|
||||
VIMP Pl P1 => "давайте" ++ inf ;
|
||||
VIMP Sg P2 => imper ;
|
||||
VIMP Pl P2 => imper+"те" ;
|
||||
VIMP Sg P3 => ["пускай "] + presentFuture ! (PRF (ASg Masc) P3) ;
|
||||
VIMP Pl P3 => ["пускай "] + presentFuture ! (PRF APl P3) ;
|
||||
VSUB (ASg Masc) => past ! (PSF (ASg Masc)) +[" бы"];
|
||||
VSUB (ASg Fem) => past ! (PSF (ASg Fem)) +[" бы"];
|
||||
VSUB (ASg Neut) => past ! (PSF (ASg Neut) )+[" бы"];
|
||||
VSUB APl => past ! (PSF APl) +[" бы"];
|
||||
VIMP Sg P3 => "пусть" ++ presentFuture ! (PRF (ASg Masc) P3) ;
|
||||
VIMP Pl P3 => "пусть" ++ presentFuture ! (PRF APl P3) ;
|
||||
VSUB (ASg Masc) => past ! (PSF (ASg Masc)) ++"бы";
|
||||
VSUB (ASg Fem) => past ! (PSF (ASg Fem)) ++"бы";
|
||||
VSUB (ASg Neut) => past ! (PSF (ASg Neut) )++"бы";
|
||||
VSUB APl => past ! (PSF APl) ++"бы";
|
||||
VIND (ASg _) (VPresent P1) => presentFuture ! ( PRF (ASg Masc) P1);
|
||||
VIND (ASg _) (VPresent P2) => presentFuture! (PRF (ASg Masc) P2) ;
|
||||
VIND (ASg _) (VPresent P3) => presentFuture ! (PRF (ASg Masc) P3) ;
|
||||
VIND APl (VPresent P1) => presentFuture ! (PRF APl P1);
|
||||
VIND APl (VPresent P2) => presentFuture ! (PRF APl P2);
|
||||
VIND APl (VPresent P3) => presentFuture ! (PRF APl P3);
|
||||
VIND (ASg _) (VFuture P1) => ["буду "] + presentFuture ! (PRF (ASg Masc) P1) ;
|
||||
VIND (ASg _) (VFuture P2) => ["будешь"] + presentFuture ! (PRF (ASg Masc) P2) ;
|
||||
VIND (ASg _) (VFuture P3) => ["будет "] + presentFuture ! (PRF (ASg Masc) P3) ;
|
||||
VIND APl (VFuture P1) => ["будем "] + presentFuture ! (PRF APl P1) ;
|
||||
VIND APl (VFuture P2) => ["будете "] + presentFuture ! (PRF APl P2) ;
|
||||
VIND APl (VFuture P3) => ["будут "] + presentFuture ! (PRF APl P3) ;
|
||||
VIND (ASg _) (VFuture P1) => "буду" ++ inf ;
|
||||
VIND (ASg _) (VFuture P2) => "будешь" ++ inf ;
|
||||
VIND (ASg _) (VFuture P3) => "будет" ++ inf ;
|
||||
VIND APl (VFuture P1) => "будем" ++ inf ;
|
||||
VIND APl (VFuture P2) => "будете" ++ inf ;
|
||||
VIND APl (VFuture P3) => "будут" ++ inf ;
|
||||
VIND (ASg Masc) VPast => past ! (PSF (ASg Masc)) ;
|
||||
VIND (ASg Fem) VPast => past ! (PSF (ASg Fem) ) ;
|
||||
VIND (ASg Neut) VPast => past ! (PSF (ASg Neut)) ;
|
||||
@@ -1776,17 +1785,17 @@ oper
|
||||
oper perfectiveActivePattern: Str -> Str -> PresentVerb -> PastVerb -> AspectVoice =
|
||||
\inf, imper, presentFuture, past -> { s= table {
|
||||
VINF => inf ;
|
||||
VIMP Sg P1 => ["давайте "]+ presentFuture ! (PRF (ASg Masc) P1);
|
||||
VIMP Pl P1 => ["давайте "] + presentFuture ! (PRF APl P1);
|
||||
VIMP Sg P1 => "давайте"++ presentFuture ! (PRF (ASg Masc) P1);
|
||||
VIMP Pl P1 => "давайте" ++ presentFuture ! (PRF APl P1);
|
||||
VIMP Sg P2 => imper ;
|
||||
VIMP Pl P2 => imper+"те" ;
|
||||
VIMP Sg P3 => ["пускай "] + presentFuture ! (PRF (ASg Masc) P3) ;
|
||||
VIMP Pl P3 => ["пускай "] + presentFuture ! (PRF APl P3) ;
|
||||
VSUB (ASg Masc) => past ! (PSF (ASg Masc)) +[" бы"];
|
||||
VSUB (ASg Fem) => past ! (PSF (ASg Fem)) +[" бы"];
|
||||
VIMP Sg P3 => "пусть" ++ presentFuture ! (PRF (ASg Masc) P3) ;
|
||||
VIMP Pl P3 => "пусть" ++ presentFuture ! (PRF APl P3) ;
|
||||
VSUB (ASg Masc) => past ! (PSF (ASg Masc)) ++"бы";
|
||||
VSUB (ASg Fem) => past ! (PSF (ASg Fem)) ++"бы";
|
||||
|
||||
VSUB (ASg Neut) => past ! (PSF (ASg Neut) )+[" бы"];
|
||||
VSUB APl => past ! (PSF APl) +[" бы"];
|
||||
VSUB (ASg Neut) => past ! (PSF (ASg Neut) )++"бы";
|
||||
VSUB APl => past ! (PSF APl) ++"бы";
|
||||
VIND (ASg _) (VPresent _) => [] ;
|
||||
VIND APl (VPresent P1) => nonExist ;
|
||||
VIND APl (VPresent P2) => nonExist ;
|
||||
|
||||
@@ -16,7 +16,7 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
||||
n = kazhduj.n ;
|
||||
p = P3 ;
|
||||
pron = False;
|
||||
g = kazhduj.g ;
|
||||
g = case kazhduj.g of { PNoGen => (PGen okhotnik.g); _ => kazhduj.g };
|
||||
anim = okhotnik.anim
|
||||
} ;
|
||||
|
||||
@@ -87,8 +87,8 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
||||
-- 3 => (ti_j_EndDecl n.s) ;
|
||||
-- _ => uy_j_EndDecl n.s } ;
|
||||
|
||||
OrdNumeral numeral =
|
||||
{s = \\ af => (uy_j_EndDecl (numeral.s ! caseAF af ! genAF af)).s!af} ;
|
||||
-- OrdNumeral numeral =
|
||||
-- {s = \\ af => (uy_j_EndDecl (numeral.s ! caseAF af ! genAF af)).s!af} ;
|
||||
|
||||
NumNumeral n = n ;
|
||||
|
||||
@@ -165,12 +165,12 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
||||
-- first place as common nouns, so that one can also have "a suggestion that...".
|
||||
|
||||
SentCN idea x =
|
||||
{s = \\n,c => idea.s ! n ! c ++ ["о том, что"] ++ x.s ;
|
||||
{s = \\n,c => idea.s ! n ! c ++ x.s ;
|
||||
g = idea.g; anim = idea.anim
|
||||
} ;
|
||||
|
||||
RelCN idea x =
|
||||
{s = \\n,c => idea.s ! n ! c ++ ["о том, что"] ++ x.s !(gNum idea.g n)!c!idea.anim ;
|
||||
{s = \\n,c => idea.s ! n ! c ++ x.s !(gNum idea.g n)!c!idea.anim ;
|
||||
g = idea.g; anim = idea.anim
|
||||
} ;
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
--1 Russian Lexical Paradigms
|
||||
--
|
||||
-- Janna Khegai 2003--2005
|
||||
-- Janna Khegai 2003--2006
|
||||
--
|
||||
-- This is an API to the user of the resource grammar
|
||||
-- This is an API for the user of the resource grammar
|
||||
-- for adding lexical items. It gives functions for forming
|
||||
-- expressions of open categories: nouns, adjectives, verbs.
|
||||
--
|
||||
-- Closed categories (determiners, pronouns, conjunctions) are
|
||||
-- accessed through the resource syntax API, $Structural.gf$.
|
||||
--
|
||||
-- The main difference with $MorphoEng.gf$ is that the types
|
||||
-- The main difference with $MorphoRus.gf$ is that the types
|
||||
-- referred to are compiled resource grammar types. We have moreover
|
||||
-- had the design principle of always having existing forms, rather
|
||||
-- than stems, as string arguments of the paradigms.
|
||||
@@ -20,9 +20,6 @@
|
||||
-- first we give a handful of patterns that aim to cover all
|
||||
-- regular cases. Then we give a worst-case function $mkC$, which serves as an
|
||||
-- escape to construct the most irregular words of type $C$.
|
||||
-- However, this function should only seldom be needed: we have a
|
||||
-- separate module $IrregularEng$, which covers all irregularly inflected
|
||||
-- words.
|
||||
--
|
||||
-- The following modules are presupposed:
|
||||
|
||||
@@ -74,7 +71,7 @@ oper
|
||||
animate: Animacy;
|
||||
inanimate: Animacy;
|
||||
|
||||
mkIndeclinableNoun: Str -> Gender -> Animacy -> N ;
|
||||
mkIndeclinableNoun: Str -> Gender -> Animacy -> N ;
|
||||
|
||||
-- Worst case - give six singular forms:
|
||||
-- Nominative, Genetive, Dative, Accusative, Instructive and Prepositional;
|
||||
@@ -85,7 +82,8 @@ oper
|
||||
-- to the Nominative or the Genetive one) is actually of no help,
|
||||
-- since there are a lot of exceptions and the gain is just one form less.
|
||||
|
||||
mkN : (_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> Animacy -> N ;
|
||||
mkN : (nomSg, genSg, datSg, accSg, instSg, preposSg,
|
||||
nomPl, genPl, datPl, accPl, instPl, preposPl: Str) -> Gender -> Animacy -> N ;
|
||||
|
||||
-- мужчина, мужчины, мужчине, мужчину, мужчиной, мужчине
|
||||
-- мужчины, мужчин, мужчинам, мужчин, мужчинами, мужчинах
|
||||
@@ -104,7 +102,7 @@ oper
|
||||
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 "-ия"
|
||||
nMalyariya : Str -> N ; -- feminine, inanimate, ending with "-ия"
|
||||
nTetya : Str -> N ; -- feminine, animate, ending with "-я"
|
||||
nBol : Str -> N ; -- feminine, inanimate, ending with "-ь"(soft sign)
|
||||
|
||||
@@ -117,8 +115,8 @@ oper
|
||||
|
||||
-- Masculine patterns.
|
||||
|
||||
--Ending with consonant:
|
||||
nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-ла"
|
||||
-- Ending with consonant:
|
||||
nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-ла"
|
||||
|
||||
nBrat: Str -> N ; -- animate, брат-ья
|
||||
nStul: Str -> N ; -- same as above, but inanimate
|
||||
@@ -143,7 +141,6 @@ nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-л
|
||||
-- Proper names.
|
||||
|
||||
mkPN : Str -> Gender -> Animacy -> PN ; -- "Иван", "Маша"
|
||||
regPN : Str -> PN ;
|
||||
nounPN : N -> PN ;
|
||||
|
||||
-- On the top level, it is maybe $CN$ that is used rather than $N$, and
|
||||
@@ -159,14 +156,10 @@ nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-л
|
||||
-- forms in the worst case:
|
||||
|
||||
|
||||
-- Masculine | Feminine | Neutral | Plural
|
||||
-- Nominative
|
||||
-- Genitive
|
||||
-- Dative
|
||||
-- Accusative Inanimate
|
||||
-- Accusative Animate
|
||||
-- Instructive
|
||||
-- Prepositional
|
||||
-- (Masculine | Feminine | Neutral | Plural) *
|
||||
|
||||
-- (Nominative | Genitive | Dative | Accusative Inanimate | Accusative Animate |
|
||||
-- Instructive | Prepositional)
|
||||
|
||||
|
||||
-- Notice that 4 short forms, which exist for some adjectives are not included
|
||||
@@ -176,22 +169,24 @@ nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-л
|
||||
-- mkA : ( : Str) -> A ;
|
||||
|
||||
-- The regular function captures the variants for some popular adjective
|
||||
-- endings below:
|
||||
-- endings below. The first string agrument is the masculine singular form,
|
||||
-- the second is comparative:
|
||||
|
||||
regA : Str -> Str -> A ;
|
||||
|
||||
|
||||
-- Invariable adjective is a special case.
|
||||
|
||||
adjInvar : Str -> A ; -- khaki, mini, hindi, netto
|
||||
|
||||
-- Some regular patterns depending on the ending.
|
||||
|
||||
AStaruyj : Str -> Str -> A ; -- ending with "-ый"
|
||||
AMalenkij : Str -> Str -> A ; -- ending with "-ий", Gen - "маленьк-ого"
|
||||
AKhoroshij : Str -> Str -> A ; -- ending with "-ий", Gen - "хорош-его"
|
||||
AMolodoj : Str -> Str -> A ; -- ending with "-ой",
|
||||
AStaruyj : Str -> Str -> A ; -- ending with "-ый"
|
||||
AMalenkij : Str -> Str -> A ; -- ending with "-ий", Gen - "маленьк-ого"
|
||||
AKhoroshij : Str -> Str -> A ; -- ending with "-ий", Gen - "хорош-его"
|
||||
AMolodoj : Str -> Str -> A ; -- ending with "-ой",
|
||||
-- plural - молод-ые"
|
||||
AKakoj_Nibud : Str -> Str -> Str -> A ; -- ending with "-ой",
|
||||
AKakoj_Nibud : Str -> Str -> Str -> A ; -- ending with "-ой",
|
||||
-- plural - "как-ие"
|
||||
|
||||
-- Two-place adjectives need a preposition and a case as extra arguments.
|
||||
@@ -200,11 +195,11 @@ nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-л
|
||||
|
||||
-- Comparison adjectives need a positive adjective
|
||||
-- (28 forms without short forms).
|
||||
-- Taking only one comparative form (non-syntaxic) and
|
||||
-- only one superlative form (syntaxic) we can produce the
|
||||
-- Taking only one comparative form (non-syntactic) and
|
||||
-- only one superlative form (syntactic) we can produce the
|
||||
-- comparison adjective with only one extra argument -
|
||||
-- non-syntaxic comparative form.
|
||||
-- Syntaxic forms are based on the positive forms.
|
||||
-- non-syntactic comparative form.
|
||||
-- Syntactic forms are based on the positive forms.
|
||||
|
||||
|
||||
-- mkADeg : A -> Str -> ADeg ;
|
||||
@@ -215,8 +210,7 @@ nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-л
|
||||
|
||||
--2 Adverbs
|
||||
|
||||
-- Adverbs are not inflected. Most lexical ones have position
|
||||
-- after the verb. Some can be preverbal (e.g. "always").
|
||||
-- Adverbs are not inflected.
|
||||
|
||||
mkAdv : Str -> Adv ;
|
||||
|
||||
@@ -228,30 +222,27 @@ nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-л
|
||||
-- 4(GenNum)(past) ](indicative)+ 4 (GenNum) (subjunctive) }
|
||||
-- Participles (Present and Past) and Gerund forms are not included,
|
||||
-- since they fuction more like Adjectives and Adverbs correspondingly
|
||||
-- rather than verbs. Aspect regarded as an inherent parameter of a verb.
|
||||
-- Notice, that some forms are never used for some verbs. Actually,
|
||||
-- the majority of verbs do not have many of the forms.
|
||||
-- rather than verbs. Aspect is regarded as an inherent parameter of a verb.
|
||||
-- Notice, that some forms are never used for some verbs.
|
||||
|
||||
Voice: Type;
|
||||
Aspect: Type;
|
||||
--Tense : Type;
|
||||
Bool: Type;
|
||||
Conjugation: Type ;
|
||||
|
||||
first: Conjugation; -- "гуля-Ешь, гуля-Ем"
|
||||
firstE: Conjugation; -- Verbs with vowel "ё": "даёшь" (give), "пьёшь" (drink)
|
||||
second: Conjugation; -- "вид-Ишь, вид-Им"
|
||||
mixed: Conjugation; -- "хоч-Ешь - хот-Им"
|
||||
first: Conjugation; -- "гуля-Ешь, гуля-Ем"
|
||||
firstE: Conjugation; -- Verbs with vowel "ё": "даёшь" (give), "пьёшь" (drink)
|
||||
second: Conjugation; -- "вид-Ишь, вид-Им"
|
||||
mixed: Conjugation; -- "хоч-Ешь - хот-Им"
|
||||
dolzhen: Conjugation; -- irregular
|
||||
|
||||
true: Bool;
|
||||
true: Bool;
|
||||
false: Bool;
|
||||
|
||||
active: Voice ;
|
||||
passive: Voice ;
|
||||
imperfective: Aspect;
|
||||
perfective: Aspect ;
|
||||
--present : Tense ;
|
||||
--past : Tense ;
|
||||
|
||||
|
||||
-- The worst case need 6 forms of the present tense in indicative mood
|
||||
@@ -260,7 +251,9 @@ perfective: Aspect ;
|
||||
-- (singular, second person: "беги"), an infinitive ("бежать").
|
||||
-- Inherent aspect should also be specified.
|
||||
|
||||
mkVerbum : Aspect -> (_,_,_,_,_,_,_,_,_ : Str) -> V ;
|
||||
mkVerbum : Aspect -> (presentSgP1,presentSgP2,presentSgP3,
|
||||
presentPlP1,presentPlP2,presentPlP3,
|
||||
pastSgMasculine,imperative,infinitive: Str) -> V ;
|
||||
|
||||
-- Common conjugation patterns are two conjugations:
|
||||
-- first - verbs ending with "-ать/-ять" and second - "-ить/-еть".
|
||||
@@ -273,7 +266,8 @@ perfective: Aspect ;
|
||||
-- So the definition for verb "любить" looks like:
|
||||
-- regV Imperfective Second "люб" "лю" "любил" "люби" "любить";
|
||||
|
||||
regV :Aspect -> Conjugation -> (_,_,_,_,_ : Str) -> V ;
|
||||
regV :Aspect -> Conjugation -> (stemPresentSgP1,endingPresentSgP1,
|
||||
pastSgP1,imperative,infinitive : Str) -> V ;
|
||||
|
||||
-- For writing an application grammar one usualy doesn't need
|
||||
-- the whole inflection table, since each verb is used in
|
||||
@@ -293,11 +287,10 @@ perfective: Aspect ;
|
||||
mkV3 : V -> Str -> Str -> Case -> Case -> V3 ; -- "сложить письмо в конверт"
|
||||
dirV2 : V -> V2 ; -- "видеть", "любить"
|
||||
tvDirDir : V -> V3 ;
|
||||
|
||||
--.
|
||||
|
||||
-- The definitions should not bother the user of the API. So they are
|
||||
-- hidden from the document.
|
||||
|
||||
--.
|
||||
Gender = MorphoRus.Gender ;
|
||||
Case = MorphoRus.Case ;
|
||||
Number = MorphoRus.Number ;
|
||||
@@ -452,8 +445,6 @@ regN = \ray ->
|
||||
Masc => mkProperNameMasc ivan anim ;
|
||||
_ => mkProperNameFem ivan anim
|
||||
} ** {lock_PN =<>};
|
||||
regPN x = mkPN x masculine animate ;
|
||||
|
||||
nounPN n = {s=\\c => n.s! SF Sg c; anim=n.anim; g=n.g; lock_PN=<>};
|
||||
|
||||
mkCN = UseN;
|
||||
|
||||
@@ -20,7 +20,8 @@ concrete RelativeRus of Relative = CatRus ** open ResRus, MorphoRus in {
|
||||
-- deferred to $ExtRus.gf$ ("at which we are looking").
|
||||
|
||||
RelSlash kotoruj yaVizhu =
|
||||
{s = \\b,clf,gn, _ , anim => yaVizhu.s2 ++ kotoruj.s ! gn ! yaVizhu.c ! anim
|
||||
{s = \\b,clf,gn, _ , anim => yaVizhu.s2 ++
|
||||
kotoruj.s ! gn ! yaVizhu.c ! anim
|
||||
++ yaVizhu.s!b!clf
|
||||
} ;
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ oper
|
||||
PNoGen => variants {Masc ; Fem} --- the best we can do for ya, tu
|
||||
} ;
|
||||
|
||||
|
||||
oper
|
||||
extCase: PronForm -> Case = \pf -> case pf of
|
||||
{ PF Nom _ _ => Nom ;
|
||||
@@ -194,7 +195,7 @@ oper
|
||||
case t of { Present => VPresent p ; PastRus => VPast; Future => VFuture p } ;
|
||||
|
||||
getTense : Tense -> RusTense= \t ->
|
||||
case t of { Pres => Present ; Past => PastRus; _ => Future} ;
|
||||
case t of { Pres => Present ; Fut => Future; _ => PastRus} ;
|
||||
|
||||
|
||||
getVoice: VerbForm -> Voice = \vf ->
|
||||
@@ -267,6 +268,15 @@ oper
|
||||
ClImper => VFORM Act (VIMP n p)
|
||||
};
|
||||
|
||||
getPassVerbForm : ClForm -> Gender -> Number -> Person -> VerbForm = \clf,g,n, p -> case clf of
|
||||
{ ClIndic Future _ => VFORM Pass (VIND (gNum g n) (VFuture p));
|
||||
ClIndic PastRus _ => VFORM Pass (VIND (gNum g n) VPast);
|
||||
ClIndic Present _ => VFORM Pass (VIND (gNum g n) (VPresent p));
|
||||
ClCondit => VFORM Pass (VSUB (gNum g n));
|
||||
ClInfinit => VFORM Pass VINF ;
|
||||
ClImper => VFORM Pass (VIMP n p)
|
||||
};
|
||||
|
||||
|
||||
--2 For $Adjective$
|
||||
param
|
||||
@@ -275,13 +285,25 @@ param
|
||||
oper
|
||||
Complement = {s2 : Str ; c : Case} ;
|
||||
|
||||
oper Refl ={s: Case => Str};
|
||||
oper sam: Refl=
|
||||
{s = table{
|
||||
Nom => "сам";
|
||||
Gen => "себя";
|
||||
Dat => "себе";
|
||||
Acc => "себя";
|
||||
Inst => "собой";
|
||||
Prepos => "себе"
|
||||
}
|
||||
};
|
||||
|
||||
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 } ;
|
||||
_ => ASg Masc } ; -- assuming pronoun "I" is a male
|
||||
Pl => APl
|
||||
} ;
|
||||
-- _ => variants {ASg Masc ; ASg Fem} } ;
|
||||
@@ -293,7 +315,7 @@ oper numGNum : GenNum -> Number = \gn ->
|
||||
case gn of { APl => Pl ; _ => Sg } ;
|
||||
|
||||
oper genGNum : GenNum -> Gender = \gn ->
|
||||
case gn of { ASg Fem => Fem; _ => Masc } ;
|
||||
case gn of { ASg Fem => Fem; ASg Masc => Masc; _ => Neut } ;
|
||||
|
||||
oper numAF: AdjForm -> Number = \af ->
|
||||
case af of { AdvF => Sg; AF _ _ gn => (numGNum gn) } ;
|
||||
|
||||
@@ -16,12 +16,13 @@ concrete SentenceRus of Sentence = CatRus ** open Prelude, ResRus in {
|
||||
});
|
||||
ne = case b of {Pos=>""; Neg=>"не"};␍
|
||||
vizhu = tebyaNeVizhu.s ! clf ! (pgNum Ya.g Ya.n)! Ya.p;
|
||||
khorosho = tebyaNeVizhu.s2 ;
|
||||
tebya = tebyaNeVizhu.s3 ! (pgen2gen Ya.g) ! Ya.n
|
||||
}
|
||||
in
|
||||
if_then_else Str tebyaNeVizhu.negBefore
|
||||
(ya ++ ne ++ vizhu ++ tebya)
|
||||
(ya ++ vizhu ++ ne ++ tebya)
|
||||
(ya ++ ne ++ vizhu ++ tebya ++ khorosho)
|
||||
(ya ++ vizhu ++ ne ++ tebya ++ khorosho)
|
||||
} ;
|
||||
|
||||
|
||||
@@ -44,7 +45,7 @@ concrete SentenceRus of Sentence = CatRus ** open Prelude, ResRus in {
|
||||
SlashVVV2 ivan khotet lubit =
|
||||
{ s=\\b,clf => ivan.s ! PF Nom No NonPoss ++ khotet.s! (getActVerbForm clf (pgen2gen ivan.g) ivan.n ivan.p) ++ lubit.s! VFORM Act VINF ;
|
||||
s2=lubit.s2;
|
||||
c=lubit.c };
|
||||
c=lubit.c };
|
||||
|
||||
AdvSlash slash adv = {
|
||||
s = \\b,clf => slash.s ! b ! clf ++ adv.s ;
|
||||
@@ -61,19 +62,26 @@ concrete SentenceRus of Sentence = CatRus ** open Prelude, ResRus in {
|
||||
_ => []
|
||||
}
|
||||
in
|
||||
dont ++ inf.s ! ClImper ! (gNum g n )!P3++
|
||||
dont ++ inf.s ! ClImper ! (gNum g n )!P2 ++
|
||||
inf.s2++inf.s3!g!n
|
||||
} ;
|
||||
|
||||
EmbedS s = {s = "что" ++ s.s} ;
|
||||
-- In Russian "Whether you go" transformed in "go whether you":
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = vp.s!ClInfinit!(ASg Masc) !P3} ;
|
||||
EmbedVP vp = {s = vp.s2 ++ vp.s!ClInfinit!(ASg Masc) !P3 ++ vp.s3!Masc!Sg} ;
|
||||
|
||||
UseCl t a p cl = {s = cl.s! p.p ! ClIndic (getTense t.t) a.a};
|
||||
UseCl t a p cl = {s = case t.t of {
|
||||
Cond => cl.s! p.p ! ClCondit ;
|
||||
_ => cl.s! p.p ! ClIndic (getTense t.t) a.a}};
|
||||
|
||||
UseQCl t a p qcl= {s = qcl.s!p.p! ClIndic (getTense t.t) a.a };
|
||||
UseRCl t a p rcl ={s = rcl.s! p.p ! ClIndic (getTense t.t) a.a };
|
||||
UseQCl t a p qcl= {s = case t.t of {
|
||||
Cond => qcl.s! p.p ! ClCondit ;
|
||||
_ => qcl.s!p.p! ClIndic (getTense t.t) a.a }};
|
||||
|
||||
UseRCl t a p rcl ={s = \\gn,c,anim => case t.t of {
|
||||
Cond => [", "] ++ rcl.s! p.p ! ClCondit ! gn !c !anim ;
|
||||
_ => [", "] ++ rcl.s! p.p ! ClIndic (getTense t.t) a.a !gn !c !anim}};
|
||||
|
||||
}
|
||||
|
||||
@@ -45,13 +45,13 @@ lin
|
||||
here7to_Adv = ss "сюда" ;
|
||||
here7from_Adv = ss "отсюда" ;
|
||||
how_IAdv = ss "как" ;
|
||||
how8many_IDet = skolkoSgDet ** {n = Sg; g = (PGen Neut); c= Gen};
|
||||
how8many_IDet = skolkoSgDet ** {n = Pl; g = (PGen Neut); c= Gen};
|
||||
i_Pron = pronYa ;
|
||||
if_Subj = ss "если" ;
|
||||
in8front_Prep = { s = "перед" ; c = Inst};
|
||||
in_Prep = { s = "в" ; c = Prepos };
|
||||
it_Pron = pronOno ;
|
||||
less_CAdv = ss "меньше" ;
|
||||
less_CAdv = ss "менее" ;
|
||||
many_Det = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
|
||||
more_CAdv = ss "более" ;
|
||||
most_Predet = bolshinstvoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
|
||||
|
||||
@@ -188,7 +188,8 @@ concrete VerbRus of Verb = CatRus ** open ResRus, Prelude in {
|
||||
-- the verb parameter type.
|
||||
|
||||
ComplVV putatsya bezhat =
|
||||
{ s = \\clf,gn,p => putatsya.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ bezhat.s!clf!gn!p ;
|
||||
{ s = \\clf,gn,p => putatsya.s ! (getActVerbForm clf (genGNum gn)
|
||||
(numGNum gn) p) ++ bezhat.s!ClInfinit !gn!p ;
|
||||
asp = putatsya.asp ;
|
||||
w = Act;
|
||||
negBefore = True;
|
||||
@@ -213,7 +214,10 @@ concrete VerbRus of Verb = CatRus ** open ResRus, Prelude in {
|
||||
} ;
|
||||
|
||||
ComplV2A 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) ;
|
||||
{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;
|
||||
@@ -225,11 +229,11 @@ concrete VerbRus of Verb = CatRus ** open ResRus, Prelude in {
|
||||
asp = poet.asp; w = poet.w; t = poet.t ; negBefore = poet.negBefore } ;
|
||||
|
||||
AdVVP khorosho poet =
|
||||
{s = \\clf,gn,p => poet.s ! clf!gn!p; s2 = poet.s2 ++ khorosho.s; s3 = poet.s3;
|
||||
{s = \\clf,gn,p => poet.s ! clf!gn!p; s2 = khorosho.s ++ poet.s2; s3 = poet.s3;
|
||||
asp = poet.asp; w = poet.w; t = poet.t ; negBefore = poet.negBefore } ;
|
||||
|
||||
PassV2 se =
|
||||
{s=\\clf,gn,p => se.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ;
|
||||
{s=\\clf,gn,p => se.s ! (getPassVerbForm clf (genGNum gn) (numGNum gn) p) ;
|
||||
asp=se.asp; w=Pass; s2 = se.s2;
|
||||
negBefore = True;
|
||||
s3 = table{_=> table{_ => ""}}
|
||||
|
||||
Reference in new issue
Block a user