1
0
forked from GitHub/gf-core
This commit is contained in:
janna
2006-06-22 11:17:01 +00:00
parent 47a3d736a6
commit 84b70bdd72
11 changed files with 209 additions and 170 deletions

View File

@@ -25,12 +25,12 @@ flags coding=utf8 ;
} ; } ;
ReflA2 vlublen = ReflA2 vlublen =
{s = \\af => vlublen.s !Posit! af ++ vlublen.s2 ++ "себя"; {s = \\af => vlublen.s !Posit! af ++ vlublen.s2 ++ sam.s ! vlublen.c;
p = True p = True
} ; } ;
SentAP vlublen sent= SentAP vlublen sent=
{s = \\af => vlublen.s ! af ++ sent.s; {s = \\af => vlublen.s ! af ++ [", "] ++ sent.s;
p = True p = True
} ; } ;

View File

@@ -7,9 +7,9 @@ concrete IdiomRus of Idiom = CatRus ** open Prelude, ResRus, MorphoRus in {
lin lin
ExistNP = \bar -> ExistNP = \bar ->
{s =\\b,clf => case b of {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; ++ 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 ++ bar.s ! PF Nom No NonPoss
} }
} ; } ;
@@ -17,20 +17,24 @@ concrete IdiomRus of Idiom = CatRus ** open Prelude, ResRus, MorphoRus in {
ExistIP Kto = ExistIP Kto =
let { kto = Kto.s ! (PF Nom No NonPoss) } in let { kto = Kto.s ! (PF Nom No NonPoss) } in
{s = \\b,clf,_ => case b of {s = \\b,clf,_ => case b of
{Pos => kto ++ verbByut.s ! (getActVerbForm clf (pgen2gen Kto.g) Sg P3) ; {Pos => kto ++ verbSuchestvovat.s ! (getActVerbForm clf (pgen2gen Kto.g) Sg P3) ;
Neg => kto ++ "не" ++ verbByut.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 =>"не"} CleftAdv adv sen = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
in 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 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 =>"не"} ImpersCl vp = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
in 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: -- 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 in
ne ++ vp.s! clf! (ASg Masc) ! P3 }; "ты" ++ ne ++ vp.s! clf! (ASg Masc) ! P2 };
ProgrVP vp = vp ; ProgrVP vp = vp ;

View File

@@ -20,21 +20,21 @@ lin
beautiful_A = AStaruyj "красив" "красивее"; beautiful_A = AStaruyj "красив" "красивее";
become_VA = regV perfective second "станов" "лю" "стал" "стань" "стать" ; become_VA = regV perfective second "станов" "лю" "стал" "стань" "стать" ;
beer_N = nChislo "пив" ; beer_N = nChislo "пив" ;
beg_V2V = dirV2 (regV imperfective second "про" "шу" "просил" "проси" "просить" ); beg_V2V = dirV2 (mkVerbum imperfective "прошу" "просишь" "просит" "просим" "просите" "просят" "просил" "проси" "просить" );
big_A = AKakoj_Nibud "больш" "" "больше" ; big_A = AKakoj_Nibud "больш" "" "больше" ;
bike_N = nTelefon "велосипед" ; bike_N = nTelefon "велосипед" ;
bird_N = nEdinica "птиц" ; bird_N = nEdinica "птиц" ;
black_A = AStaruyj "чёрн" "чернее"; black_A = AStaruyj "чёрн" "чернее";
blue_A = AMolodoj "голуб" "голубее"; blue_A = AMolodoj "голуб" "голубее";
boat_N = nMashina "лодк" ; boat_N = nMashina "лодк" ;
book_N = nMashina "книг" ; book_N = nNoga "книг" ;
boot_N = nBank "сапог" ; boot_N = nBank "сапог" ;
boss_N = nStomatolog "начальник" ; boss_N = nStomatolog "начальник" ;
boy_N = nStomatolog "мальчик" ; boy_N = nStomatolog "мальчик" ;
bread_N = nAdres "хлеб" ; bread_N = nAdres "хлеб" ;
break_V2 = dirV2 (regV imperfective first "прерыва" "ю" "прерывал" "прерывай" "прерывать" ); break_V2 = dirV2 (regV imperfective first "прерыва" "ю" "прерывал" "прерывай" "прерывать" );
broad_A = AMalenkij "широк" "шире"; broad_A = AMalenkij "широк" "шире";
brother_N2 = mkN2 (nBrat "брат") ; brother_N2 = mkN2 (nBrat "брат") ;
brown_A = AStaruyj "коричнев" "коричневее"; brown_A = AStaruyj "коричнев" "коричневее";
butter_N = nChislo "масл"; butter_N = nChislo "масл";
@@ -59,7 +59,7 @@ child_N = mkN "ребёнок" "ребёнка" "ребёнку" "ребёнка
come_V = regV imperfective first "прихо" "жу" "приходил" "приходи" "приходить" ; come_V = regV imperfective first "прихо" "жу" "приходил" "приходи" "приходить" ;
computer_N = nTelefon "компьютер" ; computer_N = nTelefon "компьютер" ;
country_N = nMashina "стран" ; country_N = nMashina "стран" ;
cousin_N = nTelefon "кузен" ; cousin_N = nTelefon "кузен" ;
cow_N = nMashina "коров" ; cow_N = nMashina "коров" ;
die_V = regV imperfective first "умира" "ю" "умирал" "умирай" "умирать" ; die_V = regV imperfective first "умира" "ю" "умирал" "умирай" "умирать" ;
dirty_A = AStaruyj "грязн" "грязнее" ; dirty_A = AStaruyj "грязн" "грязнее" ;
@@ -70,7 +70,7 @@ enemy_N = nStomatolog "враг" ;
eat_V2 = dirV2 (regV imperfective first "куша" "ю" "кушал" "кушай" "кушать" ); eat_V2 = dirV2 (regV imperfective first "куша" "ю" "кушал" "кушай" "кушать" );
enemy_N = nStomatolog "враг" ; enemy_N = nStomatolog "враг" ;
factory_N = nNoga "фабрик" ; factory_N = nNoga "фабрик" ;
father_N2 = mkN2 (mkN "отец" "отца" "отцу" "отца" "отцом" "отце" "отцы" "отцов" "отцам" "отцов" "отцами" "отцах" masculine animate); father_N2 = mkN2 (mkN "отец" "отца" "отцу" "отца" "отцом" "отце" "отцы" "отцов" "отцам" "отцов" "отцами" "отцах" masculine animate);
fear_VS= regV imperfective second "бо" "ю" "боял" "бой" "боять" ; fear_VS= regV imperfective second "бо" "ю" "боял" "бой" "боять" ;
find_V2 = dirV2 (mkVerbum imperfective "нахожу" "находишь" "находит" "находим" "находите" "находят" "находил" "находи" "находить" ); find_V2 = dirV2 (mkVerbum imperfective "нахожу" "находишь" "находит" "находим" "находите" "находят" "находил" "находи" "находить" );
fish_N = nMashina "рыб" ; fish_N = nMashina "рыб" ;
@@ -129,7 +129,7 @@ peace_N = nTelefon "мир" ;
old_A = AStaruyj "стар" "старше" ; old_A = AStaruyj "стар" "старше" ;
open_V2= dirV2 (regV imperfective first "открыва" "ю" "открывал" "открывай" "открывать" ); open_V2= dirV2 (regV imperfective first "открыва" "ю" "открывал" "открывай" "открывать" );
paper_N = nNoga "бумаг" ; paper_N = nNoga "бумаг" ;
peace_N = nTelefon "мир" ; peace_N = nTelefon "мир" ;
pen_N = nNoga "ручк" ; pen_N = nNoga "ручк" ;
planet_N = nMashina "планет" ; planet_N = nMashina "планет" ;
plastic_N = nMashina "пластмасс" ; plastic_N = nMashina "пластмасс" ;
@@ -145,7 +145,7 @@ rubber_N = nMashina "резин" ;
river_N = nNoga "рек" ; river_N = nNoga "рек" ;
rock_N = nUroven "кам" ; rock_N = nUroven "кам" ;
roof_N = nEdinica "крыш" ; roof_N = nEdinica "крыш" ;
rubber_N = nMashina "резин" ; rubber_N = nMashina "резин" ;
run_V = regV imperfective first "бега" "ю" "бегал" "бегай" "бегать" ; run_V = regV imperfective first "бега" "ю" "бегал" "бегай" "бегать" ;
say_VS = regV imperfective second "говор" "ю" "говорил" "говори" "говорить" ; say_VS = regV imperfective second "говор" "ю" "говорил" "говори" "говорить" ;
school_N = nMashina "школ" ; school_N = nMashina "школ" ;
@@ -213,7 +213,7 @@ young_A = AMolodoj "молод" "моложе";
now_Adv = mkAdv "сейчас" ; now_Adv = mkAdv "сейчас" ;
already_Adv = mkAdv "уже" ; already_Adv = mkAdv "уже" ;
song_N = nTetya "песн" ; song_N = nTetya "песн" ;
add_V3 = mkV3 (regV imperfective first "складыва" "ю" "складывал" "складывай" "складывать" ) "" "в" accusative accusative; add_V3 = mkV3 (regV imperfective first "складыва" "ю" "складывал" "складывай" "складывать" ) "" "в" accusative accusative;
number_N = nChislo "числ" ; number_N = nChislo "числ" ;
put_V2 = dirV2 (regV imperfective firstE "клад" "у" "клал" "клади" "класть" ); put_V2 = dirV2 (regV imperfective firstE "клад" "у" "клал" "клади" "класть" );
stop_V = regV imperfective first "останавлива" "ю" "останавливал" "останавливай" "останавливать"; stop_V = regV imperfective first "останавлива" "ю" "останавливал" "останавливай" "останавливать";
@@ -221,12 +221,12 @@ distance_N3 = mkN3 (nProizvedenie "расстоян") from_Prep to_Prep ;
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: -- in Russian combinations with verbs are expressed with adverbs:
-- "легко понять" ("easy to understand"), which is different from -- "легко понять" ("easy to understand"), which is different from
-- adjective expression "легкий для понимания" ("easy for understanding") -- adjective expression "легкий для понимания" ("easy for understanding")
-- So the next to words are adjectives, since there are such adjectives -- 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: -- in Russian, but to use them with verb would be wrong in Russian:
fun_AV = AStaruyj "весёл" "веселее"; fun_AV = AStaruyj "весёл" "веселее";
easy_A2V = mkA2 (AMalenkij "лёгк" "легче") "для" genitive ; easy_A2V = mkA2 (AMalenkij "лёгк" "легче") "для" genitive ;
empty_A = AMolodoj "пуст" "пустее"; empty_A = AMolodoj "пуст" "пустее";

View File

@@ -1196,7 +1196,7 @@ oper odinDet: Adjective = {s = table {
AF Gen _ APl => "одних"; AF Gen _ APl => "одних";
AF Inst _ (ASg Masc) => "одним"; AF Inst _ (ASg Masc) => "одним";
AF Inst _ (ASg Fem) => "одной"; AF Inst _ (ASg Fem) => "одной";
AF Inst _ (ASg Neut) => "одним"; AF Inst _ (ASg Neut) => "одним";
AF Inst _ APl => "одними"; AF Inst _ APl => "одними";
AF Dat _ (ASg Masc) => "одному"; AF Dat _ (ASg Masc) => "одному";
AF Dat _ (ASg Fem) => "одной"; AF Dat _ (ASg Fem) => "одной";
@@ -1261,33 +1261,33 @@ oper vesDet: Adjective = {s = table {
AF Dat _ (ASg Masc) => "ему"; AF Dat _ (ASg Masc) => "ему";
AF Dat _ (ASg Fem) => "ей"; AF Dat _ (ASg Fem) => "ей";
AF Dat _ (ASg Neut) => "ему"; AF Dat _ (ASg Neut) => "ему";
AF Dat _ APl => "всем"; AF Dat _ APl => "всем";
AF Prepos _ (ASg Masc) => "всём"; AF Prepos _ (ASg Masc) => "всём";
AF Prepos _ (ASg Fem) => "всей"; AF Prepos _ (ASg Fem) => "всей";
AF Prepos _ (ASg Neut) => "всём"; AF Prepos _ (ASg Neut) => "всём";
AF Prepos _ APl => "всех" ; AF Prepos _ APl => "всех" ;
AdvF => "полностью" AdvF => "полностью"
} }
} ; } ;
oper uy_j_EndDecl : Str -> Adjective = \s ->{s = table { oper uy_j_EndDecl : Str -> Adjective = \s ->{s = table {
AF Nom _ (ASg Masc) => Prelude.glue s "ый"; AF Nom _ (ASg Masc) => s+ "ый";
AF Nom _ (ASg Fem) => Prelude.glue s "ая"; AF Nom _ (ASg Fem) => s + "ая";
AF Nom _ (ASg Neut) => Prelude.glue s "ое"; AF Nom _ (ASg Neut) => s + "ое";
AF Nom _ APl => Prelude.glue s "ые"; AF Nom _ APl => s + "ые";
AF Acc Inanimate (ASg Masc) => Prelude.glue s "ый"; AF Acc Inanimate (ASg Masc) => s + "ый";
AF Acc Animate (ASg Masc) => Prelude.glue s "ого"; AF Acc Animate (ASg Masc) => s + "ого";
AF Acc _ (ASg Fem) => Prelude.glue s "ую"; AF Acc _ (ASg Fem) => s + "ую";
AF Acc _ (ASg Neut) => Prelude.glue s "ое"; AF Acc _ (ASg Neut) => s + "ое";
AF Acc Inanimate APl => Prelude.glue s "ые"; AF Acc Inanimate APl => s + "ые";
AF Acc Animate APl => Prelude.glue s "ых"; AF Acc Animate APl => s + "ых";
AF Gen _ (ASg Masc) => Prelude.glue s "ого"; AF Gen _ (ASg Masc) => s + "ого";
AF Gen _ (ASg Fem) => Prelude.glue s "ой"; AF Gen _ (ASg Fem) => s + "ой";
AF Gen _ (ASg Neut) => Prelude.glue s "ого"; AF Gen _ (ASg Neut) => s + "ого";
AF Gen _ APl => Prelude.glue s "ых"; AF Gen _ APl => s + "ых";
AF Inst _ (ASg Masc) => Prelude.glue s "ым"; AF Inst _ (ASg Masc) => s + "ым";
AF Inst _ (ASg Fem) => Prelude.glue s "ой"; AF Inst _ (ASg Fem) => s + "ой";
AF Inst _ (ASg Neut) => Prelude.glue s "ым"; AF Inst _ (ASg Neut) => s + "ым";
AF Inst _ APl => Prelude.glue s "ыми"; AF Inst _ APl => s + "ыми";
AF Dat _ (ASg Masc) => s + "ому"; AF Dat _ (ASg Masc) => s + "ому";
AF Dat _ (ASg Fem) => s + "ой"; AF Dat _ (ASg Fem) => s + "ой";
AF Dat _ (ASg Neut) => s + "ому"; AF Dat _ (ASg Neut) => s + "ому";
@@ -1317,7 +1317,7 @@ oper ti_j_EndDecl : Str -> Adjective = \s ->{s = table {
AF Inst _ (ASg Masc) => s+"ьим"; AF Inst _ (ASg Masc) => s+"ьим";
AF Inst _ (ASg Fem) => s+"ьей"; AF Inst _ (ASg Fem) => s+"ьей";
AF Inst _ (ASg Neut) => s+"ьим"; AF Inst _ (ASg Neut) => s+"ьим";
AF Inst _ APl => s+"ьими"; AF Inst _ APl => s+"ьими";
AF Dat _ (ASg Masc) => s+"ьему"; AF Dat _ (ASg Masc) => s+"ьему";
AF Dat _ (ASg Fem) => s+"ьей"; AF Dat _ (ASg Fem) => s+"ьей";
AF Dat _ (ASg Neut) => s+"ьему"; AF Dat _ (ASg Neut) => s+"ьему";
@@ -1348,7 +1348,7 @@ oper ti_j_EndDecl : Str -> Adjective = \s ->{s = table {
-- AF Inst _ (ASg Masc) => s+"им"; -- AF Inst _ (ASg Masc) => s+"им";
-- AF Inst _ (ASg Fem) => s+"ей"; -- AF Inst _ (ASg Fem) => s+"ей";
-- AF Inst _ (ASg Neut) => s+"им"; -- AF Inst _ (ASg Neut) => s+"им";
-- AF Inst _ APl => s+"ими"; -- AF Inst _ APl => s+"ими";
-- AF Dat _ (ASg Masc) => s+"ему"; -- AF Dat _ (ASg Masc) => s+"ему";
-- AF Dat _ (ASg Fem) => s+"ей"; -- AF Dat _ (ASg Fem) => s+"ей";
-- AF Dat _ (ASg Neut) => s+"ему"; -- AF Dat _ (ASg Neut) => s+"ему";
@@ -1388,7 +1388,7 @@ oper ij_EndK_G_KH_Decl : Str -> Adjective = \s ->{s = table {
AF Inst _ (ASg Masc) => s+"им"; AF Inst _ (ASg Masc) => s+"им";
AF Inst _ (ASg Fem) => s+"ой"; AF Inst _ (ASg Fem) => s+"ой";
AF Inst _ (ASg Neut) => s+"им"; AF Inst _ (ASg Neut) => s+"им";
AF Inst _ APl => s+"ими"; AF Inst _ APl => s+"ими";
AF Dat _ (ASg Masc) => s+"ому"; AF Dat _ (ASg Masc) => s+"ому";
AF Dat _ (ASg Fem) => s+"ой"; AF Dat _ (ASg Fem) => s+"ой";
AF Dat _ (ASg Neut) => s+"ому"; AF Dat _ (ASg Neut) => s+"ому";
@@ -1418,7 +1418,7 @@ oper shij_End_Decl : Str -> Adjective = \s ->{s = table {
AF Inst _ (ASg Masc) => s+"им"; AF Inst _ (ASg Masc) => s+"им";
AF Inst _ (ASg Fem) => s+"ей"; AF Inst _ (ASg Fem) => s+"ей";
AF Inst _ (ASg Neut) => s+"им"; AF Inst _ (ASg Neut) => s+"им";
AF Inst _ APl => s+"ими"; AF Inst _ APl => s+"ими";
AF Dat _ (ASg Masc) => s+"ему"; AF Dat _ (ASg Masc) => s+"ему";
AF Dat _ (ASg Fem) => s+"ей"; AF Dat _ (ASg Fem) => s+"ей";
AF Dat _ (ASg Neut) => s+"ему"; AF Dat _ (ASg Neut) => s+"ему";
@@ -1430,7 +1430,7 @@ oper i_oj_EndDecl : Str -> Str -> Adjective = \s, chastica ->{s = table {
AdvF => s + "о" AdvF => s + "о"
} }
} ; } ;
--oper bolshoj: AdjDegr = mkAdjDeg (i_oj_EndDecl "больш" []) "больше"; --oper bolshoj: AdjDegr = mkAdjDeg (i_oj_EndDecl "больш" []) "больше";
--oper dorogoj: AdjDegr = mkAdjDeg (i_oj_EndDecl "дорог" []) "дороже"; --oper dorogoj: AdjDegr = mkAdjDeg (i_oj_EndDecl "дорог" []) "дороже";
oper i_oj_EndDecl : Str -> Str -> Adjective = \s, chastica ->{s = table { oper i_oj_EndDecl : Str -> Str -> Adjective = \s, chastica ->{s = table {
@@ -1439,7 +1439,8 @@ oper i_oj_EndDecl : Str -> Str -> Adjective = \s, chastica ->{s = table {
AF Nom _ (ASg Neut) => s+"ое"+ chastica ; AF Nom _ (ASg Neut) => s+"ое"+ chastica ;
AF Nom _ APl => s+"ие"+ chastica ; AF Nom _ APl => s+"ие"+ chastica ;
AF Acc Animate (ASg Masc) => 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 _ (ASg Neut) => s+"ое"+ chastica ;
AF Acc Animate APl => s+"их"+ chastica ; AF Acc Animate APl => s+"их"+ chastica ;
AF Acc Inanimate APl => s+"ие"+ chastica ; AF Acc Inanimate APl => s+"ие"+ chastica ;
@@ -1450,7 +1451,7 @@ oper i_oj_EndDecl : Str -> Str -> Adjective = \s, chastica ->{s = table {
AF Inst _ (ASg Masc) => s+"им"+ chastica ; AF Inst _ (ASg Masc) => s+"им"+ chastica ;
AF Inst _ (ASg Fem) => s+"ой"+ chastica ; AF Inst _ (ASg Fem) => s+"ой"+ chastica ;
AF Inst _ (ASg Neut) => s+"им"+ chastica ; AF Inst _ (ASg Neut) => s+"им"+ chastica ;
AF Inst _ APl => s+"ими"+ chastica ; AF Inst _ APl => s+"ими"+ chastica ;
AF Dat _ (ASg Masc) => s+"ому"+ chastica ; AF Dat _ (ASg Masc) => s+"ому"+ chastica ;
AF Dat _ (ASg Fem) => s+"ой"+ chastica ; AF Dat _ (ASg Fem) => s+"ой"+ chastica ;
@@ -1482,7 +1483,7 @@ oper uy_oj_EndDecl : Str -> Adjective = \s ->{s = table {
AF Gen _ APl => s+"ых"; AF Gen _ APl => s+"ых";
AF Inst _ (ASg Masc) => s+"ым"; AF Inst _ (ASg Masc) => s+"ым";
AF Inst _ (ASg Fem) => s+"ой"; AF Inst _ (ASg Fem) => s+"ой";
AF Inst _ (ASg Neut) => s+"ым"; AF Inst _ (ASg Neut) => s+"ым";
AF Inst _ APl => s+"ыми"; AF Inst _ APl => s+"ыми";
AF Dat _ (ASg Masc) => s+"ому"; AF Dat _ (ASg Masc) => s+"ому";
AF Dat _ (ASg Fem) => s+"ой"; AF Dat _ (ASg Fem) => s+"ой";
@@ -1493,7 +1494,7 @@ oper uy_oj_EndDecl : Str -> Adjective = \s ->{s = table {
AF Prepos _ (ASg Neut) => s+"ом"; AF Prepos _ (ASg Neut) => s+"ом";
AF Prepos _ APl => s+"ых"; AF Prepos _ APl => s+"ых";
AdvF => s + "о" AdvF => s + "о"
} }
} ; } ;
--oper prostuzhen: Adjective = shortDecl1 "простужен" ; --oper prostuzhen: Adjective = shortDecl1 "простужен" ;
--oper beremenen: Adjective = shortDecl "беремен" ; --oper beremenen: Adjective = shortDecl "беремен" ;
@@ -1501,7 +1502,7 @@ oper uy_oj_EndDecl : Str -> Adjective = \s ->{s = table {
--oper shortDecl1 : Str -> Adjective = \s ->{s = table { --oper shortDecl1 : Str -> Adjective = \s ->{s = table {
-- AF _ _ (ASg Masc) => s; -- AF _ _ (ASg Masc) => s;
-- AF _ _ (ASg Fem) => s+"а"; -- AF _ _ (ASg Fem) => s+"а";
-- AF _ _ (ASg Neut) => s+"о"; -- AF _ _ (ASg Neut) => s+"о";
-- AF _ _ APl => s+"ы" ; -- AF _ _ APl => s+"ы" ;
-- AdvF => s + "о" -- AdvF => s + "о"
-- } -- }
@@ -1522,13 +1523,14 @@ oper uy_oj_EndDecl : Str -> Adjective = \s ->{s = table {
-- --
---- 2 Verbs ---- 2 Verbs
-- --
---- Dummy verbum "have" that corresponds to the phrases like
---- "I have a headache" in English. The corresponding sentence ---- "I have a headache" in English. The corresponding sentence
---- in Russian doesn't contain a verb: ---- in Russian doesn't contain a verb:
---- in Russian doesn't contain a verb:
-- --
--oper have: Verbum = {s=\\ vf => "-" ; asp = Imperfective} ;
-- --
---- There are two common conjugations ---- There are two common conjugations
---- There are two common conjugations ---- (according to the number and the person of the subject)
---- patterns in the present tense in the indicative mood. ---- patterns in the present tense in the indicative mood.
-- --
param Conjugation = First | FirstE | Second | Mixed | Dolzhen; param Conjugation = First | FirstE | Second | Mixed | Dolzhen;
@@ -1537,26 +1539,33 @@ oper verbIdti : Verbum = verbDecl Imperfective First "ид" "у" "шел" "ид
--3 First conjugation (in Present) verbs : --3 First conjugation (in Present) verbs :
oper verbIdti : Verbum = verbDecl Imperfective First "ид" "у" "шел" "иди" "идти"; oper verbIdti : Verbum = verbDecl Imperfective First "ид" "у" "шел" "иди" "идти";
--oper verbGulyat : Verbum = verbDecl Imperfective First "гуля" "ю" "гулял" "гуляй" "гулять";
--oper verbGulyat : Verbum = verbDecl Imperfective First "гуля" "ю" "гулял" "гуляй" "гулять"; --oper verbGulyat : Verbum = verbDecl Imperfective First "гуля" "ю" "гулял" "гуляй" "гулять";
--oper verbSuchestvovat : Verbum = verbDecl Imperfective First "существу" "ю" "существовал" "существуй" "существовать";
--oper verbVkluchat : 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 verbVukluchat : Verbum = verbDecl Imperfective First "выключа" "ю" "выключал" "выключай" "выключать";
--oper verbZhdat : Verbum = verbDecl Imperfective First "жд" "у" "ждал" "жди" "ждать" ; --oper verbZhdat : Verbum = verbDecl Imperfective First "жд" "у" "ждал" "жди" "ждать" ;
--oper verbBegat : Verbum = verbDecl Imperfective First "бега" "ю" "бегал" "бегай" "бегать"; --oper verbBegat : Verbum = verbDecl Imperfective First "бега" "ю" "бегал" "бегай" "бегать";
--oper verbPrinimat : Verbum = verbDecl Imperfective First "принима" "ю" "принимал" "принимай" "принимать";
--oper verbDokazuvat : Verbum = verbDecl Imperfective First "доказыва" "ю" "доказывал" "доказывай" "доказывать";
--oper verbPredpochitat : Verbum = verbDecl Imperfective First "предпочита" "ю" "предпочитал" "предпочитай" "предпочитать";
--oper verbOtpravlyat : Verbum = verbDecl Imperfective First "отправля" "ю" "отправлял" "отправляй" "отправлять";
--oper verbSlomat : Verbum = verbDecl Perfective First "слома" "ю" "сломал" "сломай" "сломать";
---- Verbs with vowel "ё": "даёшь" (give), "пьёшь" (drink) : ---- Verbs with vowel "ё": "даёшь" (give), "пьёшь" (drink) :
--oper verbDavat : Verbum = verbDecl Imperfective FirstE "да" "ю" "давал" "давай" "давать"; --oper verbDavat : Verbum = verbDecl Imperfective FirstE "да" "ю" "давал" "давай" "давать";
--oper verbPit : Verbum = verbDecl Imperfective FirstE "пь" "ю" "пил" "пей" "пить"; --oper verbPit : Verbum = verbDecl Imperfective FirstE "пь" "ю" "пил" "пей" "пить";
--
oper verbByut : Verbum = verbDecl Perfective First "буд" "у" "был" "будь" "быть";
oper verbMoch : Verbum = verbDeclMoch Imperfective First "мог" "у" "мог" "моги" "мочь" "мож"; oper verbMoch : Verbum = verbDeclMoch Imperfective First "мог" "у" "мог" "моги" "мочь" "мож";
----3 Second conjugation (in Present) verbs : ----3 Second conjugation (in Present) verbs :
-- --
--oper verbLubit : Verbum = verbDecl Imperfective Second "люб" "лю" "любил" "люби" "любить"; --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 "поран" "ю" "поранил" "порань" "поранить"; --oper verbPoranit : Verbum = verbDecl Perfective Second "поран" "ю" "поранил" "порань" "поранить";
@@ -1708,10 +1717,10 @@ oper mkPassive: AspectVoice -> PastVerb -> AspectVoice = \av, pv ->
-- vowels : Strs = strs { -- vowels : Strs = strs {
-- "а" ; "е" ; "ё" ; "и" ; "о" ; "у" ; -- "а" ; "е" ; "ё" ; "и" ; "о" ; "у" ;
-- vowels : Strs = strs { -- "ы" ; "э" ; "ю" ; "я"
-- "а" ; "е" ; "ё" ; "и" ; "о" ; "у" ; -- } ;
-- "ы" ; "э" ; "ю" ; "я" --
-- } ; oper mkPassive: AspectVoice -> PastVerb -> AspectVoice = \av, pv ->
{ s = table { { s = table {
VINF => av.s ! VINF + "ся"; VINF => av.s ! VINF + "ся";
VIMP Sg P1 => av.s ! (VIMP Sg P1) +"сь" ; VIMP Sg P1 => av.s ! (VIMP Sg P1) +"сь" ;
@@ -1743,28 +1752,28 @@ oper
VIND (ASg Masc) VPast => av.s ! (VIND (ASg Masc) VPast ) + "ся"; VIND (ASg Masc) VPast => av.s ! (VIND (ASg Masc) VPast ) + "ся";
VIND (ASg Fem) VPast => av.s ! (VIND (ASg Fem) VPast ) + "сь"; VIND (ASg Fem) VPast => av.s ! (VIND (ASg Fem) VPast ) + "сь";
VIND (ASg Neut) VPast => av.s ! (VIND (ASg Neut) VPast) + "сь"; VIND (ASg Neut) VPast => av.s ! (VIND (ASg Neut) VPast) + "сь";
VIND (ASg Fem) VPast => av.s ! (VIND (ASg Fem) VPast ) + "сь"; VIND APl VPast => av.s ! (VIND APl VPast ) + "сь"
VIND (ASg Neut) VPast => av.s ! (VIND (ASg Neut) VPast) + "сь"; } ;
asp = av.asp asp = av.asp
}; };
asp = av.asp
}; -- Generation the imperfective active pattern given
-- a number of basic conjugation forms.
-- Generation the imperfective active pattern given
-- a number of basic conjugation forms. oper
imperfectiveActivePattern : Str -> Str -> PresentVerb -> PastVerb -> AspectVoice =
\inf, imper, presentFuture, past -> { s= table { \inf, imper, presentFuture, past -> { s= table {
VINF => inf ; VINF => inf ;
VIMP Sg P1 => "давайте" ++ inf ; VIMP Sg P1 => "давайте" ++ inf ;
VIMP Pl P1 => "давайте" ++ inf ; VIMP Pl P1 => "давайте" ++ inf ;
VIMP Sg P2 => imper ; VIMP Sg P2 => imper ;
VIMP Pl P2 => imper+"те" ; VIMP Pl P2 => imper+"те" ;
VIMP Sg P2 => imper ; VIMP Sg P3 => "пусть" ++ presentFuture ! (PRF (ASg Masc) P3) ;
VIMP Pl P2 => imper+"те" ; VIMP Pl P3 => "пусть" ++ presentFuture ! (PRF APl P3) ;
VIMP Sg P3 => ["пускай "] + presentFuture ! (PRF (ASg Masc) P3) ; VSUB (ASg Masc) => past ! (PSF (ASg Masc)) ++"бы";
VIMP Pl P3 => ["пускай "] + presentFuture ! (PRF APl P3) ; VSUB (ASg Fem) => past ! (PSF (ASg Fem)) ++"бы";
VSUB (ASg Masc) => past ! (PSF (ASg Masc)) +[" бы"]; VSUB (ASg Neut) => past ! (PSF (ASg Neut) )++"бы";
VSUB (ASg Fem) => past ! (PSF (ASg Fem)) +[" бы"]; VSUB APl => past ! (PSF APl) ++"бы";
VIND (ASg _) (VPresent P1) => presentFuture ! ( PRF (ASg Masc) P1); VIND (ASg _) (VPresent P1) => presentFuture ! ( PRF (ASg Masc) P1);
VIND (ASg _) (VPresent P2) => presentFuture! (PRF (ASg Masc) P2) ; VIND (ASg _) (VPresent P2) => presentFuture! (PRF (ASg Masc) P2) ;
VIND (ASg _) (VPresent P3) => presentFuture ! (PRF (ASg Masc) P3) ; VIND (ASg _) (VPresent P3) => presentFuture ! (PRF (ASg Masc) P3) ;
@@ -1776,17 +1785,17 @@ oper
VIND (ASg _) (VFuture P3) => "будет" ++ inf ; VIND (ASg _) (VFuture P3) => "будет" ++ inf ;
VIND APl (VFuture P1) => "будем" ++ inf ; VIND APl (VFuture P1) => "будем" ++ inf ;
VIND APl (VFuture P2) => "будете" ++ inf ; VIND APl (VFuture P2) => "будете" ++ inf ;
VIND APl (VFuture P1) => ["будем "] + presentFuture ! (PRF APl P1) ; VIND APl (VFuture P3) => "будут" ++ inf ;
VIND APl (VFuture P2) => ["будете "] + presentFuture ! (PRF APl P2) ; VIND (ASg Masc) VPast => past ! (PSF (ASg Masc)) ;
VIND (ASg Fem) VPast => past ! (PSF (ASg Fem) ) ; VIND (ASg Fem) VPast => past ! (PSF (ASg Fem) ) ;
VIND (ASg Neut) VPast => past ! (PSF (ASg Neut)) ; VIND (ASg Neut) VPast => past ! (PSF (ASg Neut)) ;
VIND (ASg Fem) VPast => past ! (PSF (ASg Fem) ) ; VIND APl VPast => past ! (PSF APl)
VIND (ASg Neut) VPast => past ! (PSF (ASg Neut)) ; } ;
VIND APl VPast => past ! (PSF APl) asp = Imperfective
} ; } ;
} ; oper perfectiveActivePattern: Str -> Str -> PresentVerb -> PastVerb -> AspectVoice =
\inf, imper, presentFuture, past -> { s= table {
VINF => inf ; VINF => inf ;
VIMP Sg P1 => "давайте"++ presentFuture ! (PRF (ASg Masc) P1); VIMP Sg P1 => "давайте"++ presentFuture ! (PRF (ASg Masc) P1);
VIMP Pl P1 => "давайте" ++ presentFuture ! (PRF APl P1); VIMP Pl P1 => "давайте" ++ presentFuture ! (PRF APl P1);

View File

@@ -16,7 +16,7 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
n = kazhduj.n ; n = kazhduj.n ;
p = P3 ; p = P3 ;
pron = False; pron = False;
g = kazhduj.g ; g = case kazhduj.g of { PNoGen => (PGen okhotnik.g); _ => kazhduj.g };
anim = okhotnik.anim anim = okhotnik.anim
} ; } ;
@@ -87,8 +87,8 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
-- 3 => (ti_j_EndDecl n.s) ; -- 3 => (ti_j_EndDecl n.s) ;
-- _ => uy_j_EndDecl n.s } ; -- _ => uy_j_EndDecl n.s } ;
OrdNumeral numeral = -- OrdNumeral numeral =
{s = \\ af => (uy_j_EndDecl (numeral.s ! caseAF af ! genAF af)).s!af} ; -- {s = \\ af => (uy_j_EndDecl (numeral.s ! caseAF af ! genAF af)).s!af} ;
NumNumeral n = n ; 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...". -- first place as common nouns, so that one can also have "a suggestion that...".
SentCN idea x = 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 g = idea.g; anim = idea.anim
} ; } ;
RelCN idea x = 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 g = idea.g; anim = idea.anim
} ; } ;

View File

@@ -2,16 +2,16 @@
--1 Russian Lexical Paradigms --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 -- for adding lexical items. It gives functions for forming
-- expressions of open categories: nouns, adjectives, verbs. -- expressions of open categories: nouns, adjectives, verbs.
-- --
-- Closed categories (determiners, pronouns, conjunctions) are -- Closed categories (determiners, pronouns, conjunctions) are
-- accessed through the resource syntax API, $Structural.gf$. -- 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 -- referred to are compiled resource grammar types. We have moreover
-- had the design principle of always having existing forms, rather -- had the design principle of always having existing forms, rather
-- than stems, as string arguments of the paradigms. -- than stems, as string arguments of the paradigms.
@@ -20,9 +20,6 @@
-- first we give a handful of patterns that aim to cover all -- 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 -- regular cases. Then we give a worst-case function $mkC$, which serves as an
-- escape to construct the most irregular words of type $C$. -- 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: -- The following modules are presupposed:
@@ -85,7 +82,8 @@ oper
-- to the Nominative or the Genetive one) is actually of no help, -- 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. -- 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 ;
-- мужчина, мужчины, мужчине, мужчину, мужчиной, мужчине -- мужчина, мужчины, мужчине, мужчину, мужчиной, мужчине
-- мужчины, мужчин, мужчинам, мужчин, мужчинами, мужчинах -- мужчины, мужчин, мужчинам, мужчин, мужчинами, мужчинах
@@ -143,7 +141,6 @@ nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-л
-- Proper names. -- Proper names.
mkPN : Str -> Gender -> Animacy -> PN ; -- "Иван", "Маша" mkPN : Str -> Gender -> Animacy -> PN ; -- "Иван", "Маша"
regPN : Str -> PN ;
nounPN : N -> PN ; nounPN : N -> PN ;
-- On the top level, it is maybe $CN$ that is used rather than $N$, and -- 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: -- forms in the worst case:
-- Masculine | Feminine | Neutral | Plural -- (Masculine | Feminine | Neutral | Plural) *
-- Nominative
-- Genitive -- (Nominative | Genitive | Dative | Accusative Inanimate | Accusative Animate |
-- Dative -- Instructive | Prepositional)
-- Accusative Inanimate
-- Accusative Animate
-- Instructive
-- Prepositional
-- Notice that 4 short forms, which exist for some adjectives are not included -- Notice that 4 short forms, which exist for some adjectives are not included
@@ -176,10 +169,12 @@ nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-л
-- mkA : ( : Str) -> A ; -- mkA : ( : Str) -> A ;
-- The regular function captures the variants for some popular adjective -- 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 ; regA : Str -> Str -> A ;
-- Invariable adjective is a special case. -- Invariable adjective is a special case.
adjInvar : Str -> A ; -- khaki, mini, hindi, netto adjInvar : Str -> A ; -- khaki, mini, hindi, netto
@@ -200,11 +195,11 @@ nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-л
-- Comparison adjectives need a positive adjective -- Comparison adjectives need a positive adjective
-- (28 forms without short forms). -- (28 forms without short forms).
-- Taking only one comparative form (non-syntaxic) and -- Taking only one comparative form (non-syntactic) and
-- only one superlative form (syntaxic) we can produce the -- only one superlative form (syntactic) we can produce the
-- comparison adjective with only one extra argument - -- comparison adjective with only one extra argument -
-- non-syntaxic comparative form. -- non-syntactic comparative form.
-- Syntaxic forms are based on the positive forms. -- Syntactic forms are based on the positive forms.
-- mkADeg : A -> Str -> ADeg ; -- mkADeg : A -> Str -> ADeg ;
@@ -215,8 +210,7 @@ nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-л
--2 Adverbs --2 Adverbs
-- Adverbs are not inflected. Most lexical ones have position -- Adverbs are not inflected.
-- after the verb. Some can be preverbal (e.g. "always").
mkAdv : Str -> Adv ; mkAdv : Str -> Adv ;
@@ -228,12 +222,11 @@ nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-л
-- 4(GenNum)(past) ](indicative)+ 4 (GenNum) (subjunctive) } -- 4(GenNum)(past) ](indicative)+ 4 (GenNum) (subjunctive) }
-- Participles (Present and Past) and Gerund forms are not included, -- Participles (Present and Past) and Gerund forms are not included,
-- since they fuction more like Adjectives and Adverbs correspondingly -- since they fuction more like Adjectives and Adverbs correspondingly
-- rather than verbs. Aspect regarded as an inherent parameter of a verb. -- rather than verbs. Aspect is regarded as an inherent parameter of a verb.
-- Notice, that some forms are never used for some verbs. Actually, -- Notice, that some forms are never used for some verbs.
-- the majority of verbs do not have many of the forms.
Voice: Type; Voice: Type;
Aspect: Type; Aspect: Type;
--Tense : Type;
Bool: Type; Bool: Type;
Conjugation: Type ; Conjugation: Type ;
@@ -250,8 +243,6 @@ active: Voice ;
passive: Voice ; passive: Voice ;
imperfective: Aspect; imperfective: Aspect;
perfective: Aspect ; perfective: Aspect ;
--present : Tense ;
--past : Tense ;
-- The worst case need 6 forms of the present tense in indicative mood -- The worst case need 6 forms of the present tense in indicative mood
@@ -260,7 +251,9 @@ perfective: Aspect ;
-- (singular, second person: "беги"), an infinitive ("бежать"). -- (singular, second person: "беги"), an infinitive ("бежать").
-- Inherent aspect should also be specified. -- 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: -- Common conjugation patterns are two conjugations:
-- first - verbs ending with "-ать/-ять" and second - "-ить/-еть". -- first - verbs ending with "-ать/-ять" and second - "-ить/-еть".
@@ -273,7 +266,8 @@ perfective: Aspect ;
-- So the definition for verb "любить" looks like: -- So the definition for verb "любить" looks like:
-- regV Imperfective Second "люб" "лю" "любил" "люби" "любить"; -- 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 -- For writing an application grammar one usualy doesn't need
-- the whole inflection table, since each verb is used in -- the whole inflection table, since each verb is used in
@@ -294,10 +288,9 @@ perfective: Aspect ;
dirV2 : V -> V2 ; -- "видеть", "любить" dirV2 : V -> V2 ; -- "видеть", "любить"
tvDirDir : V -> V3 ; tvDirDir : V -> V3 ;
--.
-- The definitions should not bother the user of the API. So they are -- The definitions should not bother the user of the API. So they are
-- hidden from the document. -- hidden from the document.
--.
Gender = MorphoRus.Gender ; Gender = MorphoRus.Gender ;
Case = MorphoRus.Case ; Case = MorphoRus.Case ;
Number = MorphoRus.Number ; Number = MorphoRus.Number ;
@@ -452,8 +445,6 @@ regN = \ray ->
Masc => mkProperNameMasc ivan anim ; Masc => mkProperNameMasc ivan anim ;
_ => mkProperNameFem ivan anim _ => mkProperNameFem ivan anim
} ** {lock_PN =<>}; } ** {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=<>}; nounPN n = {s=\\c => n.s! SF Sg c; anim=n.anim; g=n.g; lock_PN=<>};
mkCN = UseN; mkCN = UseN;

View File

@@ -20,7 +20,8 @@ concrete RelativeRus of Relative = CatRus ** open ResRus, MorphoRus in {
-- deferred to $ExtRus.gf$ ("at which we are looking"). -- deferred to $ExtRus.gf$ ("at which we are looking").
RelSlash kotoruj yaVizhu = 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 ++ yaVizhu.s!b!clf
} ; } ;

View File

@@ -107,6 +107,7 @@ oper
PNoGen => variants {Masc ; Fem} --- the best we can do for ya, tu PNoGen => variants {Masc ; Fem} --- the best we can do for ya, tu
} ; } ;
oper oper
extCase: PronForm -> Case = \pf -> case pf of extCase: PronForm -> Case = \pf -> case pf of
{ PF Nom _ _ => Nom ; { PF Nom _ _ => Nom ;
@@ -194,7 +195,7 @@ oper
case t of { Present => VPresent p ; PastRus => VPast; Future => VFuture p } ; case t of { Present => VPresent p ; PastRus => VPast; Future => VFuture p } ;
getTense : Tense -> RusTense= \t -> getTense : Tense -> RusTense= \t ->
case t of { Pres => Present ; Past => PastRus; _ => Future} ; case t of { Pres => Present ; Fut => Future; _ => PastRus} ;
getVoice: VerbForm -> Voice = \vf -> getVoice: VerbForm -> Voice = \vf ->
@@ -267,6 +268,15 @@ oper
ClImper => VFORM Act (VIMP n p) 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$ --2 For $Adjective$
param param
@@ -275,13 +285,25 @@ param
oper oper
Complement = {s2 : Str ; c : Case} ; 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 -> pgNum : PronGen -> Number -> GenNum = \g,n ->
case n of case n of
{ Sg => case g of { Sg => case g of
{ PGen Fem => ASg Fem ; { PGen Fem => ASg Fem ;
PGen Masc => ASg Masc ; PGen Masc => ASg Masc ;
PGen Neut => ASg Neut ; PGen Neut => ASg Neut ;
_ => ASg Masc } ; _ => ASg Masc } ; -- assuming pronoun "I" is a male
Pl => APl Pl => APl
} ; } ;
-- _ => variants {ASg Masc ; ASg Fem} } ; -- _ => variants {ASg Masc ; ASg Fem} } ;
@@ -293,7 +315,7 @@ oper numGNum : GenNum -> Number = \gn ->
case gn of { APl => Pl ; _ => Sg } ; case gn of { APl => Pl ; _ => Sg } ;
oper genGNum : GenNum -> Gender = \gn -> 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 -> oper numAF: AdjForm -> Number = \af ->
case af of { AdvF => Sg; AF _ _ gn => (numGNum gn) } ; case af of { AdvF => Sg; AF _ _ gn => (numGNum gn) } ;

View File

@@ -16,12 +16,13 @@ concrete SentenceRus of Sentence = CatRus ** open Prelude, ResRus in {
}); });
ne = case b of {Pos=>""; Neg=>"не"}; ne = case b of {Pos=>""; Neg=>"не"};
vizhu = tebyaNeVizhu.s ! clf ! (pgNum Ya.g Ya.n)! Ya.p;
khorosho = tebyaNeVizhu.s2 ; khorosho = tebyaNeVizhu.s2 ;
tebya = tebyaNeVizhu.s3 ! (pgen2gen Ya.g) ! Ya.n tebya = tebyaNeVizhu.s3 ! (pgen2gen Ya.g) ! Ya.n
} }
in in
if_then_else Str tebyaNeVizhu.negBefore if_then_else Str tebyaNeVizhu.negBefore
(ya ++ ne ++ vizhu ++ tebya) (ya ++ ne ++ vizhu ++ tebya ++ khorosho)
(ya ++ vizhu ++ ne ++ tebya ++ khorosho) (ya ++ vizhu ++ ne ++ tebya ++ khorosho)
} ; } ;
@@ -61,19 +62,26 @@ concrete SentenceRus of Sentence = CatRus ** open Prelude, ResRus in {
dont = case pol of { dont = case pol of {
Neg => "не" ; Neg => "не" ;
_ => [] _ => []
} }
in in
dont ++ inf.s ! ClImper ! (gNum g n )!P2 ++ dont ++ inf.s ! ClImper ! (gNum g n )!P2 ++
inf.s2++inf.s3!g!n inf.s2++inf.s3!g!n
} ; } ;
EmbedS s = {s = "что" ++ s.s} ; EmbedS s = {s = "что" ++ s.s} ;
-- In Russian "Whether you go" transformed in "go whether you": -- In Russian "Whether you go" transformed in "go whether you":
EmbedQS qs = {s = qs.s ! QIndir} ; 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 = case t.t of {
Cond => cl.s! p.p ! ClCondit ; Cond => cl.s! p.p ! ClCondit ;
UseCl t a p cl = {s = cl.s! p.p ! ClIndic (getTense t.t) a.a}; _ => cl.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 ; Cond => [", "] ++ rcl.s! p.p ! ClCondit ! gn !c !anim ;
_ => [", "] ++ rcl.s! p.p ! ClIndic (getTense t.t) a.a !gn !c !anim}}; _ => [", "] ++ rcl.s! p.p ! ClIndic (getTense t.t) a.a !gn !c !anim}};

View File

@@ -45,13 +45,13 @@ lin
here7to_Adv = ss "сюда" ; here7to_Adv = ss "сюда" ;
here7from_Adv = ss "отсюда" ; here7from_Adv = ss "отсюда" ;
how_IAdv = 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 ; i_Pron = pronYa ;
if_Subj = ss "если" ; if_Subj = ss "если" ;
in8front_Prep = { s = "перед" ; c = Inst}; in8front_Prep = { s = "перед" ; c = Inst};
in_Prep = { s = "в" ; c = Prepos }; in_Prep = { s = "в" ; c = Prepos };
it_Pron = pronOno ; it_Pron = pronOno ;
less_CAdv = ss "меньше" ; less_CAdv = ss "менее" ;
many_Det = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ; many_Det = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
more_CAdv = ss "более" ; more_CAdv = ss "более" ;
most_Predet = bolshinstvoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ; most_Predet = bolshinstvoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;

View File

@@ -188,7 +188,8 @@ concrete VerbRus of Verb = CatRus ** open ResRus, Prelude in {
s3 = \\g,n => "" s3 = \\g,n => ""
} ; } ;
-- To generate "can walk"/"can't walk"; "tries to walk"/"does not try to walk": -- 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 contraction of "not" is not provided, since it would require changing
-- the verb parameter type.
ComplVV putatsya bezhat = ComplVV putatsya bezhat =
{ s = \\clf,gn,p => putatsya.s ! (getActVerbForm clf (genGNum gn) { s = \\clf,gn,p => putatsya.s ! (getActVerbForm clf (genGNum gn)
@@ -213,7 +214,10 @@ concrete VerbRus of Verb = CatRus ** open ResRus, Prelude in {
w = Act; w = Act;
negBefore = True; negBefore = True;
s2 = ""; s2 = "";
s3 = \\g,n => molodoj.s!(AF Inst Animate (gNum g n)) s3 = \\g,n => molodoj.s!(AF Inst Animate (gNum g n))
} ;
ComplV2A obechat tu molodoj =
{s = \\clf,gn,p => obechat.s2++ {s = \\clf,gn,p => obechat.s2++
obechat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ obechat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++
tu.s ! PF obechat.c No NonPoss ++ tu.s ! PF obechat.c No NonPoss ++
@@ -225,11 +229,11 @@ concrete VerbRus of Verb = CatRus ** open ResRus, Prelude in {
s3 = \\g,n =>"" s3 = \\g,n =>""
} ; } ;
AdvVP poet khorosho = AdvVP poet khorosho =
{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 = poet.s2 ++ khorosho.s; s3 = poet.s3;
asp = poet.asp; w = poet.w; t = poet.t ; negBefore = poet.negBefore } ; asp = poet.asp; w = poet.w; t = poet.t ; negBefore = poet.negBefore } ;
AdVVP khorosho poet = 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 } ; asp = poet.asp; w = poet.w; t = poet.t ; negBefore = poet.negBefore } ;
PassV2 se = PassV2 se =