1
0
forked from GitHub/gf-core
This commit is contained in:
janna
2005-11-25 20:02:53 +00:00
parent 08d75593c3
commit 0b3d28f6d9
9 changed files with 683 additions and 56 deletions

View File

@@ -0,0 +1,206 @@
--# -path=.:../abstract:../../prelude
--# -val
concrete BasicRus of Basic = CategoriesRus ** open ParadigmsRus in {
flags
optimize=values ;
coding=utf8 ;
lin
airplane_N = nTelefon "самолет" ;
answer_V2S = mkV2S (caseV2 (regV "vastata") allative) ;
apartment_N = nMashina "квартир" ;
apple_N = nChislo "яблок" ;
art_N = nChislo "искусств" ;
ask_V2Q = mkV2Q (caseV2 (regV "kysyä") ablative) ;
baby_N = nMalush "малыш";
bad_ADeg = mkADeg (nLukko "paha") "pahempi" "pahin" ;
bank_N = nBank "банк" ;
beautiful_ADeg = mkADeg (regN "kaunis") "kauniimpi" "kaunein" ;
become_VA = mkVA (regV "tulla") translative ;
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
bird_N = nEdinica "птиц" ;
black_ADeg = mkADeg (nLukko "musta") "mustempi" "mustin" ;
blue_ADeg = mkADeg (regN "sininen") "sinisempi" "sinisin" ;
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" ;
butter_N = nChislo "масл";
buy_V2 = dirV2 (regV "ostaa") ;
camera_N = nMashina "kamer" ;
cap_N = nNoga "чашк" ; чаш-ек Pl-Gen
car_N = nMashina "машин" ;
carpet_N = mkN "ковёр" "ковра" "ковру" "ковёр" "ковром" "ковре" "ковры" "ковров" "коврам" "ковры" "коврами" "коврах" Masc Inanimate;
cat_N = nMashina "кошк" ;
ceiling_N = nPotolok"потол" ;
chair_N = nStul "стул" ;
cheese_N = nTelefon "сыр" ;
child_N = mkN "ребёнок" "ребёнка" "ребёнку" "ребёнка" "ребёнком" "ребёнке" "дети" "детей" "детям" "детей" "детьми" "детях" Masc Animate;
church_N = mkN "церковь" "церкви" "церкви" "церковь" "церковью" "церкви" "церкви" "церквей" "церквям" "церкви" "церквями" "церквях" Masc Inanimate;
city_N = nAdres "город" ;
clean_ADeg = regADeg "ren" ;
clever_ADeg = regADeg "klok" ;
close_V2 = dirV2 (mk2V "stänga" "stängde") ;
coat_N = mkIndeclinableNoun "пальто" Masc Inanimate ;
cold_ADeg = regADeg "kall" ;
come_V = (mkV "komma" "kommer" "kom" "kom" "kommit" "kommen") ;
computer_N = nTelefon "компьютер" ;
country_N = nMashina "стран" ;
cousin_N = nTelefon "кузен" ;
cow_N = nMashina "коров" ;
die_V = "" ;
dirty_ADeg = "" ;
doctor_N = nAdres "доктор" ;
dog_N = nNoga "собак" ;
door_N = nBol "двер" ;
drink_V2 = "" ;
eat_V2
enemy_N = nStomatolog "враг" ;
factory_N = nNoga "фабрик" ;
father_N = mkN "отец" "отца" "отцу" "отца" "отцом" "отце" "отцы" "отцов" "отцам" "отцов" "отцами" "отцах" Masc Animate;
fear_VS
find_V2
fish_N = nMashina "рыб" ;
floor_N = nTelefon "пол" ;
forget_V2
fridge_N = nBank "холодильник " ;
friend_N = mkN "друг" "друга" "другу" "друга" "другом" "друге" "друзья" "друзей" "друзьям" "друзей" "дузьями" "друзьях" Masc Animate;
fruit_N = nTelefon "фрукт" ;
garden_N = nTelefon "сад" ;
girl_N = nNoga "девочк" ;
glove_N = nNoga "перчатк" ;
gold_N = nChislo "золот" ;
good_ADeg
go_V
green_ADeg
harbour_N = nTelefon "залив" ;
hate_V2
hat_N = nMashina "шляп" ;
have_V2
hear_V2
hill_N = nTelefon "холм" ;
hope_VS
horse_N = nBol "лошад" ;
hot_ADeg
house_N = nAdres "дом" ;
important_ADeg
industry_N = nChislo "производств" ;
iron_N = nChislo "желез" ;
king_N = mkN "король" "короля" "королю" "короля" "королем" "короле" "короли" "королей" "королям" "королей" "королями" "королях" Masc Animate;
know_V2
lake_N = nChislo "озер" ;
lamp_N = nMashina "ламп" ;
learn_V2
leather_N = nEdinica "кож" ;
leave_V2
like_V2
listen_V2
live_V
long_ADeg
lose_V2
love_N = nBol "любов" ;
love_V2
man_N = nStomatolog "человек" ;
meat_N =nChislo "мяс" ;
milk_N = nChislo "молок" ;
moon_N = nMashina "лун" ;
mother_N = nMashina "мам" ;
mountain_N = nMashina "гор" ;
music_N = nNoga "музык" ;
narrow_ADeg
new_ADeg
newspaper_N = nMashina "газет" ;
oil_N = nBol "нефть" ;
old_ADeg
open_V2
paper_N = nNoga "бумаг" ;
peace_N = nTelefon "мир" ;
pen_N = nNoga "ручк" ;
planet_N = nMashina "планет" ;
plastic_N = nMashina "пластмасс" ;
play_V2
policeman_N = nTelefon "милиционер" ;
priest_N = nStomatolog "священник" ;
queen_N = nMashina "королев" ;
radio_N = mkIndeclinableNoun "радио" ;
read_V2
red_ADeg
religion_N = nMalyariya "религи" ;
restaurant_N = nTelefon "ресторан" ;
river_N = nNog "рек" ;
rock_N = nUroven "кам" ;
roof_N = nEdinica "крыш" ;
rubber_N = nMashina "резин" ;
run_V
say_VS
school_N = nMashina "школ" ;
science_N = nEdinica "наук" ;
sea_N = nProizvedenie "мор" ;
seek_V2
see_V2
sell_V3
send_V3
sheep_N = nMashina "овц" ;
ship_N = nNol "корабл" ;
shirt_N = nNoga "рубашк" ;
shoe_N = mkN "туфля" "туфли" "туфле" "туфлю" "туфлей" "туфле" "туфли" "туфель" "туфлям" "туфли" "туфлями" "туфлях" Masc Inanimate;
shop_N = nTelefon "магазин" ;
short_ADeg
silver_N = nChislo "серебр" ;
sister_N = nMashina "сестр" ;
sleep_V
small_ADeg
snake_N = nTetya"зме" ;
sock_N = nPotolok "нос" ;
speak_V2
star_N = nMashina "звезд" ;
steel_N = nBol "стал" ;
stone_N = nNol "камен" ;
stove_N = nBol "печ" ;
student_N = nTelefon "студент" ;
stupid_ADeg
sun_N = mkN "солнце" "солнца" "солнцу" "солнце" "солнцем" "солнце" "солнца" "солнц" "солнцам" "солнца" "солнцами" "солнцах" Neut Inanimate;
switch8off_V
switch8on_V
table_N = nTelefon "стол" ;
teacher_N = nNol "учител" ;
teach_V2
television_N = nProizvedenie "телевидени" ;
thick_ADeg
thin_ADeg
train_N = nAdres "поезд" ;
travel_V
tree_N = nChislo "дерев" ;
trousers_N = mkN "" "" "" "" "" "" "штаны" "штанов" "штанам" "штаны" "штанами" "штанах" Masc Inanimate;
ugly_ADeg
understand_V2
university_N = nTelefon "университет" ;
village_N = nMalyariya "деревн" ;
wait_V2
walk_V
warm_ADeg
war_N = nMashina "войн" ;
watch_V2
water_N = nMashina "вод" ;
white_ADeg
window_N = nChislo "окн" ;
wine_N = nChislo "вин" ;
win_V2
woman_N = nZhenchina "женщин" ;
wood_N = nChislo "дерев" ;

View File

@@ -0,0 +1,4 @@
--# -path=.:../abstract:../../prelude
concrete ClauseRus of Clause = CategoriesRus **
ClauseI with (Rules=RulesRus), (Verbphrase=VerbphraseRus) ;

View File

@@ -0,0 +1,32 @@
concrete CountryRus of Country = open CategoriesRus
,MorphoRus
--,ParadigmsRus
in {
lincat
Country = PN ;
Nationality = A ;
Language = N ;
lin
Denmark = daniya ** {lock_PN=<>};
England = angliya ** {lock_PN=<>};
Finland = finlyandiya ** {lock_PN=<>};
France = franciya ** {lock_PN=<>} ;
Germany = germaniya ** {lock_PN=<>};
Italy = italiya ** {lock_PN=<>};
Norway = norvegiya ** {lock_PN=<>};
Russia = rossiya ** {lock_PN=<>};
Spain = ispaniya ** {lock_PN=<>};
Sweden = shveciya ** {lock_PN=<>};
Danish = datskij ** {lock_A=<>} ;
English = anglijskij ** {lock_A=<>};
DanishLang = mkAdjCommNounMascInanim datskij ** {lock_N=<>};
EnglishLang = mkAdjCommNounMascInanim anglijskij ** {lock_N=<>};
} ;

View File

@@ -0,0 +1,25 @@
--# -path=.:../abstract:../../prelude
concrete LangRus of Lang =
RulesRus,
ClauseRus,
StructuralRus,
-- BasicRus,
TimeRus,
CountryRus,
-- MathRus
** open Prelude, ParadigmsRus, TypesRus
in {
flags coding=utf8 ;
lin
AdvDate d = {s=d.s ! (SF Sg Acc) };
AdvTime t = prefixSS "в" t ;
NWeekday w = w ;
PNWeekday w = nounPN w ;
PNCountry x = x ;
ANationality x = x ;
NLanguage x = x ;
}

View File

@@ -0,0 +1,57 @@
--# -path=.:../abstract:../../prelude
concrete MathRus of Math = CategoriesRus ** open Prelude, SyntaxRus, ParadigmsRus
in {
flags coding=utf8 ;
lin
SymbPN i = {s = \\_ => i.s ; g = Masc ; anim = Inanimate} ;
IntPN i = {s = \\_ => i.s ; g = Neut ; anim = Inanimate } ;
IntNP mu i = {s = \\pf => mu.s! Sg !(extCase pf) ++ i.s;
n = Sg ; p = P3; g = PGen mu.g ; pron = False; anim = mu.anim } ;
IndefSymbNumNP dva mu xs =
{s = \\pf => dva.s ! (extCase pf) ! mu.g ++ mu.s! Pl !(extCase pf) ++xs.s;
n = Pl ; p = P3; g = PGen mu.g ; pron = False; anim = mu.anim } ;
DefSymbNumNP dva mu xs =
{s = \\pf => dva.s ! (extCase pf) ! mu.g ++ mu.s! Pl !(extCase pf) ++xs.s;
n = Pl ; p = P3; g = PGen mu.g ; pron = False; anim = mu.anim } ;
NDetSymbNP det dva mu xs =
{s = \\pf => dva.s ! (extCase pf) ! mu.g ++ det.s!AF (extCase pf) mu.anim APl
++mu.s! Pl !(extCase pf) ++xs.s;
n = Pl ; p = P3; g = PGen mu.g ; pron = False; anim = mu.anim } ;
lincat
SymbList = SS ;
lin
SymbTwo = infixSS "and" ;
SymbMore = infixSS "," ;
LetImp x np = {s = \\_,_ => "пусть" ++ x.s ! PF Nom No NonPoss ++ "это" ++ np.s ! PF Inst No NonPoss } ;
ExistNP bar = {s =\\b,clf => case b of
{True => verbSuchestvovat.s ! (getActVerbForm clf (pgen2gen bar.g) bar.n P3)
++ bar.s ! PF Nom No NonPoss;
False => "не" ++ verbSuchestvovat.s !(getActVerbForm clf (pgen2gen bar.g) bar.n P3)
++ bar.s ! PF Nom No NonPoss
}
} ;
-- Moved from $RulesRus$.
--- these two by AR 3/6/2004
SymbCN cn s =
{s = \\n,c => cn.s ! n ! c ++ s.s ;
g = cn.g ;
anim = cn.anim
} ;
IntCN cn s =
{s = \\n,c => cn.s ! n ! c ++ s.s ;
g = cn.g ;
anim = cn.anim
} ;
}

View File

@@ -250,6 +250,20 @@ oper pronOni: Pronoun =
p = P3 ;
pron = True
} ;
oper pronKto: Pronoun =
{ s = table {
PF Nom _ _ => "кто" ;
PF Gen _ _ => "кого" ;
PF Dat _ _ => "кому" ;
PF Acc _ _ => "кого" ;
PF Inst _ _ => "кем" ;
PF Prepos _ _ => "ком"
} ;
g = PGen Masc;
n = Sg ;
p = P3 ;
pron = False
} ;
oper pronKtoTo: Pronoun =
{ s = table {
@@ -278,6 +292,20 @@ oper pronChtoTo: Pronoun =
n = Sg ;
p = P3 ;
pron = False
} ;
oper pronChto: Pronoun =
{ s = table {
PF Nom _ _ => "что" ;
PF Gen _ _ => "чего" ;
PF Dat _ _ => "чему" ;
PF Acc _ _ => "что" ;
PF Inst _ _ => "чем" ;
PF Prepos _ _ => "чём"
} ;
g = PGen Masc;
n = Sg ;
p = P3 ;
pron = False
} ;
oper pronNikto: Pronoun =
{ s = table {
@@ -302,7 +330,7 @@ oper pronNichto: Pronoun =
PF Acc _ _ => "ничего" ;
PF Inst _ _ => "ничем" ;
PF Prepos _ _ => ["ни о чём"] -- only together with preposition
} ;
} ;
g = PGen Masc;
n = Sg ;
@@ -341,7 +369,9 @@ oper grud : CommNoun = softSignEndDeclFem "груд" ;
oper zhivot : CommNoun = nullEndInAnimateDecl1 "живот" ;
oper grud : CommNoun = softSignEndDeclFem "груд" ;
oper ruka : CommNoun = aEndG_K_KH_Decl "рук" ;
oper stopa : CommNoun = aEndInAnimateDecl "стоп" ;
oper spina : CommNoun = aEndInAnimateDecl "спин" ;
oper stopa : CommNoun = aEndInAnimateDecl "стоп" ;
oper sreda : CommNoun = aEndInAnimateDecl "сред" ;
oper pyatnica : CommNoun = aEndInAnimateDecl "пятниц" ;
oper subbota : CommNoun = aEndInAnimateDecl "суббот" ;
oper astma : CommNoun = aEndInAnimateDecl "астм" ;
@@ -358,6 +388,11 @@ oper antidepressant : CommNoun = nullEndInAnimateDecl1 "антидепресса
oper viagra : CommNoun = aEndInAnimateDecl "виагр" ;
oper antidepressant : CommNoun = nullEndInAnimateDecl1 "антидепрессант" ;
oper insulin : CommNoun = nullEndInAnimateDecl1 "инсулин" ;
oper vitamin : CommNoun = nullEndInAnimateDecl1 "витамин" ;
oper antibiotik : CommNoun = nullEndInAnimateDecl3 "антибиотик" ;
oper ponedelnik : CommNoun = nullEndInAnimateDecl3 "понедельник" ;
oper vtornik : CommNoun = nullEndInAnimateDecl3 "вторник" ;
oper chetverg : CommNoun = nullEndInAnimateDecl3 "четверг" ;
oper kaplya : CommNoun = (l_yaEndInAnimateDecl "кап") ** {g = Fem; anim = Inanimate} ;
@@ -395,6 +430,23 @@ oper aEndAnimateDecl: Str -> SubstFormDecl = \muzhchin ->
SF Pl Acc => muzhchin ;
SF Pl Inst => muzhchin+"ами" ;
SF Pl Prepos => muzhchin+"ах" }
} ;
oper stomatolog : CommNoun = nullEndAnimateDecl "стоматолог" ;
oper nullEndInAnimateDecl: Str -> CommNoun = \stomatolog ->
{s = table
{ SF Sg Nom => stomatolog ;
SF Sg Gen => stomatolog+"а" ;
SF Sg Dat => stomatolog+"у" ;
SF Sg Acc => stomatolog +"а" ;
SF Sg Inst => stomatolog+"ом" ;
SF Sg Prepos => stomatolog+"е" ;
SF Pl Nom => stomatolog+"и" ;
SF Pl Gen => stomatolog+"ов" ;
SF Pl Dat => stomatolog+"ам" ;
SF Pl Acc => stomatolog+"ов" ;
SF Pl Inst => stomatolog+"ами" ;
SF Pl Prepos => stomatolog+"ах" } ;
g = Masc ; anim = Inanimate
} ;
@@ -454,6 +506,43 @@ oper nullEndInAnimateDecl1: Str -> CommNoun = \gripp ->
SF Pl Gen => gripp+"ов" ;
SF Pl Dat => gripp+"ам" ;
SF Pl Acc => gripp +"ы";
SF Pl Inst => gripp+"ами" ;
SF Pl Prepos => gripp+"ах"
} ;
g = Masc ; anim = Inanimate
} ;
oper nullEndInAnimateDeclStul: Str -> CommNoun = \brat ->
{s = table
{ SF Sg Nom => brat ;
SF Sg Gen => brat+"а" ;
SF Sg Dat => brat+"у" ;
SF Sg Acc => brat +"а";
SF Sg Inst => brat+"ом" ;
SF Sg Prepos => brat+"е" ;
SF Pl Nom => brat+"ья" ;
SF Pl Gen => brat+"ьев" ;
SF Pl Dat => brat+"ьям" ;
SF Pl Acc => brat +"ьев";
SF Pl Inst => brat+"ьями" ;
SF Pl Prepos => brat+"ьяах"
} ;
g = Masc ; anim = Inanimate
} ;
oper nullEndAnimateDeclBrat: Str -> CommNoun = \brat ->
{s = table
{ SF Sg Nom => brat ;
SF Sg Gen => brat+"а" ;
SF Sg Dat => brat+"у" ;
SF Sg Acc => brat +"а";
SF Sg Inst => brat+"ом" ;
SF Sg Prepos => brat+"е" ;
SF Pl Nom => brat+"ья" ;
SF Pl Gen => brat+"ьев" ;
SF Pl Dat => brat+"ьям" ;
SF Pl Acc => brat +"ьев";
SF Pl Inst => brat+"ьями" ;
SF Pl Prepos => brat+"ьяах"
@@ -531,7 +620,24 @@ oper oeEndInAnimateDecl: Str -> CommNoun = \snotvorn ->
oper oeEndInAnimateDecl: Str -> CommNoun = \snotvorn ->
{ s = table
SF Sg Inst => snotvorn+"ым" ;
{ SF Sg Nom => snotvorn +"ое";
SF Sg Gen => snotvorn+"ого" ;
SF Sg Dat => snotvorn+"ому" ;
SF Sg Acc => snotvorn +"ое";
SF Sg Inst => snotvorn+"ым" ;
SF Sg Prepos => snotvorn+"ом" ;
SF Pl Nom => snotvorn+"ые" ;
SF Pl Gen => snotvorn+"ых" ;
SF Pl Dat => snotvorn+"ым" ;
SF Pl Acc => snotvorn+"ые" ;
SF Pl Inst => snotvorn+"ыми" ;
SF Pl Prepos => snotvorn+"ых"
} ;
g = Neut ; anim = Inanimate
} ;
oper voskresenje : CommNoun = soft_eEndInAnimateDecl "воскресен" ;
oper soft_eEndInAnimateDecl: Str -> CommNoun = \proizvedeni ->
{ s = table
{ SF Sg Nom => proizvedeni +"ье";
SF Sg Gen => proizvedeni+"ья" ;
SF Sg Dat => proizvedeni+"ью" ;
@@ -608,8 +714,19 @@ oper oEnd_KH_InAnimateDecl: Str -> CommNoun = \u ->
} ;
g = Neut ; anim = Inanimate
} ;
SF Sg Dat => u+"ху" ;
oper oEnd_KH_InAnimateDecl: Str -> CommNoun = \u ->
{ s = table
{ SF Sg Nom => u+"хо" ;
SF Sg Gen => u+"ха" ;
SF Sg Dat => u+"ху" ;
SF Sg Acc => u+"хо" ;
SF Sg Inst => u+"хом" ;
SF Sg Prepos => u+"хе" ;
SF Pl Nom => u+"ши" ;
SF Pl Gen => u +"шей";
SF Pl Dat => u+"шам" ;
SF Pl Acc => u+"ши" ;
SF Pl Inst => u+"шами" ;
SF Pl Prepos => u+"шах"
@@ -666,6 +783,42 @@ oper softSignEndDeclMasc: Str -> CommNoun = \nol ->
SF Sg Inst => bol+"ью" ;
SF Sg Prepos => bol+"и" ;
SF Pl Nom => bol+"и" ;
SF Pl Gen => bol+"ей" ;
SF Pl Dat => bol+"ям" ;
SF Pl Acc => bol+"и" ;
SF Pl Inst => bol+"ями" ;
SF Pl Prepos => bol+"ях"
} ;
g = Fem ; anim = Inanimate
} ;
oper softSignEndDeclMasc: Str -> CommNoun = \nol ->
{s = table
{ SF Sg Nom => nol+"ь" ;
SF Sg Gen => nol+"я" ;
SF Sg Dat => nol+"ю" ;
SF Sg Acc => nol+"ь" ;
SF Sg Inst => nol+"ем" ;
SF Sg Prepos => nol+"е" ;
SF Pl Nom => nol+"и" ;
SF Pl Gen => nol+"ей" ;
SF Pl Dat => nol+"ям" ;
SF Pl Acc => nol+"и" ;
SF Pl Inst => nol+"ями" ;
SF Pl Prepos => nol+"ях"
} ;
g = Masc ; anim = Inanimate
} ;
oper okEndDeclMasc: Str -> CommNoun = \potol ->
{s = table
{ SF Sg Nom => potol+"ок" ;
SF Sg Gen => potol+"ка" ;
SF Sg Dat => potol+"ку" ;
SF Sg Acc => potol+"ок" ;
SF Sg Inst => potol+"ком" ;
SF Sg Prepos => potol+"ке" ;
SF Pl Nom => potol+"ки" ;
SF Pl Gen => potol+"ков" ;
SF Pl Dat => potol+"кам" ;
SF Pl Acc => potol+"ки" ;
SF Pl Inst => potol+"ками" ;
@@ -857,6 +1010,25 @@ oper eEnd_Decl: Str -> CommNoun = \vs ->
SF _ Dat => menshinstv+"ам" ;
SF _ Acc => menshinstv+"ва" ;
SF _ Inst => menshinstv+"ами" ;
SF _ Prepos => menshinstv+"вах"
} ;
g = Neut ; anim = Inanimate
} ;
oper oEnd_SgDecl: Str -> CommNoun = \bolshinstv ->
{ s = table {
SF _ Nom => bolshinstv+"о" ;
SF _ Gen => bolshinstv+"а" ;
SF _ Dat => bolshinstv+"у" ;
SF _ Acc => bolshinstv+"о" ;
SF _ Inst => bolshinstv+"ом" ;
SF _ Prepos => bolshinstv+"е"
} ;
g = Neut ; anim = Inanimate
} ;
-- Note: Now we consider only the plural form of the pronoun "все" (all)
-- treated as an adjective (see AllDetPl definition).
-- The meaning "entire" is not considered, which allows us to form
-- the pronoun-adjective from the substantive form below:
oper eEnd_Decl: Str -> CommNoun = \vs ->
@@ -1021,6 +1193,8 @@ oper uy_j_EndDecl : Str -> Adjective = \s ->{s = table {
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 => "всеми";
@@ -1162,6 +1336,7 @@ param Conjugation = First | FirstE | Second | Mixed | Dolzhen;
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+"ыми";
@@ -1442,6 +1617,9 @@ oper
};
-- 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 {
VINF => inf ;
@@ -1475,6 +1653,13 @@ oper mille : Size => Str = table {
VIND (ASg Masc) VPast => past ! (PSF (ASg Masc)) ;
VIND (ASg Fem) VPast => past ! (PSF (ASg Fem) ) ;
VIND (ASg Neut) VPast => past ! (PSF (ASg Neut)) ;
VIND APl VPast => past ! (PSF APl)
} ;
asp = Imperfective
} ;
asp = Imperfective
oper perfectiveActivePattern: Str -> Str -> PresentVerb -> PastVerb -> AspectVoice =
\inf, imper, presentFuture, past -> { s= table {

View File

@@ -14,7 +14,8 @@
--
-- The following files are presupposed:
resource ParadigmsRus = open (Predef=Predef), Prelude, SyntaxRus, ResourceRus in {
resource ParadigmsRus = open (Predef=Predef), Prelude, SyntaxRus,
CategoriesRus, RulesRus in {
flags coding=utf8 ;
@@ -77,42 +78,47 @@ oper
-- Feminine patterns.
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)
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)
-- Neuter patterns.
nObezbolivauchee : Str -> N ; -- neutral, inanimate, ending with "-ee"
nProizvedenie : Str -> N ; -- neutral, inanimate, ending with "-e"
nChislo : Str -> N ; -- neutral, inanimate, ending with "-o"
nObezbolivauchee : Str -> N ; -- inanimate, ending with "-ee"
nProizvedenie : Str -> N ; -- inanimate, ending with "-e"
nChislo : Str -> N ; -- inanimate, ending with "-o"
-- Masculine patterns.
nStomatolog : Str -> N ; -- masculine, animate, ending with consonant
-- the next two differ only in
-- plural nominative (= accusative) form(s) :
nAdres : Str -> N ; -- адрес-а
nTelefon : Str -> N ; -- телефон-ы
-- masculine, inanimate, ending with consonant
Ending with consonant:
nBrat: Str -> N ; -- animate, брат-ья
nStul: Str -> N ; -- same as above, but inanimate
nMalush : St -> N ; -- малышей
nPotolok : St -> N ; -- потол-ок - потол-ка
nNol : Str -> N ; -- masculine, inanimate, ending with "-ь" (soft sign)
nUroven : Str -> N ; -- masculine, inanimate, ending with "-ень"
-- the next four differ in plural nominative and/or accusative form(s) :
nBank: Str -> N ; -- банк-и (Nom=Acc)
nStomatolog : Str -> N ; -- same as above, but animate
nAdres : Str -> N ; -- адрес-а (Nom=Acc)
nTelefon : Str -> N ; -- телефон-ы (Nom=Acc)
nNol : Str -> N ; -- inanimate, ending with "-ь" (soft sign)
nUroven : Str -> N ; -- inanimate, ending with "-ень"
-- Nouns used as functions need a preposition. The most common is with Genitive.
mkFun : N -> Preposition -> Case -> Fun ;
funGen : N -> Fun ;
mkFun : N -> Preposition -> Case -> N2 ;
funGen : N -> N2 ;
-- Proper names.
mkPN : Str -> Gender -> Animacy -> PN ; -- "Иван", "Маша"
nounPN : N -> PN ;
-- On the top level, it is maybe $CN$ that is used rather than $N$, and
-- $NP$ rather than $PN$.
@@ -140,24 +146,24 @@ oper
-- in the current description, otherwise there would be 32 forms for
-- positive degree.
-- mkAdj1 : ( : Str) -> Adj1 ;
-- mkA : ( : Str) -> A ;
-- Invariable adjective is a special case.
adjInvar : Str -> Adj1 ; -- khaki, mini, hindi, netto
adjInvar : Str -> A ; -- khaki, mini, hindi, netto
-- Some regular patterns depending on the ending.
adj1Staruyj : Str -> Adj1 ; -- ending with "-ый"
adj1Malenkij : Str -> Adj1 ; -- endign with "-ий"
adj1Molodoj : Str -> Adj1 ; -- ending with "-ой",
AStaruyj : Str -> A ; -- ending with "-ый"
AMalenkij : Str -> A ; -- endign with "-ий"
AMolodoj : Str -> A ; -- ending with "-ой",
-- plural - молод-ые"
adj1Kakoj_Nibud : Str -> Str -> Adj1 ; -- ending with "-ой",
AKakoj_Nibud : Str -> Str -> A ; -- ending with "-ой",
-- plural - "как-ие"
-- Two-place adjectives need a preposition and a case as extra arguments.
mkAdj2 : Adj1 -> Str -> Case -> Adj2 ; -- "делим на"
mkA2 : A -> Str -> Case -> A2 ; -- "делим на"
-- Comparison adjectives need a positive adjective
-- (28 forms without short forms).
@@ -168,12 +174,12 @@ oper
-- Syntaxic forms are based on the positive forms.
mkAdjDeg : Adj1 -> Str -> AdjDeg ;
mkADeg : A -> Str -> ADeg ;
-- On top level, there are adjectival phrases. The most common case is
-- just to use a one-place adjective.
ap : Adj1 -> IsPostfixAdj -> AP ;
ap : A -> IsPostfixAdj -> AP ;
--2 Verbs
@@ -231,15 +237,15 @@ past : Tense ;
-- The "V" type, that have these parameters fixed.
-- We can extract the "V" from the lexicon.
mkV: Verbum -> Voice -> Tense -> V ;
mkPresentV: Verbum -> Voice -> V ;
-- mkV: Verbum -> Voice -> V ;
-- mkPresentV: Verbum -> Voice -> V ;
-- Two-place verbs, and the special case with direct object. Notice that
-- a particle can be included in a $V$.
mkTV : V -> Str -> Case -> TV ; -- "войти в дом"; "в", accusative
tvDir : V -> TV ; -- "видеть", "любить"
mkTV : V -> Str -> Case -> V2 ; -- "войти в дом"; "в", accusative
tvDir : V -> V2 ; -- "видеть", "любить"
-- The definitions should not bother the user of the API. So they are
-- hidden from the document.
@@ -250,7 +256,7 @@ past : Tense ;
Animacy = SyntaxRus.Animacy;
Aspect = SyntaxRus.Aspect;
Voice = SyntaxRus.Voice ;
Tense = SyntaxRus.Tense ;
Tense = SyntaxRus.RusTense ;
Bool = Prelude.Bool ;
true = True;
@@ -326,9 +332,14 @@ past : Tense ;
-- Masculine patterns.
nBank = \s -> nullEndInAnimateDecl s ** {lock_N = <>};
nStomatolog = \s -> nullEndAnimateDecl s ** {lock_N = <>};
nMalush = \s -> shEndDeclMasc s ** {lock_N = <>};
nPotolok = \s ->okEndDeclMasc s ** {lock_N = <>};
nStomatolog = \s -> nullEndAnimateDecl s ** {lock_N = <>};
nBrat = \s -> nullEndAnimateDeclBrat s** {lock_N = <>};
nStul = \s -> nullEndInAnimateDeclStul s** {lock_N = <>};
nAdres = \s -> nullEndInAnimateDecl2 s ** {lock_N = <>};
nTelefon = \s -> nullEndInAnimateDecl1 s ** {lock_N = <>};
@@ -343,20 +354,22 @@ past : Tense ;
Masc => mkProperNameMasc ivan anim ;
_ => mkProperNameFem ivan anim
} ** {lock_PN =<>};
nounPN n = (mkCNProperName n)**{lock_PN=<>};
mkCN = UseN ;
mkNP = \x,y,z -> UsePN (mkPN x y z) ;
-- Adjective definitions
adjInvar = \s -> { s = \\af => s } ** {lock_Adj1= <>};
adjInvar = \s -> { s = \\af => s } ** {lock_A= <>};
adj1Staruyj s = uy_j_EndDecl s ** {lock_Adj1 = <>} ;
adj1Malenkij s = ij_EndK_G_KH_Decl s ** {lock_Adj1= <>};
adj1Molodoj s = uy_oj_EndDecl s ** {lock_Adj1= <>};
adj1Kakoj_Nibud s t = i_oj_EndDecl s t ** {lock_Adj1= <>};
AStaruyj s = uy_j_EndDecl 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= <>};
mkAdj2 a p c= mkAdjective2 a p c ** {lock_Adj2 = <>};
-- mkAdjDeg defined in morpho.RusU
mkA2 a p c= mkAdjective2 a p c ** {lock_A2 = <>};
-- mkADeg defined in morpho.RusU
ap a p = mkAdjPhrase a p ** {lock_AP = <>}; -- defined in syntax module
@@ -387,8 +400,8 @@ past : Tense ;
mkRegVerb = verbDecl ; -- defined in morpho.RusU.gf
mkV a b c = extVerb a b c ** {lock_V = <>}; -- defined in types.RusU.gf
{-
mkV a b = extVerb a b ** {lock_V = <>}; -- defined in types.RusU.gf
mkPresentV = \aller, vox ->
{ s = table {
@@ -397,8 +410,8 @@ past : Tense ;
VInf => aller.s ! VFORM vox VINF ;
VSubj gn => aller.s ! VFORM vox (VSUB gn)
}; t = Present ; a = aller.asp ; w = vox ; lock_V = <>} ;
mkTV a b c = mkTransVerb a b c ** {lock_TV = <>}; -- defined in syntax.RusU.gf
tvDir v = mkDirectVerb v ** {lock_TV = <>}; -- defined in syntax.RusU.gf
-}
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
} ;

View File

@@ -0,0 +1,42 @@
concrete TimeRus of Time = NumeralsRus **
open Prelude, CategoriesRus
--, ParadigmsRus
, MorphoRus in {
flags coding=utf8 ;
lincat
-- SS does not work for Russian,
-- например, "первое мая, суббота" - "парад состоялся первоГО мая, в субботУ" :
Date = N ;
Weekday = N ;
Hour = {s: Case => Str} ;
Minute = {s: Case => Str};
Time = SS ;
lin
DayDate day = day ;
DayTimeDate day time = {s=\\sf => day.s ! sf ++ "," ++ time.s; g=day.g; anim=day.anim; lock_N=<>} ;
-- The formulation (strings in between) depends on the number
-- например, "один час" - "двенадцать часОВ"
-- so all the definitions that deal with "Time" are only partially correct:
FormalTime h m = ss (h.s!Nom ++ "часов" ++ m.s!Nom ++ "минут") ;
PastTime h m = ss (m.s!Nom++ "минут"++h.s!Gen) ;
ToTime h m = ss ("без"++m.s!Gen ++ "минут" ++ h.s!Nom) ;
ExactTime h = ss (h.s!Nom ++ "ровно") ;
-- "Numerals.gf" is not refined enough to give the time categories:
NumHour n = {s = \\_ => n.s ! attr ! Masc} ;
NumMinute n = {s =\\_ => n.s ! attr ! Fem } ;
monday = ponedelnik ** {lock_N=<>};
tuesday = vtornik ** {lock_N=<>};
wednesday = sreda ** {lock_N=<>};
thursday = chetverg ** {lock_N=<>};
friday = pyatnica ** {lock_N=<>};
saturday = subbota ** {lock_N=<>};
sunday = voskresenje ** {lock_N=<>};
} ;

View File

@@ -0,0 +1,63 @@
--# -path=.:../abstract:../../prelude
--1 The Top-Level Russian Resource Grammar: Combination Rules
--
-- Aarne Ranta 2002 -- 2003
--
-- This is the Russian concrete syntax of the multilingual resource
-- grammar. Most of the work is done in the file $syntax.Rus.gf$.
-- However, for the purpose of documentation, we make here explicit the
-- linearization types of each category, so that their structures and
-- dependencies can be seen.
-- Another substantial part are the linearization rules of some
-- structural words.
--
-- The users of the resource grammar should not look at this file for the
-- linearization rules, which are in fact hidden in the document version.
-- They should use $resource.Abs.gf$ to access the syntactic rules.
-- This file can be consulted in those, hopefully rare, occasions in which
-- one has to know how the syntactic categories are
-- implemented. The parameter types are defined in $TypesRus.gf$.
concrete VerbphraseRus of Verbphrase = CategoriesRus **
open Prelude, SyntaxRus in {
flags optimize=all_subs ;
lin
UseV = predVerb ;
UsePassV = passVerb ;
ComplV2 = complTransVerb ;
ComplV3 = complDitransVerb ;
ComplReflV2 = reflTransVerb ;
ComplVS = complSentVerb ;
ComplVV = complVerbVerb ;
ComplVQ = complQuestVerb ;
ComplVA = complAdjVerb ;
ComplV2A = complDitransAdjVerb ;
ComplSubjV2V = complDitransVerbVerb ;
ComplObjV2V = complDitransVerbVerb_2 ;
ComplV2S = complDitransSentVerb ;
ComplV2Q = complDitransQuestVerb ;
PredAP = predAdjective ;
PredCN = predCommNoun ;
PredNP = predNounPhrase ;
PredAdv = predAdverb ;
PredProgVP x = x ;
-- Use VPs
PredVP = predVerbGroupClause ;
RelVP = relVerbPhrase ;
IntVP = intVerbPhrase ;
-- PosVP tp = predVerbGroup True tp ;
-- NegVP tp = predVerbGroup False tp ;
UseVP = predVerbGroupI ;
AdvVP = adVerbPhrase ;
SubjVP = subjunctVerbPhrase ;
}