resource = resource-1.0

This commit is contained in:
aarne
2006-06-22 22:25:55 +00:00
parent 7e5584b1ab
commit 251bc4c738
881 changed files with 31130 additions and 31130 deletions

View File

@@ -0,0 +1,46 @@
--# -path=.:../abstract:../common:../../prelude
concrete AdjectiveRus of Adjective = CatRus ** open ResRus, Prelude in {
flags coding=utf8 ;
lin
PositA a = { s = a.s!Posit; p = False};
-- Comparative forms are used with an object of comparison, as
-- adjectival phrases ("больше тебя").
ComparA bolshoj tu =
{s = \\af => bolshoj.s ! Compar ! af ++ tu.s ! (mkPronForm Gen Yes NonPoss) ;
p = True
} ;
-- $SuperlA$ belongs to determiner syntax in $Noun$.
ComplA2 vlublen tu =
{s = \\af => vlublen.s !Posit! af ++ vlublen.s2 ++
tu.s ! (mkPronForm vlublen.c No NonPoss) ;
p = True
} ;
ReflA2 vlublen =
{s = \\af => vlublen.s !Posit! af ++ vlublen.s2 ++ sam.s ! vlublen.c;
p = True
} ;
SentAP vlublen sent=
{s = \\af => vlublen.s ! af ++ [", "] ++ sent.s;
p = True
} ;
AdAP ada ap = {
s = \\af => ada.s ++ ap.s ! af ;
p = True
} ;
UseA2 a = a ;
}

View File

@@ -0,0 +1,25 @@
--# -path=.:../abstract:../common:../../prelude
concrete AdverbRus of Adverb = CatRus ** open ResRus, Prelude in {
flags coding=utf8 ;
lin
PositAdvAdj a = {s = a.s !Posit! AdvF} ;
ComparAdvAdj cadv a np = {
s = cadv.s ++ a.s !Posit! AdvF ++ "чем" ++ np.s ! PF Nom No NonPoss
} ;
ComparAdvAdjS cadv a s = {
s = cadv.s ++ a.s !Posit! AdvF ++ "чем" ++ s.s
} ;
PrepNP na stol = ss (na.s ++ stol.s ! PF na.c Yes NonPoss) ;
AdAdv = cc2 ;
SubjS = cc2 ;
AdvSC s = s ; --- this rule give stack overflow in ordinary parsing
AdnCAdv cadv = {s = cadv.s ++ "чем"} ;
}

View File

@@ -1,4 +0,0 @@
--# -path=.:../abstract:../../prelude
concrete AllResourceRus of AllResource = RulesRus, StructuralRus ** {} ;

View File

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

View File

@@ -0,0 +1,95 @@
--# -path=.:../abstract:../common:../../prelude
concrete CatRus of Cat = CommonX ** open ResRus, Prelude in {
flags optimize=all_subs ; coding=utf8 ;
lincat
-- Tensed/Untensed
S = {s : Str} ;
QS = {s : QForm => Str} ;
RS = {s : GenNum => Case => Animacy => Str} ;
-- Sentence
-- clause (variable tense) e.g. "John walks"/"John walked"
Cl ={s : Polarity => ClForm => Str} ;
Slash = {s : Polarity => ClForm => Str; s2: Str; c: Case} ;
Imp = { s: Polarity => Gender => Number => Str } ;
-- Question
QCl = {s :Polarity => ClForm => QForm => Str};
IP = { s : PronForm => Str ; n : Number ; p : Person ;
g: PronGen ; anim : Animacy ; pron: Bool} ;
IComp = {s : Str} ;
IDet = Adjective ** {n: Number; g: PronGen; c: Case} ;
-- Relative
RCl = {s : Polarity => ClForm => GenNum => Case => Animacy => Str} ;
RP = {s : GenNum => Case => Animacy => Str} ;
-- Verb
-- Polarity =>
Comp, VP = {s : ClForm => GenNum => Person => Str ; asp : Aspect ; w: Voice}
** {s2 : Str ; s3 : Gender => Number => Str ; negBefore: Bool} ;
-- Adjective
AP = {s : AdjForm => Str; p : IsPostfixAdj} ;
-- Noun
CN = {s : Number => Case => Str; g : Gender; anim : Animacy} ;
NP = { s : PronForm => Str ; n : Number ; p : Person ;
g: PronGen ; anim : Animacy ; pron: Bool} ;
Pron = { s : PronForm => Str ; n : Number ; p : Person ;
g: PronGen ; pron: Bool} ;
-- Determiners (only determinative pronouns
-- (or even indefinite numerals: "много" (many)) in Russian) are inflected
-- according to the gender of nouns they determine.
-- extra parameters (Number and Case) are added for the sake of
-- the determinative pronoun "bolshinstvo" ("most");
-- Gender parameter is due to multiple determiners (Numerals in Russian)
-- like "mnogo"
-- The determined noun has the case parameter specific for the determiner
QuantSg, QuantPl , Det = {s : AdjForm => Str; n: Number; g: PronGen; c: Case} ;
Predet, Quant= {s : AdjForm => Str; g: PronGen; c: Case} ;
-- Numeral
Num, Numeral = {s : Case => Gender => Str} ;
-- Structural
-- The conjunction has an inherent number, which is used when conjoining
-- noun phrases: "Иван и Маша поют" vs. "Иван или Маша поет"; in the
-- case of "или", the result is however plural if any of the disjuncts is.
Conj = {s : Str ; n : Number} ;
DConj = {s1,s2 : Str ; n : Number} ;
Subj = {s : Str} ;
Prep = {s : Str ; c: Case } ;
-- Open lexical classes, e.g. Lexicon
V, VS, VV, VQ, VA = Verbum ; -- = {s : VerbForm => Str ; asp : Aspect } ;
V2, V2A = Verbum ** Complement ;
V3 = Verbum ** Complement** {s4 : Str; c2: Case} ;
-- VV = {s : VVForm => Str ; isAux : Bool} ;
Ord = {s : AdjForm => Str} ;
A = {s : Degree => AdjForm => Str} ;
A2 = A ** Complement ;
-- Substantives moreover have an inherent gender.
N = {s : SubstForm => Str ; g : Gender ; anim : Animacy } ;
N2 = {s : Number => Case => Str; g : Gender; anim : Animacy} ** Complement ;
N3 = {s : Number => Case => Str; g : Gender; anim : Animacy} ** Complement ** {s3 : Str; c2: Case} ;
PN = {s : Case => Str ; g : Gender ; anim : Animacy} ;
}

View File

@@ -1,180 +0,0 @@
--# -path=.:../abstract:../../prelude
--1 The Top-Level Russian Resource Grammar: Combination Rules
--
-- Aarne Ranta, Janna Khegai 2003 -- 2005
--
-- This is the Russian concrete syntax of the multilingual resource
-- grammar. Most of the work is done in the file $SyntaxRus.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 CategoriesRus of Categories = open Prelude, SyntaxRus in {
flags
startcat=Phr ;
lexer=text ;
unlexer=text ;
lincat
N = CommNoun ;
-- = {s : SubstForm => Str ; g : Gender ; anim : Animacy } ;
CN = CommNounPhrase ;
-- = {s : Number => Case => Str; g : Gender; anim : Animacy} ;
NP = NounPhrase ;
-- = { s : PronForm => Str ; n : Number ; p : Person ;
-- g: PronGen ; anim : Animacy ; pron: Bool} ;
PN = ProperName ;
-- = {s : Case => Str ; g : Gender ; anim : Animacy} ;
A = Adjective ;
-- = {s : AdjForm => Str} ;
A2 = AdjCompl ;
-- = Adjective ** Complement ;
ADeg = AdjDegr ;
-- = {s : Degree => AdjForm => Str} ;
AP = AdjPhrase ;
-- = Adjective ** {p : IsPostfixAdj} ;
Det = Determiner ;
-- = Adjective ** {n: Number; g: PronGen; c: Case} ;
NDet = NoNumberDeterminer ;
-- "Det" without "Number" field
N2 = Function ;
-- = CommNounPhrase ** Complement ;
N3 = CommNoun3;
-- = Function ** {s3 : Str; c2: Case} ;
Num = Numeral ;
-- = {s : Case => Gender => Str} ;
V = Verbum ;
-- = {s : VerbForm => Str ; asp : Aspect } ;
-- VG = VerbGroup ;
-- = Verbum ** { w: Voice; s2 : Bool => Str ;
-- s3 : Gender => Number => Str ; negBefore: Bool} ;
VP = VerbPhrase ;
-- = {s : Bool => ClForm => GenNum => Person => Str ; a : Aspect ; w: Voice} ;
-- ** {s2 : Str ; s3 : Gender => Number => Str ; negBefore: Bool} ;
V2 = TransVerb ;
-- = Verbum ** Complement ;
V3 = DitransVerb ;
-- = TransVerb ** {s4 : Str; c2: Case} ;
VS = SentenceVerb ;
-- = Verbum ;
VV = VerbVerb ;
-- = Verbum ;
VCl = VerbPhraseClause ;
-- {s : Bool => Anteriority => Str}
-- fixed tense:
-- infinitive verb phrase (in other languages very similar to VPI,
-- but without Bool=>Anteriority)
VPI = VerbPhrase ;
Adv = Adverb ; -- sentence adverb e.g. "now", "in the house"
-- = {s : Str} ;
AdV = Adverb ;
AdA = Adverb ; -- ad-adjective e.g. "very"
AdC = Adverb ; -- conjoining adverb e.g. "therefore", "otherwise"
Prep = Preposition;
-- = {s : Str ; c: Case } ;
PP = Adverb ;
Cl = Clause ; -- clause (variable tense) e.g. "John walks"/"John walked"
-- = {s : Bool => ClForm => Str} ;
S = Sentence ;
-- = {s : Str} ;
Slash = SlashNounPhrase ;
-- = Clause ** Complement ;
-- = {s : Bool => ClForm => Str; s2: Str; c: Case} ;
RP = RelPron ;
-- = {s : GenNum => Case => Animacy => Str} ;
RS = RelPron ;
RCl = RelClause ;
-- = {s : Bool => ClForm => GenNum => Case => Animacy => Str} ;
IP = IntPron ;
-- = NounPhrase ;
IDet = Determiner ;
-- = Adjective ** {n: Number; g: PronGen; c: Case} ;
IAdv = Adverb ;
-- = {s : Str} ;
QS = Question ; -- question w. fixed tense
-- = {s : QuestForm => Str} ;
QCl = QuestionCl ;
-- = {s :Bool => ClForm => QuestForm => Str};
Imp = Imperative ;
-- = { s: Gender => Number => Str } ;
Conj = Conjunction ;
-- = {s : Str ; n : Number} ;
ConjD = ConjunctionDistr ;
-- = {s1,s2 : Str ; n : Number} ;
ListS = ListSentence ;
-- = {s1,s2 : Mode => Str} ;
ListAP = ListAdjPhrase ;
-- = {s1,s2 : AdjForm => Str ; p : Bool} ;
ListNP = ListNounPhrase ;
-- = { s1,s2 : PronForm => Str ; g: Gender ; anim : Animacy ;
-- n : Number ; p : Person ; pron : Bool } ;
ListAdv= ListAdverb ;
-- = {s1, s2 : Str} ;
Phr = Utterance ;
-- = {s : Str} ;
Text = {s : Str} ;
---- next
VQ = Verbum ;
-- = {s : VerbForm => Str ; asp : Aspect } ;
VA = Verbum ;
V0 = Verbum ;
V2A = TransVerb ;
-- = Verbum ** Complement ;
V2V = TransVerb ;
V2S = TransVerb ;
V2Q = TransVerb ;
AS = Adverb ;
-- = {s : Str} ;
A2S = Adverb2 ;
-- = Adverb ** Complement;
AV = Adjective ;
-- = {s : AdjForm => Str} ;
--- "eager to leave",
-- most combinations with verbs in Russian
-- are expressed by adverb: "easy to understand"
A2V = AdjCompl ;
-- = Adjective ** Complement ;
-- NB: it is difficult to play the sonata
-- vs. it (the sonata) is difficult to play
-- also : John is easy (for you) to please vs. John is eager to please
-- similar implementation in all the languages, s-field is dummy:
TP = TensePolarity; -- combination of the three below
Tense = {s : Str ; t : ClTense} ;
Ant = Anterior ; --For time agreement:
Pol = Polarity ; --Positive or negative statement
Subj = {s : Str} ;
}

View File

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

View File

@@ -0,0 +1,108 @@
--# -path=.:../abstract:../common:../../prelude
concrete ConjunctionRus of Conjunction =
CatRus ** open ResRus, Coordination, Prelude in {
flags optimize=all_subs ; coding=utf8 ;
lin
ConjS = conjunctSS ;
DConjS = conjunctDistrSS ;
ConjAdv = conjunctSS ;
DConjAdv = conjunctDistrSS ;
ConjNP c xs =
conjunctTable PronForm c xs ** {n = conjNumber c.n xs.n ;
anim = xs.anim ;
p = xs.p; g = xs.g ; pron = xs.pron} ;
DConjNP c xs =
conjunctDistrTable PronForm c xs ** {n = conjNumber c.n xs.n ;
p = xs.p ; pron = xs.pron ; anim = xs.anim ;
g = xs.g } ;
ConjAP c xs = conjunctTable AdjForm c xs ** {p = xs.p} ;
DConjAP c xs = conjunctDistrTable AdjForm c xs ** {p = xs.p} ;
-- These fun's are generated from the list cat's.
BaseS = twoSS ;
ConsS = consrSS comma ;
BaseAdv = twoSS ;
ConsAdv = consrSS comma ;
ConsNP x xs =
consTable PronForm comma xs x **
{n = conjNumber xs.n x.n ; g = conjPGender x.g xs.g ;
anim = conjAnim x.anim xs.anim ;
p = conjPerson xs.p x.p; pron = conjPron xs.pron x.pron} ;
ConsAP x xs = consTable AdjForm comma xs x ** {p = andB xs.p x.p} ;
BaseAP x y = twoTable AdjForm x y ** {p = andB x.p y.p} ;
BaseNP x y = twoTable PronForm x y ** {n = conjNumber x.n y.n ;
g = conjPGender x.g y.g ; p = conjPerson x.p y.p ;
pron = conjPron x.pron y.pron ; anim = conjAnim x.anim y.anim } ;
lincat
[S] = {s1,s2 : Str} ;
[Adv] = {s1,s2 : Str} ;
-- The structure is the same as for sentences. The result is either always plural
-- or plural if any of the components is, depending on the conjunction.
[NP] = { s1,s2 : PronForm => Str ; g: PronGen ;
anim : Animacy ; n : Number ; p : Person ; pron : Bool } ;
-- The structure is the same as for sentences. The result is a prefix adjective
-- if and only if all elements are prefix.
[AP] = {s1,s2 : AdjForm => Str ; p : Bool} ;
oper
-- We have to define a calculus of numbers of persons. For numbers,
-- it is like the conjunction with $Pl$ corresponding to $False$.
conjNumber : Number -> Number -> Number = \m,n -> case <m,n> of {
<Sg,Sg> => Sg ;
_ => Pl
} ;
-- For persons, we let the latter argument win ("либо ты, либо я пойду"
-- but "либо я, либо ты пойдешь"). This is not quite clear.
conjPerson : Person -> Person -> Person = \_,p ->
p ;
-- For pron, we let the latter argument win - "Маша или моя мама" (Nominative case)
-- but - "моей или Машина мама" (Genetive case) both corresponds to
-- "Masha's or my mother"), which is actually not exactly correct, since
-- different cases should be used - "Машина или моя мама".
conjPron : Bool -> Bool -> Bool = \_,p ->
p ;
-- For gender in a similar manner as for person:
-- Needed for adjective predicates like:
-- "Маша или Оля - красивая", "Антон или Олег - красивый",
-- "Маша или Олег - красивый".
-- The later is not totally correct, but there is no correct way to say that.
conjGender : Gender -> Gender -> Gender = \_,m -> m ;
conjPGender : PronGen -> PronGen -> PronGen = \_,m -> m ;
conjAnim : Animacy -> Animacy -> Animacy = \_,m -> m ;
}

View File

@@ -1,32 +0,0 @@
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

@@ -1,7 +0,0 @@
--# -path=.:../abstract:../../prelude
concrete DemonstrativeRus of Demonstrative =
CategoriesRus ** DemonstrativeI with
(Resource = ResourceRus),
(Basic = BasicRus),
(DemRes = DemResRus) ;

View File

@@ -0,0 +1,3 @@
concrete ExtraRus of ExtraRusAbs = CatRus ** {
}

View File

@@ -0,0 +1,3 @@
abstract ExtraRusAbs = {
}

View File

@@ -0,0 +1,17 @@
--# -path=.:../abstract:../common:../../prelude
concrete GrammarRus of Grammar =
NounRus,
VerbRus,
AdjectiveRus,
AdverbRus,
NumeralRus,
SentenceRus,
QuestionRus,
RelativeRus,
ConjunctionRus,
PhraseRus,
TextX,
StructuralRus,
IdiomRus
** { flags startcat = Phr ; unlexer = text ; lexer = text ;} ;

View File

@@ -0,0 +1,58 @@
--# -path=.:../abstract:../common:../../prelude
concrete IdiomRus of Idiom = CatRus ** open Prelude, ResRus, MorphoRus in {
flags optimize=all_subs ; coding=utf8 ;
lin
ExistNP = \bar ->
{s =\\b,clf => case b of
{Pos => verbSuchestvovat.s ! (getActVerbForm clf (pgen2gen bar.g) Sg P3)
++ bar.s ! PF Nom No NonPoss;
Neg => "не" ++ verbSuchestvovat.s ! (getActVerbForm clf (pgen2gen bar.g) Sg P3)
++ bar.s ! PF Nom No NonPoss
}
} ;
ExistIP Kto =
let { kto = Kto.s ! (PF Nom No NonPoss) } in
{s = \\b,clf,_ => case b of
{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 };
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 ! gn !Nom!Animate };
ImpPl1 vp = {s= "давайте" ++ vp.s! (ClIndic Future Simul)! APl ! P1};
ImpersCl vp = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
in
ne ++ vp.s! clf! (ASg Neut) ! P3 };
-- No direct correspondance in Russian. Usually expressed by infinitive:
-- "Если очень захотеть, можно в космос улететь"
-- (If one really wants one can fly into the space).
-- Note that the modal verb "can" is trasferred into adverb
-- "можно" (it is possible) in Russian
-- The closest subject is "ты" (you), which is omitted in the final sentence:
-- "Если очень захочешь, можешь в космос улететь"
GenericCl vp = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
in
"ты" ++ ne ++ vp.s! clf! (ASg Masc) ! P2 };
ProgrVP vp = vp ;
}

View File

@@ -0,0 +1,182 @@
--# -path=.:../abstract:../common:../../prelude
--
concrete IrregRus of IrregRusAbs = CatRus ** open ParadigmsRus in {
--
--flags optimize=values ;
--
-- lin
-- awake_V = irregV "awake" "awoke" "awoken" ;
-- bear_V = irregV "bear" "bore" "born" ;
-- beat_V = irregV "beat" "beat" "beat" ;
-- become_V = irregV "become" "became" "become" ;
-- begin_V = irregV "begin" "began" "begun" ;
-- bend_V = irregV "bend" "bent" "bent" ;
-- beset_V = irregV "beset" "beset" "beset" ;
-- bet_V = irregDuplV "bet" "bet" "bet" ;
-- bid_V = irregDuplV "bid" (variants {"bid" ; "bade"}) (variants {"bid" ; "bidden"}) ;
-- bind_V = irregV "bind" "bound" "bound" ;
-- bite_V = irregV "bite" "bit" "bitten" ;
-- bleed_V = irregV "bleed" "bled" "bled" ;
-- blow_V = irregV "blow" "blew" "blown" ;
-- break_V = irregV "break" "broke" "broken" ;
-- breed_V = irregV "breed" "bred" "bred" ;
-- bring_V = irregV "bring" "brought" "brought" ;
-- broadcast_V = irregV "broadcast" "broadcast" "broadcast" ;
-- build_V = irregV "build" "built" "built" ;
-- burn_V = irregV "burn" (variants {"burned" ; "burnt"}) (variants {"burned" ; "burnt"}) ;
-- burst_V = irregV "burst" "burst" "burst" ;
-- buy_V = irregV "buy" "bought" "bought" ;
-- cast_V = irregV "cast" "cast" "cast" ;
-- catch_V = irregV "catch" "caught" "caught" ;
-- choose_V = irregV "choose" "chose" "chosen" ;
-- cling_V = irregV "cling" "clung" "clung" ;
-- come_V = irregV "come" "came" "come" ;
-- cost_V = irregV "cost" "cost" "cost" ;
-- creep_V = irregV "creep" "crept" "crept" ;
-- cut_V = irregDuplV "cut" "cut" "cut" ;
-- deal_V = irregV "deal" "dealt" "dealt" ;
-- dig_V = irregDuplV "dig" "dug" "dug" ;
-- dive_V = irregV "dive" (variants {"dived" ; "dove"}) "dived" ;
-- do_V = mkV "do" "does" "did" "done" "doing" ;
-- draw_V = irregV "draw" "drew" "drawn" ;
-- dream_V = irregV "dream" (variants {"dreamed" ; "dreamt"}) (variants {"dreamed" ; "dreamt"}) ;
-- drive_V = irregV "drive" "drove" "driven" ;
-- drink_V = irregV "drink" "drank" "drunk" ;
-- eat_V = irregV "eat" "ate" "eaten" ;
-- fall_V = irregV "fall" "fell" "fallen" ;
-- feed_V = irregV "feed" "fed" "fed" ;
-- feel_V = irregV "feel" "felt" "felt" ;
-- fight_V = irregV "fight" "fought" "fought" ;
-- find_V = irregV "find" "found" "found" ;
-- fit_V = irregDuplV "fit" "fit" "fit" ;
-- flee_V = irregV "flee" "fled" "fled" ;
-- fling_V = irregV "fling" "flung" "flung" ;
-- fly_V = irregV "fly" "flew" "flown" ;
-- forbid_V = irregDuplV "forbid" "forbade" "forbidden" ;
-- forget_V = irregDuplV "forget" "forgot" "forgotten" ;
-- forgive_V = irregV "forgive" "forgave" "forgiven" ;
-- forsake_V = irregV "forsake" "forsook" "forsaken" ;
-- freeze_V = irregV "freeze" "froze" "frozen" ;
-- get_V = irregDuplV "get" "got" "gotten" ;
-- give_V = irregV "give" "gave" "given" ;
-- go_V = irregV "go" "went" "gone" ;
-- grind_V = irregV "grind" "ground" "ground" ;
-- grow_V = irregV "grow" "grew" "grown" ;
-- hang_V = irregV "hang" "hung" "hung" ;
-- have_V = mkV "have" "has" "had" "had" "having" ;
-- hear_V = irregV "hear" "heard" "heard" ;
-- hide_V = irregV "hide" "hid" "hidden" ;
-- hit_V = irregDuplV "hit" "hit" "hit" ;
-- hold_V = irregV "hold" "held" "held" ;
-- hurt_V = irregV "hurt" "hurt" "hurt" ;
-- keep_V = irregV "keep" "kept" "kept" ;
-- kneel_V = irregV "kneel" "knelt" "knelt" ;
-- knit_V = irregDuplV "knit" "knit" "knit" ;
-- know_V = irregV "know" "knew" "know" ;
-- lay_V = irregV "lay" "laid" "laid" ;
-- lead_V = irregV "lead" "led" "led" ;
-- leap_V = irregV "leap" (variants {"leaped" ; "lept"}) (variants {"leaped" ; "lept"}) ;
-- learn_V = irregV "learn" (variants {"learned" ; "learnt"}) (variants {"learned" ; "learnt"}) ;
-- leave_V = irregV "leave" "left" "left" ;
-- lend_V = irregV "lend" "lent" "lent" ;
-- let_V = irregDuplV "let" "let" "let" ;
-- lie_V = irregV "lie" "lay" "lain" ;
-- light_V = irregV "light" (variants {"lighted" ; "lit"}) "lighted" ;
-- lose_V = irregV "lose" "lost" "lost" ;
-- make_V = irregV "make" "made" "made" ;
-- mean_V = irregV "mean" "meant" "meant" ;
-- meet_V = irregV "meet" "met" "met" ;
-- misspell_V = irregV "misspell" (variants {"misspelled" ; "misspelt"}) (variants {"misspelled" ; "misspelt"}) ;
-- mistake_V = irregV "mistake" "mistook" "mistaken" ;
-- mow_V = irregV "mow" "mowed" (variants {"mowed" ; "mown"}) ;
-- overcome_V = irregV "overcome" "overcame" "overcome" ;
-- overdo_V = mkV "overdo" "overdoes" "overdid" "overdone" "overdoing" ;
-- overtake_V = irregV "overtake" "overtook" "overtaken" ;
-- overthrow_V = irregV "overthrow" "overthrew" "overthrown" ;
-- pay_V = irregV "pay" "paid" "paid" ;
-- plead_V = irregV "plead" "pled" "pled" ;
-- prove_V = irregV "prove" "proved" (variants {"proved" ; "proven"}) ;
-- put_V = irregDuplV "put" "put" "put" ;
-- quit_V = irregDuplV "quit" "quit" "quit" ;
-- read_V = irregV "read" "read" "read" ;
-- rid_V = irregDuplV "rid" "rid" "rid" ;
-- ride_V = irregV "ride" "rode" "ridden" ;
-- ring_V = irregV "ring" "rang" "rung" ;
-- rise_V = irregV "rise" "rose" "risen" ;
-- run_V = irregDuplV "run" "ran" "run" ;
-- saw_V = irregV "saw" "sawed" (variants {"sawed" ; "sawn"}) ;
-- say_V = irregV "say" "said" "said" ;
-- see_V = irregV "see" "saw" "seen" ;
-- seek_V = irregV "seek" "sought" "sought" ;
-- sell_V = irregV "sell" "sold" "sold" ;
-- send_V = irregV "send" "sent" "sent" ;
-- set_V = irregDuplV "set" "set" "set" ;
-- sew_V = irregV "sew" "sewed" (variants {"sewed" ; "sewn"}) ;
-- shake_V = irregV "shake" "shook" "shaken" ;
-- shave_V = irregV "shave" "shaved" (variants {"shaved" ; "shaven"}) ;
-- shear_V = irregV "shear" "shore" "shorn" ;
-- shed_V = irregDuplV "shed" "shed" "shed" ;
-- shine_V = irregV "shine" "shone" "shone" ;
-- shoe_V = irregV "shoe" "shoed" (variants {"shoed" ; "shod"}) ;
-- shoot_V = irregV "shoot" "shot" "shot" ;
-- show_V = irregV "show" "showed" (variants {"showed" ; "shown"}) ;
-- shrink_V = irregV "shrink" "shrank" "shrunk" ;
-- shut_V = irregDuplV "shut" "shut" "shut" ;
-- sing_V = irregV "sing" "sang" "sung" ;
-- sink_V = irregV "sink" "sank" "sunk" ;
-- sit_V = irregDuplV "sit" "sat" "sat" ;
-- sleep_V = irregV "sleep" "slept" "slept" ;
-- slay_V = irregV "slay" "slew" "slain" ;
-- slide_V = irregV "slide" "slid" "slid" ;
-- sling_V = irregV "sling" "slung" "slung" ;
-- slit_V = irregDuplV "slit" "slit" "slit" ;
-- smite_V = irregV "smite" "smote" "smitten" ;
-- sow_V = irregV "sow" "sowed" (variants {"sowed" ; "sown"}) ;
-- speak_V = irregV "speak" "spoke" "spoken" ;
-- speed_V = irregV "speed" "sped" "sped" ;
-- spend_V = irregV "spend" "spent" "spent" ;
-- spill_V = irregV "spill" (variants {"spilled" ; "spilt"}) (variants {"spilled" ; "spilt"}) ;
-- spin_V = irregDuplV "spin" "spun" "spun" ;
-- spit_V = irregDuplV "spit" (variants {"spit" ; "spat"}) "spit" ;
-- split_V = irregDuplV "split" "split" "split" ;
-- spread_V = irregV "spread" "spread" "spread" ;
-- spring_V = irregV "spring" (variants {"sprang" ; "sprung"}) "sprung" ;
-- stand_V = irregV "stand" "stood" "stood" ;
-- steal_V = irregV "steal" "stole" "stolen" ;
-- stick_V = irregV "stick" "stuck" "stuck" ;
-- sting_V = irregV "sting" "stung" "stung" ;
-- stink_V = irregV "stink" "stank" "stunk" ;
-- stride_V = irregV "stride" "strod" "stridden" ;
-- strike_V = irregV "strike" "struck" "struck" ;
-- string_V = irregV "string" "strung" "strung" ;
-- strive_V = irregV "strive" "strove" "striven" ;
-- swear_V = irregV "swear" "swore" "sworn" ;
-- sweep_V = irregV "sweep" "swept" "swept" ;
-- swell_V = irregV "swell" "swelled" (variants {"swelled" ; "swollen"}) ;
-- swim_V = irregDuplV "swim" "swam" "swum" ;
-- swing_V = irregV "swing" "swung" "swung" ;
-- take_V = irregV "take" "took" "taken" ;
-- teach_V = irregV "teach" "taught" "taught" ;
-- tear_V = irregV "tear" "tore" "torn" ;
-- tell_V = irregV "tell" "told" "told" ;
-- think_V = irregV "think" "thought" "thought" ;
-- thrive_V = irregV "thrive" (variants {"thrived" ; "throve"}) "thrived" ;
-- throw_V = irregV "throw" "threw" "thrown" ;
-- thrust_V = irregV "thrust" "thrust" "thrust" ;
-- tread_V = irregV "tread" "trod" "trodden" ;
-- understand_V = irregV "understand" "understood" "understood" ;
-- uphold_V = irregV "uphold" "upheld" "upheld" ;
-- upset_V = irregDuplV "upset" "upset" "upset" ;
-- wake_V = irregV "wake" "woke" "woken" ;
-- wear_V = irregV "wear" "wore" "worn" ;
-- weave_V = irregV "weave" (variants {"weaved" ; "wove"}) (variants {"weaved" ; "woven"}) ;
-- wed_V = irregDuplV "wed" "wed" "wed" ;
-- weep_V = irregV "weep" "wept" "wept" ;
-- wind_V = irregV "wind" "wound" "wound" ;
-- win_V = irregDuplV "win" "won" "won" ;
-- withhold_V = irregV "withhold" "withheld" "withheld" ;
-- withstand_V = irregV "withstand" "withstood" "withstood" ;
-- wring_V = irregV "wring" "wrung" "wrung" ;
-- write_V = irregV "write" "wrote" "written" ;
}

View File

@@ -1,25 +1,17 @@
--# -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 ;
}
--# -path=.:../abstract:../common:../../prelude
concrete LangRus of Lang =
NounRus,
VerbRus,
AdjectiveRus,
AdverbRus,
NumeralRus,
SentenceRus,
QuestionRus,
RelativeRus,
ConjunctionRus,
PhraseRus,
TextX,
StructuralRus,
IdiomRus,
LexiconRus ** { flags startcat = Phr ; unlexer = text ; lexer = text ;} ;

View File

@@ -0,0 +1,409 @@
--# -path=.:../abstract:../common:../../prelude
--
concrete LexiconRus of Lexicon = CatRus **
open ParadigmsRus, Prelude, StructuralRus, MorphoRus in {
--, IrregRus
flags
optimize=values ;
coding=utf8 ;
lin
airplane_N = nTelefon "самолет" ;
answer_V2S = dirV2 (regV imperfective first "отвеча" "ю" "отвечал" "отвечай" "отвечать" );
apartment_N = nMashina "квартир" ;
apple_N = nChislo "яблок" ;
art_N = nChislo "искусств" ;
ask_V2Q = dirV2 (regV imperfective first "спрашива" "ю" "спрашивал" "спрашивай" "спрашивать") ;
baby_N = nMalush "малыш";
bad_A = AKakoj_Nibud "плох" "" "хуже";
bank_N = nBank "банк" ;
beautiful_A = AStaruyj "красив" "красивее";
become_VA = regV perfective second "станов" "лю" "стал" "стань" "стать" ;
beer_N = nChislo "пив" ;
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 = 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 "брат") ;
brown_A = AStaruyj "коричнев" "коричневее";
butter_N = nChislo "масл";
buy_V2 = dirV2 (regV imperfective first "покупа" "ю" "покупал" "покупай" "покупать" );
camera_N = nMashina "kamer" ;
cap_N = nNoga "чашк" ; -- чаш-ек Pl-Gen
car_N = nMashina "машин" ;
carpet_N = mkN "ковёр" "ковра" "ковру" "ковёр" "ковром" "ковре" "ковры" "ковров" "коврам" "ковры" "коврами" "коврах" masculine inanimate;
cat_N = nMashina "кошк" ;
ceiling_N = nPotolok "потол" ;
chair_N = nStul "стул" ;
cheese_N = nTelefon "сыр" ;
child_N = mkN "ребёнок" "ребёнка" "ребёнку" "ребёнка" "ребёнком" "ребёнке" "дети" "детей" "детям" "детей" "детьми" "детях" masculine animate ;
church_N = mkN "церковь" "церкви" "церкви" "церковь" "церковью" "церкви" "церкви" "церквей" "церквям" "церкви" "церквями" "церквях" masculine inanimate;
city_N = nAdres "город" ;
clean_A = AStaruyj "чист" "чище";
clever_A = AStaruyj "умн" "умнее";
close_V2= dirV2 (regV imperfective first "закрыва" "ю" "закрывал" "закрывай" "закрывать" );
coat_N = mkIndeclinableNoun "пальто" masculine inanimate ;
cold_A = AStaruyj "холодн" "холоднее";
come_V = regV imperfective first "прихо" "жу" "приходил" "приходи" "приходить" ;
computer_N = nTelefon "компьютер" ;
country_N = nMashina "стран" ;
cousin_N = nTelefon "кузен" ;
cow_N = nMashina "коров" ;
die_V = regV imperfective first "умира" "ю" "умирал" "умирай" "умирать" ;
dirty_A = AStaruyj "грязн" "грязнее" ;
doctor_N = nAdres "доктор" ;
dog_N = nNoga "собак" ;
door_N = nBol "двер" ;
drink_V2 = dirV2 (regV imperfective firstE "пь" "ю" "пил" "пей" "пить" );
eat_V2 = dirV2 (regV imperfective first "куша" "ю" "кушал" "кушай" "кушать" );
enemy_N = nStomatolog "враг" ;
factory_N = nNoga "фабрик" ;
father_N2 = mkN2 (mkN "отец" "отца" "отцу" "отца" "отцом" "отце" "отцы" "отцов" "отцам" "отцов" "отцами" "отцах" masculine animate);
fear_VS= regV imperfective second "бо" "ю" "боял" "бой" "боять" ;
find_V2 = dirV2 (mkVerbum imperfective "нахожу" "находишь" "находит" "находим" "находите" "находят" "находил" "находи" "находить" );
fish_N = nMashina "рыб" ;
floor_N = nTelefon "пол" ;
forget_V2= dirV2 (regV imperfective first "забыва" "ю" "забывал" "забывай" "забывать" );
fridge_N = nBank "холодильник" ;
friend_N = mkN "друг" "друга" "другу" "друга" "другом" "друге" "друзья" "друзей" "друзьям" "друзей" "дузьями" "друзьях" masculine animate;
fruit_N = nTelefon "фрукт" ;
garden_N = nTelefon "сад" ;
girl_N = nNoga "девочк" ;
glove_N = nNoga "перчатк" ;
gold_N = nChislo "золот" ;
good_A = AKhoroshij "хорош" "лучше" ;
go_V= regV imperfective second "хо" "жу" "ходил" "ходи" "ходить" ;
green_A = AStaruyj "зелен" "зеленее" ;
harbour_N = nTelefon "залив" ;
hate_V2= dirV2 (regV imperfective second "ненави" "жу" "ненавидел" "ненавидь" "ненавидеть" );
hat_N = nMashina "шляп" ;
have_V2= dirV2 (regV imperfective first "име" "ю" "имел" "имей" "иметь" );
hear_V2= dirV2 (regV imperfective first "слуша" "ю" "слушал" "слушай" "слушать" );
hill_N = nTelefon "холм" ;
hope_VS= regV imperfective first "наде" "ю" "надеял" "надей" "надеять" ;
horse_N = nBol "лошад" ;
hot_A = AKhoroshij "горяч" "горячее" ;
house_N = nAdres "дом" ;
important_A = AStaruyj "важн" "важнее" ;
industry_N = nChislo "производств" ;
iron_N = nChislo "желез" ;
king_N = mkN "король" "короля" "королю" "короля" "королем" "короле" "короли" "королей" "королям" "королей" "королями" "королях" masculine animate;
know_V2= dirV2 (regV imperfective first "зна" "ю" "знал" "знай" "знать" );
lake_N = nChislo "озер" ;
lamp_N = nMashina "ламп" ;
learn_V2= dirV2 (regV imperfective second "уч" "у" "учил" "учи" "учить" );
leather_N = nEdinica "кож" ;
leave_V2= dirV2 (regV imperfective second "ухож" "у" "уходил" "уходи" "уходить" );
like_V2= dirV2 (regV imperfective second "нрав" "лю" "нравил" "нравь" "нравить" );
listen_V2= dirV2 (regV imperfective first "слуша" "ю" "слушал" "слушай" "слушать" );
live_V= regV imperfective firstE "жив" "у" "жил" "живи" "жить" ;
long_A = AStaruyj "длинн" "длиннее" ;
lose_V2 = dirV2 (regV imperfective first "теря" "ю" "терял" "теряй" "терять" );
love_N = nBol "любов" ;
love_V2= dirV2 (regV imperfective second "люб" "лю" "любил" "люби" "любить" );
man_N = nStomatolog "человек" ;
meat_N =nChislo "мяс" ;
milk_N = nChislo "молок" ;
moon_N = nMashina "лун" ;
mother_N2 = mkN2 ( nMashina "мам") ;
mountain_N = nMashina "гор" ;
music_N = nNoga "музык" ;
narrow_A = AStaruyj "узк" "уже" ;
new_A = AStaruyj "нов" "новее" ;
newspaper_N = nMashina "газет" ;
oil_N = nBol "нефть" ;
old_A = AStaruyj "стар" "старше" ;
open_V2= dirV2 (regV imperfective first "открыва" "ю" "открывал" "открывай" "открывать" );
paper_N = nNoga "бумаг" ;
peace_N = nTelefon "мир" ;
pen_N = nNoga "ручк" ;
planet_N = nMashina "планет" ;
plastic_N = nMashina "пластмасс" ;
play_V2 = mkV2 (regV imperfective first "игра" "ю" "играл" "играй" "играть" ) "c" instructive;
policeman_N = nTelefon "милиционер" ;
priest_N = nStomatolog "священник" ;
queen_N = nMashina "королев" ;
radio_N = mkIndeclinableNoun "радио" neuter inanimate;
read_V2 = dirV2 (regV imperfective first "чита" "ю" "читал" "читай" "читать" );
red_A = AStaruyj "красн" "краснее" ;
religion_N = nMalyariya "религи" ;
restaurant_N = nTelefon "ресторан" ;
river_N = nNoga "рек" ;
rock_N = nUroven "кам" ;
roof_N = nEdinica "крыш" ;
rubber_N = nMashina "резин" ;
run_V = regV imperfective first "бега" "ю" "бегал" "бегай" "бегать" ;
say_VS = regV imperfective second "говор" "ю" "говорил" "говори" "говорить" ;
school_N = nMashina "школ" ;
science_N = nNoga "наук" ;
sea_N = nProizvedenie "мор" ;
seek_V2 = dirV2 (regV imperfective first "ищ" "у" "искал" "ищи" "искать" );
see_V2 = dirV2 (regV imperfective second "виж" "у" "видел" "видь" "видеть" );
sell_V3 = tvDirDir (regV imperfective firstE "прода" "ю" "продавал" "продавай" "продавать" );
send_V3 = tvDirDir (regV imperfective first "посыла" "ю" "посылал" "посылай" "посылать" );
sheep_N = nMashina "овц" ;
ship_N = nNol "корабл" ;
shirt_N = nNoga "рубашк" ;
shoe_N = mkN "туфля" "туфли" "туфле" "туфлю" "туфлей" "туфле" "туфли" "туфель" "туфлям" "туфли" "туфлями" "туфлях" masculine inanimate;
shop_N = nTelefon "магазин" ;
short_A = AMalenkij "коротк" "короче" ;
silver_N = nChislo "серебр" ;
sister_N = nMashina "сестр" ;
sleep_V = regV imperfective second "сп" "лю" "спал" "спи" "спать" ;
small_A = AMalenkij "маленьк" "меньше" ;
snake_N = nTetya"зме" ;
sock_N = nPotolok "нос" ;
speak_V2 = dirV2 (regV imperfective second "говор" "ю" "говорил" "говори" "говорить" );
star_N = nMashina "звезд" ;
steel_N = nBol "стал" ;
stone_N = nNol "камен" ;
stove_N = nBol "печ" ;
student_N = nTelefon "студент" ;
stupid_A = AMolodoj "тупой" "тупее" ;
sun_N = mkN "солнце" "солнца" "солнцу" "солнце" "солнцем" "солнце" "солнца" "солнц" "солнцам" "солнца" "солнцами" "солнцах" neuter inanimate;
switch8off_V2 = dirV2 (regV imperfective first "выключа" "ю" "выключал" "выключай" "выключать") ;
switch8on_V2 = dirV2 (regV imperfective first "включа" "ю" "включал" "включай" "включать") ;
table_N = nTelefon "стол" ;
teacher_N = nNol "учител" ;
teach_V2 = dirV2 (regV imperfective second "уч" "у" "учил" "учи" "учить" );
television_N = nProizvedenie "телевидени" ;
thick_A = AStaruyj "толст" "толще" ;
thin_A = AMalenkij "тонк" "тоньше" ;
train_N = nAdres "поезд" ;
travel_V = regV imperfective first "путешеству" "ю" "путешествовал" "путешествуй" "путешествовать" ;
tree_N = nChislo "дерев" ;
--trousers_N = mkN "" "" "" "" "" "" "штаны" "штанов" "штанам" "штаны" "штанами" "штанах" masculine inanimate;
ugly_A = AStaruyj "некрасив" "некрасивее" ;
understand_V2 = dirV2 (regV imperfective first "понима" "ю" "понимал" "понимай" "понимать" );
university_N = nTelefon "университет" ;
village_N = nMalyariya "деревн" ;
wait_V2 = dirV2 (regV imperfective firstE "жд" "у" "ждал" "жди" "ждать" );
walk_V = regV imperfective first "гуля" "ю" "гулял" "гуляй" "гулять" ;
warm_A = AStaruyj "тёпл" "теплее" ;
war_N = nMashina "войн" ;
watch_V2 = dirV2 (regV imperfective second "смотр" "ю" "смотрел" "смотри" "смотреть" );
water_N = nMashina "вод" ;
white_A = AStaruyj "бел" "белее" ;
window_N = nChislo "окн" ;
wine_N = nChislo "вин" ;
win_V2 = dirV2 (regV imperfective first "выигрыва" "ю" "выигрывал" "выигрывай" "выигрывать" );
woman_N = nZhenchina "женщин" ;
wood_N = nChislo "дерев" ;
write_V2 = dirV2 (regV imperfective first "пиш" "у" "писал" "пиши" "писать" );
yellow_A = AStaruyj "жёлт" "желтее" ;
young_A = AMolodoj "молод" "моложе";
do_V2 = dirV2 (regV imperfective first "дела" "ю" "делал" "делай" "делать" );
now_Adv = mkAdv "сейчас" ;
already_Adv = mkAdv "уже" ;
song_N = nTetya "песн" ;
add_V3 = mkV3 (regV imperfective first "складыва" "ю" "складывал" "складывай" "складывать" ) "" "в" accusative accusative;
number_N = nChislo "числ" ;
put_V2 = dirV2 (regV imperfective firstE "клад" "у" "клал" "клади" "класть" );
stop_V = regV imperfective first "останавлива" "ю" "останавливал" "останавливай" "останавливать";
jump_V = regV imperfective first "прыга" "ю" "прыгал" "прыгай" "прыгать" ;
distance_N3 = mkN3 (nProizvedenie "расстояни") from_Prep to_Prep ;
-- in Russian combinations with verbs are expressed with adverbs:
-- "легко понять" ("easy to understand"), which is different from
-- adjective expression "легкий для понимания" ("easy for understanding")
-- So the next to words are adjectives, since there are such adjectives
-- in Russian, but to use them with verb would be wrong in Russian:
fun_AV = AStaruyj "весёл" "веселее";
easy_A2V = mkA2 (AMalenkij "лёгк" "легче") "для" genitive ;
empty_A = AMolodoj "пуст" "пустее";
married_A2 = mkA2 (adjInvar "замужем") "за" instructive ;
paint_V2A = dirV2 (regV imperfective first "рису" "ю" "рисовал" "рисуй" "рисовать" ) ;
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 "интересу" "ю" "интересовал" "интересуй" "интересовать";
-- Nouns
animal_N = nZhivotnoe "животн" ;
ashes_N = nPepel "пеп" ;
back_N = nMashina "спин" ;
bark_N = mkN "лай" "лая" "лаю" "лай" "лаем" "лае" "лаи" "лаев" "лаям" "лаи" "лаями" "лаях" masculine inanimate;
belly_N = nTelefon "живот" ;
bird_N = nEdinica "птиц" ;
blood_N = nBol "кров" ;
bone_N = nBol "кост" ;
breast_N = nBol "грудь" ;
cloud_N = nChislo "облак" ;
day_N = mkN "день" "дня" "дню" "день" "днём" "дне" "дни" "дней" "дням" "дни" "днями" "днях" masculine inanimate ;
dust_N = nBol "пыл" ;
ear_N = nChislo "ухо" ;
earth_N = nTetya "земл" ;
egg_N = nChislo "яйц" ;
eye_N = nAdres "глаз" ;
fat_N = nBank "жир" ;
-- father_N = UseN2 father_N2 ;
feather_N = mkN "перо" "пера" "перу" "пера" "пером" "пере" "перья" "перьев" "перьям" "перьев" "перьями" "перьях" neuter inanimate ;
fingernail_N = mkN "ноготь" "ногтя" "ногтю" "ногтя" "ногтем" "ногте" "ногти" "ногтей" "ногтям" "ногтей" "ногтями" "ногтях" masculine inanimate ;
fire_N = mkN "огонь" "огня" "огню" "огня" "огнём" "огне" "огни" "огней" "огням" "огней" "огнями" "огнях" masculine inanimate ;
fish_N = nMashina "рыб" ;
flower_N = mkN "отец" "отца" "отцу" "отца" "отцом" "отце" "отцы" "отцов" "отцам" "отцов" "отцами" "отцах" masculine animate ;
fog_N = nTelefon "туман" ;
foot_N = nTetya "ступн" ;
forest_N = nAdres "лес" ;
fruit_N = nTelefon "фрукт";
grass_N = nMashina "трав" ;
guts_N = nBol "внутренност" ;
hair_N = nTelefon "волос" ;
hand_N = nNoga "рук" ;
head_N = nMashina "голов" ;
heart_N = mkN "сердце" "сердца" "сердцу" "сердца" "сердцем" "сердце" "сердца" "сердец" "сердцам" "сердец" "сердцами" "сердцах" neuter inanimate;
horn_N = nAdres "рог" ;
husband_N = mkN "муж" "мужа" "мужу" "мужа" "мужем" "муже" "мужья" "мужей" "мужьям" "мужей" "мужьями" "мужьях" masculine animate ;
ice_N = mkN "лёд" "льда" "льду" "льда" "льдом" "льде" "льды" "льдов" "льдам" "льдов" "льдами" "льдах" masculine inanimate ;
knee_N = mkN "колено" "колена" "колену" "колена" "коленом" "колене" "колени" "колен" "коленам" "колен" "коленями" "коленях" neuter inanimate ;
lake_N = nChislo "озер" ;
leaf_N = nStul "лист" ;
leg_N = nNoga "ног" ;
liver_N = nBol "печен" ;
louse_N = mkN "вошь" "вши" "вши" "вошь" "вошью" "вше" "вши" "вшей" "вшам" "вшей" "вшами" "вшах" feminine animate ;
meat_N = nChislo "мяс" ;
moon_N = nMashina "лун" ;
mountain_N = nMashina "гор" ;
mouth_N = mkN "рот" "рта" "рту" "рот" "ртом" "рте" "рты" "ртов" "ртам" "рты" "ртами" "ртах" masculine inanimate;
name_N = mkN "имя" "имени" "имени" "имя" "именем" "имени" "имена" "имён" "именам" "имена" "именами" "именах" neuter inanimate;
neck_N = nTetya "ше" ;
night_N = nBol "ноч" ;
nose_N = nTelefon "нос" ;
person_N = nBol "личность" ;
rain_N = nNol "дожд" ;
road_N = nNoga "дорог" ;
root_N = nUroven "кор" ;
rope_N = nNoga "веревк" ;
salt_N = nBol "сол" ;
sand_N = mkN "песок" "песка" "песку" "песок" "песком" "песке" "пески" "песков" "пескам" "песков" "песками" "песках" masculine inanimate ;
sea_N = nProizvedenie "мор" ;
seed_N = mkN "семя" "семени" "семении" "семя" "семенем" "семени" "семена" "семян" "семенам" "семена" "семенами" "семенах" neuter inanimate ;
skin_N = nEdinica "кож" ;
sky_N = mkN "небо" "неба" "небу" "небо" "небом" "небе" "небеса" "небес" "небесам" "небес" "небесами" "небесах" neuter inanimate ;
smoke_N = nTelefon "дым" ;
snake_N = nTetya "зме" ;
snow_N = nAdres "снег" ;
star_N = nMashina "звезд" ;
stick_N = nNoga "палк" ;
tail_N = nTelefon "хвост" ;
tongue_N = nBank "язык" ;
tooth_N = nTelefon "зуб" ;
tree_N = nChislo "дерев" ;
water_N = nMashina "вод" ;
wife_N = nMashina "жен" ;
wind_N = mkN "ветер" "ветра" "ветру" "ветер" "ветром" "ветра" "ветров" "ветра" "ветрам" "ветров" "ветрами" "ветрах" masculine inanimate ;
wing_N = mkN "крыло" "крыла" "крылу" "крыло" "крылом" "крыле" "крылья" "крыльев" "крыльям" "крылья" "крыльями" "крыльях" neuter inanimate ;
worm_N = nNol "черв" ;
year_N = nAdres "год" ;
-- Verbs
bite_V2 = dirV2 (regV imperfective first "куса" "ю" "кусал" "кусай" "кусать");
blow_V = regV imperfective first "ду" "ю" "дул" "дуй" "дуть" ;
breathe_V = regV imperfective second "дыш" "у" "дышал" "дыши" "дышать" ;
burn_V = regV imperfective second "гор" "ю" "горел" "гори" "гореть" ;
count_V2 = dirV2 (regV imperfective first "счита" "ю" "считал" "считай" "считать" ) ;
cut_V2 = dirV2 (regV imperfective first "реж" "у" "резал" "режь" "резать" ) ;
dig_V = regV imperfective first "копа" "ю" "копал" "копай" "копать" ;
fall_V = regV imperfective first "пада" "ю" "падал" "падай" "падать" ;
fight_V2 = dirV2 (regV imperfective firstE "дер" "у" "драл" "дери" "драть" ) ;
float_V = regV imperfective firstE "плыв" "у" "плыл" "плыви" "плыть" ;
flow_V = regV imperfective firstE "тек" "у" "тёк" "теки" "течь" ;
fly_V = regV imperfective second "лета" "ю" "летал" "летай" "летать" ;
freeze_V = regV imperfective first "замерза" "ю" "замерзал" "замерзай" "замерзать" ;
give_V3 = tvDirDir (regV imperfective firstE "да" "ю" "давал" "давай" "давать" ) ;
hit_V2 = dirV2 (regV imperfective first "ударя" "ю" "ударял" "ударяй" "ударять" );
hold_V2 = dirV2 (regV imperfective second "держ" "у" "держал" "держи" "держать" );
hunt_V2 = dirV2 (regV imperfective second "охоч" "у" "охотил" "охоть" "охотить" ) ;
kill_V2 = dirV2 (regV imperfective first "убива" "ю" "убивал" "убивай" "убивать" ) ;
laugh_V = regV imperfective firstE "сме" "ю" "смеял" "смей" "смеять" ;
lie_V = regV imperfective firstE "лг" "у" "лгал" "лги" "лгать" ;
play_V = regV imperfective first "игра" "ю" "играл" "играй" "играть" ;
pull_V2 = dirV2 (regV imperfective first "тян" "у" "тянул" "тяни" "тянуть" ) ;
push_V2 = dirV2 (regV imperfective first "толка" "ю" "толкал" "толкай" "толкать" );
rub_V2 = dirV2 (regV imperfective firstE "тр" "у" "тёр" "три" "тереть" );
scratch_V2 = dirV2 (regV imperfective first "чеш" "у" "чесал" "чеши" "чесать" ) ;
sew_V = regV imperfective firstE "шь" "ю" "шил" "шей" "шить" ;
sing_V = regV imperfective firstE "по" "ю" "пел" "пой" "петь" ;
sit_V = mkVerbum imperfective "сижу" "сидишь" "сидит" "сидим" "сидите" "сидят" "сидел" "сиди" "сидеть" ;
smell_V = regV imperfective first "пахн" "у" "пахнул" "пахни" "пахнуть" ;
spit_V = regV imperfective firstE "плю" "ю" "плевал" "плюй" "плевать" ;
split_V2 = dirV2 (regV imperfective first "разбива" "ю" "разбивал" "разбей" "разбивать" ) ;
squeeze_V2 = dirV2 (regV imperfective first "сжима" "ю" "сжимал" "сжимай" "сжимать" ) ;
stab_V2 = dirV2 (regV imperfective first "кол" "ю" "колол" "коли" "колоть" ) ;
stand_V = regV imperfective second "сто" "ю" "стоял" "стой" "стоять" ;
suck_V2 = dirV2 (regV imperfective firstE "сос" "у" "сосал" "соси" "сосать") ;
swell_V = regV imperfective first "опуха" "ю" "опухал" "опухай" "опухать" ;
swim_V = regV imperfective first "плава" "ю" "плавал" "плавай" "плавать" ;
think_V = regV imperfective first "дума" "ю" "думал" "думай" "думать" ;
throw_V2 = dirV2 (regV imperfective first "броса" "ю" "бросал" "бросай" "бросать" ) ;
tie_V2 = dirV2 (regV imperfective first "вяж" "у" "вязал" "вяжи" "вязать") ;
turn_V = regV imperfective first "поворачива" "ю" "поворачивал" "поворачивай" "поворачивать" ;
vomit_V = regV imperfective firstE "рв" "у" "рвал" "рви" "рвать" ;
wash_V2 = dirV2 (regV imperfective first "мо" "ю" "мыл" "мой" "мыть" ) ;
wipe_V2 = dirV2 (regV imperfective first "вытира" "ю" "вытирал" "вытирай" "вытирать" );
correct_A = AStaruyj "правильн" "правильнее";
dry_A = AMolodoj "сух" "суше";
dull_A = AStaruyj "скучн" "скучнее";
far_Adv = mkAdv "далеко";
full_A = AStaruyj "полн" "полнее";
heavy_A = AStaruyj "тяжел" "тяжелее";
left_Ord = (uy_j_EndDecl "лев" ) ** {lock_A = <>};
near_A = AMalenkij "близк" "ближе";
right_Ord = (uy_j_EndDecl "прав") ** {lock_A = <>} ;
rotten_A = AMolodoj "гнил" "гнилее";
round_A = AStaruyj "кругл" "круглее";
sharp_A = AStaruyj "остр" "острее";
smooth_A = AMalenkij "гладк" "глаже";
straight_A = AMolodoj "прям" "прямее";
wet_A = AStaruyj "мокр" "мокрее";
wide_A = AMalenkij "широк" "шире";
fear_V2 =dirV2 (regV imperfective first "бо" "ю" "боял" "бой" "боять" );
paris_PN = mkPN "Париж" Masc Inanimate ;

View File

@@ -1,57 +0,0 @@
--# -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
} ;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +0,0 @@
--# -path=.:../abstract:../scandinavian:../../prelude
concrete MultimodalRus of Multimodal =
RulesRus, StructuralRus, BasicRus, TimeRus, DemonstrativeRus ** MultimodalI with
(Resource = ResourceRus),
(Basic = BasicRus),
(Lang = LangRus),
(DemRes = DemResRus) ;

View File

@@ -0,0 +1,185 @@
--# -path=.:../abstract:../common:../../prelude
concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
flags optimize=all_subs ;
lin
DetCN kazhduj okhotnik = {
s = \\c => case kazhduj.c of {
Nom =>
kazhduj.s ! AF (extCase c) okhotnik.anim (gNum okhotnik.g kazhduj.n) ++
okhotnik.s ! kazhduj.n ! (extCase c) ;
_ =>
kazhduj.s ! AF (extCase c) okhotnik.anim (gNum okhotnik.g kazhduj.n) ++
okhotnik.s ! kazhduj.n ! kazhduj.c };
n = kazhduj.n ;
p = P3 ;
pron = False;
g = case kazhduj.g of { PNoGen => (PGen okhotnik.g); _ => kazhduj.g };
anim = okhotnik.anim
} ;
UsePN masha = {
s = \\c => masha.s ! (extCase c) ;
p = P3; g = PGen masha.g ; anim = masha.anim ;
n = Sg; nComp = Sg; pron = False} ;
UsePron p = p ** {anim = Inanimate};
PredetNP pred np = {
s = \\pf => pred.s! (AF (extCase pf) np.anim (gNum (pgen2gen np.g) np.n))++ np.s ! pf ;
n = np.n;
p = np.p;
g = np.g;
anim = np.anim;
pron = np.pron
} ;
PPartNP np v2 = {
s = \\pf => np.s ! pf ++ v2.s ! VFORM Act VINF ;
-- no participles in the Verbum type as they behave as adjectives
n = np.n;
p = np.p;
g = np.g;
anim = np.anim;
pron = np.pron
} ;
AdvNP np adv = {
s = \\pf => np.s ! pf ++ adv.s ;
n = np.n;
p = np.p;
g = np.g;
anim = np.anim;
pron = np.pron
} ;
DetSg quant ord = {
s = \\af => quant.s!af ++ ord.s!af ;
n = quant.n;
g = quant.g;
c = quant.c
} ;
DetPl quant num ord = {
s = \\af => quant.s !af ++ num.s! (caseAF af) ! (genAF af) ++ ord.s!af ;
n = Pl;
g = quant.g;
c = quant.c
} ;
SgQuant quant = {s = quant.s; c=quant.c; g=quant.g; n= Sg} ;
PlQuant quant = {s = quant.s ; c=quant.c; g=quant.g; n= Pl} ;
PossPron p = {s = \\af => p.s ! mkPronForm (caseAF af) No (Poss (gNum (genAF af) (numAF af) )); c=Nom; g = PNoGen} ;
NoNum = {s = \\_,_ => []} ; -- cardinal numeral
NoOrd = {s = \\_ => []} ; -- adjective
-- unclear how to tell apart the numbers from their string representation,
-- so just leave a decimal representation, without case-suffixes:
NumInt i = {s = table { _ => table {_ => i.s } } } ;
-- OrdInt n = case n of {
-- 0|2|6 => (uy_oj_EndDecl n.s) ;
-- 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} ;
NumNumeral n = n ;
AdNum adn num = {s = \\c,n => adn.s ++ num.s!c!n} ;
OrdSuperl a = {s = a.s!Posit};
DefArt = {s = \\_=>[] ; c=Nom; g = PNoGen };
IndefArt = { s = \\_=>[] ; c=Nom; g = PNoGen };
MassDet = {s = \\_=>[] ; c=Nom; g = PNoGen; n = Sg} ;
UseN sb =
{s = \\n,c => sb.s ! SF n c ;
g = sb.g ;
anim = sb.anim
} ;
-- It is possible to use a function word as a common noun; the semantics is
-- often existential or indexical.
UseN2 x = x ;
UseN3 x = x ;
-- The application of a function gives, in the first place, a common noun:
-- "ключ от дома". From this, other rules of the resource grammar
-- give noun phrases, such as "ключи от дома", "ключи от дома
-- и от машины", and "ключ от дома и машины" (the
-- latter two corresponding to distributive and collective functions,
-- respectively). Semantics will eventually tell when each
-- of the readings is meaningful.
ComplN2 mama ivan =
{s = \\n, cas => case ivan.pron of
{ True => ivan.s ! (mkPronForm cas No (Poss (gNum mama.g n))) ++ mama.s ! n ! cas;
False => mama.s ! n ! cas ++ mama.s2 ++
ivan.s ! (mkPronForm mama.c Yes (Poss (gNum mama.g n)))
};
g = mama.g ;
anim = mama.anim
} ;
-- Two-place functions add one argument place.
-- There application starts by filling the first place.
ComplN3 poezd paris =
{s = \\n,c => poezd.s ! n ! c ++ poezd.s2 ++ paris.s ! (PF poezd.c Yes NonPoss) ;
g = poezd.g ; anim = poezd.anim;
s2 = poezd.s3; c = poezd.c2
} ;
-- The two main functions of adjective are in predication ("Иван - молод")
-- and in modification ("молодой человек"). Predication will be defined
-- later, in the chapter on verbs.
AdjCN khoroshij novayaMashina =
{s = \\n, c =>
khoroshij.s ! AF c novayaMashina.anim (gNum novayaMashina.g n) ++
novayaMashina.s ! n ! c ;
g = novayaMashina.g ;
anim = novayaMashina.anim
} ;
-- This is a source of the "man with a telescope" ambiguity, and may produce
-- strange things, like "машины всегда".
-- Semantics will have to make finer distinctions among adverbials.
AdvCN chelovek uTelevizora =
{s = \\n,c => chelovek.s ! n ! c ++ uTelevizora.s ;
g = chelovek.g ;
anim = chelovek.anim
} ;
-- Constructions like "the idea that two is even" are formed at the
-- 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 ;
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 ;
g = idea.g; anim = idea.anim
} ;
ApposCN cn s =
{s = \\n,c => cn.s ! n ! c ++ s.s! PF c No NonPoss ;
g = cn.g ;
anim = cn.anim
} ;
}

View File

@@ -1,11 +1,11 @@
concrete NumeralsRus of Numerals = open MorphoRus, Prelude in {
--# -path=.:../abstract:../common:../../prelude
concrete NumeralRus of Numeral = CatRus ** open ResRus in {
flags coding=utf8 ;
-- Toiska, 13/8/2000, AR with Arto Mustajoki.
-- the same as in SyntaxRus.gf, which is not visible here:
lincat Numeral = {s : Case => Gender => Str } ;
lincat Digit = {s : DForm => Gender => Str ; size : Size} ;
lincat Sub10 = {s : Place => DForm => Gender => Str ; size : Size} ;
lincat Sub100 = {s : Place => Gender => Str ; size : Size} ;
@@ -100,3 +100,4 @@ lin pot3plus n m =
--- TODO
--- raz/odin
}

View File

@@ -1,22 +1,36 @@
--# -path=.:../abstract:../../prelude
--# -path=.:../abstract:../../prelude:../common
--1 Russian Lexical Paradigms
--
-- Aarne Ranta, Janna Khegai 2003
-- Janna Khegai 2003--2006
--
-- This is an API to the user of the resource grammar
-- for adding lexical items. It give shortcuts for forming
-- expressions of basic categories: nouns, adjectives, verbs.
-- 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, $resource.Abs.gf$.
-- accessed through the resource syntax API, $Structural.gf$.
--
-- 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.
--
-- The following files are presupposed:
-- The structure of functions for each word class $C$ is the following:
-- 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$.
--
-- The following modules are presupposed:
resource ParadigmsRus = open
(Predef=Predef),
Prelude,
MorphoRus,
CatRus,
NounRus
in {
resource ParadigmsRus = open (Predef=Predef), Prelude, MorphoRus, SyntaxRus,
CategoriesRus, RulesRus in {
flags coding=utf8 ;
--2 Parameters
@@ -57,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;
@@ -68,11 +82,17 @@ 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 ;
-- мужчина, мужчины, мужчине, мужчину, мужчиной, мужчине
-- мужчины, мужчин, мужчинам, мужчин, мужчинами, мужчинах
-- The regular function captures the variants for some popular nouns
-- endings below:
regN : Str -> N ;
-- Here are some common patterns. The list is far from complete.
@@ -82,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)
@@ -95,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
@@ -114,9 +134,9 @@ nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-л
-- Nouns used as functions need a preposition. The most common is with Genitive.
mkFun : N -> Preposition -> Case -> N2 ;
mkFun : N -> Prep -> N2 ;
mkN2 : N -> N2 ;
mkN3 : N -> Preposition -> Preposition -> N3 ;
mkN3 : N -> Prep -> Prep -> N3 ;
-- Proper names.
@@ -136,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
@@ -152,18 +168,25 @@ nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-л
-- mkA : ( : Str) -> A ;
-- The regular function captures the variants for some popular adjective
-- 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 -> A ; -- ending with "-ый"
AMalenkij : Str -> A ; -- ending with "-ий", Gen - "маленьк-ого"
AKhoroshij : Str -> A ; -- ending with "-ий", Gen - "хорош-его"
AMolodoj : 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 -> A ; -- ending with "-ой",
AKakoj_Nibud : Str -> Str -> Str -> A ; -- ending with "-ой",
-- plural - "как-ие"
-- Two-place adjectives need a preposition and a case as extra arguments.
@@ -172,24 +195,22 @@ 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 ;
-- mkADeg : A -> Str -> ADeg ;
-- On top level, there are adjectival phrases. The most common case is
-- just to use a one-place adjective.
ap : A -> IsPostfixAdj -> AP ;
-- ap : A -> IsPostfixAdj -> AP ;
--2 Adverbs
-- Adverbs are not inflected. Most lexical ones have position
-- after the verb. Some can be preverbal (e.g. "always").
-- Adverbs are not inflected.
mkAdv : Str -> Adv ;
@@ -201,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
@@ -233,7 +251,9 @@ past : Tense ;
-- (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 - "-ить/-еть".
@@ -244,9 +264,10 @@ past : Tense ;
-- first person from with second person form:
-- "я люб-лю", "ты люб-ишь". Stems shoud be the same.
-- So the definition for verb "любить" looks like:
-- mkRegVerb Imperfective Second "люб" "лю" "любил" "люби" "любить";
-- regV Imperfective Second "люб" "лю" "любил" "люби" "любить";
mkRegVerb :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
@@ -262,21 +283,21 @@ past : Tense ;
-- Two-place verbs, and the special case with direct object. Notice that
-- a particle can be included in a $V$.
mkTV : V -> Str -> Case -> V2 ; -- "войти в дом"; "в", accusative
mkV2 : V -> Str -> Case -> V2 ; -- "войти в дом"; "в", accusative
mkV3 : V -> Str -> Str -> Case -> Case -> V3 ; -- "сложить письмо в конверт"
tvDir : V -> V2 ; -- "видеть", "любить"
dirV2 : V -> V2 ; -- "видеть", "любить"
tvDirDir : V -> V3 ;
-- The definitions should not bother the user of the API. So they are
-- hidden from the document.
--.
Gender = SyntaxRus.Gender ;
Case = SyntaxRus.Case ;
Number = SyntaxRus.Number ;
Animacy = SyntaxRus.Animacy;
Aspect = SyntaxRus.Aspect;
Voice = SyntaxRus.Voice ;
Tense = SyntaxRus.RusTense ;
Gender = MorphoRus.Gender ;
Case = MorphoRus.Case ;
Number = MorphoRus.Number ;
Animacy = MorphoRus.Animacy;
Aspect = MorphoRus.Aspect;
Voice = MorphoRus.Voice ;
--Tense = Tense ;
Bool = Prelude.Bool ;
Conjugation = MorphoRus.Conjugation;
first = First ;
@@ -304,8 +325,8 @@ dolzhen = Dolzhen;
passive = Pass ;
imperfective = Imperfective ;
perfective = Perfective ;
present = Present ;
past = Past ;
-- present = Present ;
--past = Past ;
-- Degree = Pos | Comp | Super ;
-- Person = P1 | P2 | P3 ;
-- AfterPrep = Yes | No ;
@@ -342,6 +363,32 @@ dolzhen = Dolzhen;
anim = anim
} ** {lock_N = <>} ;
regN = \ray ->
let
ra = Predef.tk 1 ray ;
y = Predef.dp 1 ray ;
r = Predef.tk 2 ray ;
ay = Predef.dp 2 ray ;
rays =
case y of {
"а" => nMashina ray ;
"ь" => nBol ray ;
"я" => case ay of {
"ия" => nMalyariya ray;
_ => nTetya ray };
"е" => case ay of {
"ее" => nObezbolivauchee ray ;
"ое" => nZhivotnoe ray ;
_ => nProizvedenie ray };
"о" => nChislo ray;
_=> nStomatolog ray
}
in
rays ;
nMashina = \s -> aEndInAnimateDecl s ** {lock_N = <>};
nEdinica = \s -> ej_aEndInAnimateDecl s ** {lock_N = <>};
nZhenchina = \s -> (aEndAnimateDecl s) ** { g = Fem ; anim = Animate } ** {lock_N = <>};
@@ -374,35 +421,62 @@ dolzhen = Dolzhen;
nNol = \s -> softSignEndDeclMasc s ** {lock_N = <>};
nUroven = \s -> EN_softSignEndDeclMasc s ** {lock_N = <>};
-- mkFun defined in syntax.RusU
mkN2 n = funGen n ** {lock_N2 = <>} ; -- defined in syntax.RusU
mkN3 n p r = mkCommNoun3 n p r ** {lock_N3 = <>} ; -- defined in syntax.RusU
-- An individual-valued function is a common noun together with the
-- preposition prefixed to its argument ("клZ+ о' дома").
-- The situation is analogous to two-place adjectives and transitive verbs.
--
-- We allow the genitive construction to be used as a variant of
-- all function applications. It would definitely be too restrictive only
-- to allow it when the required case is genitive. We don't know if there
-- are counterexamples to the liberal choice we've made.
mkFun f p = (UseN f) ** {s2 = p.s ; c = p.c}** {lock_N2 = <>} ;
-- The commonest cases are functions with Genitive.
mkN2 n = mkFun n nullPrep ;
nullPrep : Prep = {s = []; c= Gen; lock_Prep=<>} ;
mkN3 f p r = (UseN f) ** {s2 = p.s ; c=p.c; s3=r.s ; c2=r.c; lock_N3 = <>} ;
mkPN = \ivan, g, anim ->
case g of {
Masc => mkProperNameMasc ivan anim ;
_ => mkProperNameFem ivan anim
} ** {lock_PN =<>};
nounPN n = (mkCNProperName n)**{lock_PN=<>};
nounPN n = {s=\\c => n.s! SF Sg c; anim=n.anim; g=n.g; lock_PN=<>};
mkCN = UseN;
mkCN = UseN ;
mkNP = \x,y,z -> UsePN (mkPN x y z) ;
-- Adjective definitions
regA = \ray, comp ->
let
ay = Predef.dp 2 ray ;
rays =
case ay of {
"ый" => AStaruyj ray comp;
"ой" => AMolodoj ray comp;
"ий" => AMalenkij ray comp;
_=> AKhoroshij ray comp
}
in
rays ;
adjInvar = \s -> { s = \\af => s } ** {lock_A= <>};
adjInvar = \s -> { s = \\_,_ => s } ** {lock_A= <>};
AStaruyj s = uy_j_EndDecl s ** {lock_A = <>} ;
AKhoroshij s = shij_End_Decl s ** {lock_A= <>};
AMalenkij s = ij_EndK_G_KH_Decl s ** {lock_A= <>};
AMolodoj s = uy_oj_EndDecl s ** {lock_A= <>};
AKakoj_Nibud s t = i_oj_EndDecl s t ** {lock_A= <>};
AStaruyj s comp = mkAdjDeg (uy_j_EndDecl s) comp ** {lock_A = <>} ;
AKhoroshij s comp = mkAdjDeg (shij_End_Decl s) comp ** {lock_A= <>};
AMalenkij s comp = mkAdjDeg (ij_EndK_G_KH_Decl s) comp ** {lock_A= <>};
AMolodoj s comp = mkAdjDeg (uy_oj_EndDecl s) comp ** {lock_A= <>};
AKakoj_Nibud s t comp = mkAdjDeg (i_oj_EndDecl s t) comp ** {lock_A= <>};
mkA2 a p c= mkAdjective2 a p c ** {lock_A2 = <>};
mkADeg a s = mkAdjDeg a s ** {lock_ADeg = <>}; -- defined in morpho.RusU
mkA2 a p c= a ** {s2 = p ; c = c; lock_A2 = <>};
-- mkADeg a s = mkAdjDeg a s ** {lock_ADeg = <>}; -- defined in morpho.RusU
ap a p = mkAdjPhrase a p ** {lock_AP = <>}; -- defined in syntax module
-- ap a p = mkAdjPhrase a p ** {lock_AP = <>}; -- defined in syntax module
mkAdv x = ss x ** {lock_Adv = <>} ;
@@ -431,7 +505,7 @@ AMalenkij s = ij_EndK_G_KH_Decl s ** {lock_A= <>};
PRF APl P3 => plP3
};
mkRegVerb a b c d e f g = verbDecl a b c d e f g ** {lock_V = <>} ;
regV a b c d e f g = verbDecl a b c d e f g ** {lock_V = <>} ;
-- defined in morpho.RusU.gf
{-
mkV a b = extVerb a b ** {lock_V = <>}; -- defined in types.RusU.gf
@@ -444,9 +518,451 @@ AMalenkij s = ij_EndK_G_KH_Decl s ** {lock_A= <>};
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_V2 = <>}; -- defined in syntax.RusU.gf
tvDir v = mkDirectVerb v ** {lock_V2 = <>}; -- defined in syntax.RusU.gf
tvDirDir v = mkDirDirectVerb v ** {lock_V3 = <>}; -- defined in syntax.RusU.gf
mkV3 v s w c d = mkDitransVerb v s w c d ** {lock_V3 = <>}; -- defined in syntax.RusU.gf
mkV2 v p cas = v ** {s2 = p ; c = cas; lock_V2 = <>};
dirV2 v = mkV2 v [] Acc;
tvDirDir v = mkV3 v "" "" Acc Dat;
-- *Ditransitive verbs* are verbs with three argument places.
-- We treat so far only the rule in which the ditransitive
-- verb takes both complements to form a verb phrase.
mkV3 v s1 s2 c1 c2 = v ** {s2 = s1; c = c1; s4 = s2; c2=c2; lock_V3 = <>};
----2 Parameters
----
---- To abstract over gender names, we define the following identifiers.
--
--oper
-- Gender : Type ;
--
-- human : Gender ;
-- nonhuman : Gender ;
-- masculine : Gender ;
--
---- To abstract over number names, we define the following.
--
-- Number : Type ;
--
-- singular : Number ;
-- plural : Number ;
--
---- To abstract over case names, we define the following.
--
-- Case : Type ;
--
-- nominative : Case ;
-- genitive : Case ;
--
---- Prepositions are used in many-argument functions for rection.
--
-- Preposition : Type ;
--
--
----2 Nouns
--
---- Worst case: give all four forms and the semantic gender.
--
-- mkN : (man,men,man's,men's : Str) -> N ;
--
---- The regular function captures the variants for nouns ending with
---- "s","sh","x","z" or "y": "kiss - kisses", "flash - flashes";
---- "fly - flies" (but "toy - toys"),
--
-- regN : Str -> N ;
--
---- In practice the worst case is just: give singular and plural nominative.
--
-- mk2N : (man,men : Str) -> N ;
--
---- All nouns created by the previous functions are marked as
---- $nonhuman$. If you want a $human$ noun, wrap it with the following
---- function:
--
-- genderN : Gender -> N -> N ;
--
----3 Compound nouns
----
---- A compound noun ia an uninflected string attached to an inflected noun,
---- such as "baby boom", "chief executive officer".
--
-- compoundN : Str -> N -> N ;
--
--
----3 Relational nouns
----
---- Relational nouns ("daughter of x") need a preposition.
--
-- mkN2 : N -> Preposition -> N2 ;
--
---- The most common preposition is "of", and the following is a
---- shortcut for regular relational nouns with "of".
--
-- regN2 : Str -> N2 ;
--
---- Use the function $mkPreposition$ or see the section on prepositions below to
---- form other prepositions.
----
---- Three-place relational nouns ("the connection from x to y") need two prepositions.
--
-- mkN3 : N -> Preposition -> Preposition -> N3 ;
--
--
----3 Relational common noun phrases
----
---- In some cases, you may want to make a complex $CN$ into a
---- relational noun (e.g. "the old town hall of").
--
-- cnN2 : CN -> Preposition -> N2 ;
-- cnN3 : CN -> Preposition -> Preposition -> N3 ;
--
----
----3 Proper names and noun phrases
----
---- Proper names, with a regular genitive, are formed as follows
--
-- regPN : Str -> Gender -> PN ; -- John, John's
--
---- Sometimes you can reuse a common noun as a proper name, e.g. "Bank".
--
-- nounPN : N -> PN ;
--
---- To form a noun phrase that can also be plural and have an irregular
---- genitive, you can use the worst-case function.
--
-- mkNP : Str -> Str -> Number -> Gender -> NP ;
--
----2 Adjectives
--
---- Non-comparison one-place adjectives need two forms: one for
---- the adjectival and one for the adverbial form ("free - freely")
--
-- mkA : (free,freely : Str) -> A ;
--
---- For regular adjectives, the adverbial form is derived. This holds
---- even for cases with the variation "happy - happily".
--
-- regA : Str -> A ;
--
----3 Two-place adjectives
----
---- Two-place adjectives need a preposition for their second argument.
--
-- mkA2 : A -> Preposition -> A2 ;
--
---- Comparison adjectives may two more forms.
--
-- ADeg : Type ;
--
-- mkADeg : (good,better,best,well : Str) -> ADeg ;
--
---- The regular pattern recognizes two common variations:
---- "-e" ("rude" - "ruder" - "rudest") and
---- "-y" ("happy - happier - happiest - happily")
--
-- regADeg : Str -> ADeg ; -- long, longer, longest
--
---- However, the duplication of the final consonant is nor predicted,
---- but a separate pattern is used:
--
-- duplADeg : Str -> ADeg ; -- fat, fatter, fattest
--
---- If comparison is formed by "more, "most", as in general for
---- long adjective, the following pattern is used:
--
-- compoundADeg : A -> ADeg ; -- -/more/most ridiculous
--
---- From a given $ADeg$, it is possible to get back to $A$.
--
-- adegA : ADeg -> A ;
--
--
----2 Adverbs
--
---- Adverbs are not inflected. Most lexical ones have position
---- after the verb. Some can be preverbal (e.g. "always").
--
-- mkAdv : Str -> Adv ;
-- mkAdV : Str -> AdV ;
--
---- Adverbs modifying adjectives and sentences can also be formed.
--
-- mkAdA : Str -> AdA ;
--
----2 Prepositions
----
---- A preposition as used for rection in the lexicon, as well as to
---- build $PP$s in the resource API, just requires a string.
--
-- mkPreposition : Str -> Preposition ;
-- mkPrep : Str -> Prep ;
--
---- (These two functions are synonyms.)
--
----2 Verbs
----
---- Except for "be", the worst case needs five forms: the infinitive and
---- the third person singular present, the past indicative, and the
---- past and present participles.
--
-- mkV : (go, goes, went, gone, going : Str) -> V ;
--
---- The regular verb function recognizes the special cases where the last
---- character is "y" ("cry - cries" but "buy - buys") or "s", "sh", "x", "z"
---- ("fix - fixes", etc).
--
-- regV : Str -> V ;
--
---- The following variant duplicates the last letter in the forms like
---- "rip - ripped - ripping".
--
-- regDuplV : Str -> V ;
--
---- There is an extensive list of irregular verbs in the module $IrregularEng$.
---- In practice, it is enough to give three forms,
---- e.g. "drink - drank - drunk", with a variant indicating consonant
---- duplication in the present participle.
--
-- irregV : (drink, drank, drunk : Str) -> V ;
-- irregDuplV : (get, got, gotten : Str) -> V ;
--
--
----3 Verbs with a particle.
----
---- The particle, such as in "switch on", is given as a string.
--
-- partV : V -> Str -> V ;
--
----3 Reflexive verbs
----
---- By default, verbs are not reflexive; this function makes them that.
--
-- reflV : V -> V ;
--
----3 Two-place verbs
----
---- Two-place verbs need a preposition, except the special case with direct object.
---- (transitive verbs). Notice that a particle comes from the $V$.
--
-- mkV2 : V -> Preposition -> V2 ;
--
-- dirV2 : V -> V2 ;
--
----3 Three-place verbs
----
---- Three-place (ditransitive) verbs need two prepositions, of which
---- the first one or both can be absent.
--
-- mkV3 : V -> Preposition -> Preposition -> V3 ; -- speak, with, about
-- dirV3 : V -> Preposition -> V3 ; -- give,_,to
-- dirdirV3 : V -> V3 ; -- give,_,_
--
----3 Other complement patterns
----
---- Verbs and adjectives can take complements such as sentences,
---- questions, verb phrases, and adjectives.
--
-- mkV0 : V -> V0 ;
-- mkVS : V -> VS ;
-- mkV2S : V -> Str -> V2S ;
-- mkVV : V -> VV ;
-- mkV2V : V -> Str -> Str -> V2V ;
-- mkVA : V -> VA ;
-- mkV2A : V -> Str -> V2A ;
-- mkVQ : V -> VQ ;
-- mkV2Q : V -> Str -> V2Q ;
--
-- mkAS : A -> AS ;
-- mkA2S : A -> Str -> A2S ;
-- mkAV : A -> AV ;
-- mkA2V : A -> Str -> A2V ;
--
---- Notice: categories $V2S, V2V, V2A, V2Q$ are in v 1.0 treated
---- just as synonyms of $V2$, and the second argument is given
---- as an adverb. Likewise $AS, A2S, AV, A2V$ are just $A$.
---- $V0$ is just $V$.
--
-- V0, V2S, V2V, V2A, V2Q : Type ;
-- AS, A2S, AV, A2V : Type ;
--
--
----2 Definitions of paradigms
----
---- The definitions should not bother the user of the API. So they are
---- hidden from the document.
----.
--
-- Gender = MorphoEng.Gender ;
-- Number = MorphoEng.Number ;
-- Case = MorphoEng.Case ;
-- human = Masc ;
-- nonhuman = Neutr ;
-- masculine = Masc ;
-- feminine = Fem ;
-- singular = Sg ;
-- plural = Pl ;
-- nominative = Nom ;
-- genitive = Gen ;
--
-- Preposition = Str ;
--
-- regN = \ray ->
-- let
-- ra = Predef.tk 1 ray ;
-- y = Predef.dp 1 ray ;
-- r = Predef.tk 2 ray ;
-- ay = Predef.dp 2 ray ;
-- rays =
-- case y of {
-- "y" => y2ie ray "s" ;
-- "s" => ray + "es" ;
-- "z" => ray + "es" ;
-- "x" => ray + "es" ;
-- _ => case ay of {
-- "sh" => ray + "es" ;
-- "ch" => ray + "es" ;
-- _ => ray + "s"
-- }
-- }
-- in
-- mk2N ray rays ;
--
-- mk2N = \man,men ->
-- let mens = case last men of {
-- "s" => men + "'" ;
-- _ => men + "'s"
-- }
-- in
-- mkN man men (man + "'s") mens ;
--
-- mkN = \man,men,man's,men's ->
-- mkNoun man man's men men's ** {g = Neutr ; lock_N = <>} ;
--
-- genderN g man = {s = man.s ; g = g ; lock_N = <>} ;
--
-- compoundN s n = {s = \\x,y => s ++ n.s ! x ! y ; g=n.g ; lock_N = <>} ;
--
-- mkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p} ;
-- regN2 n = mkN2 (regN n) (mkPreposition "of") ;
-- mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
-- cnN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p} ;
-- cnN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
--
-- regPN n g = nameReg n g ** {lock_PN = <>} ;
-- nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ;
-- mkNP x y n g = {s = table {Gen => x ; _ => y} ; a = agrP3 n ;
-- lock_NP = <>} ;
--
-- mkA a b = mkAdjective a a a b ** {lock_A = <>} ;
-- regA a = regAdjective a ** {lock_A = <>} ;
--
-- mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
--
-- ADeg = A ; ----
--
-- mkADeg a b c d = mkAdjective a b c d ** {lock_A = <>} ;
--
-- regADeg happy =
-- let
-- happ = init happy ;
-- y = last happy ;
-- happie = case y of {
-- "y" => happ + "ie" ;
-- "e" => happy ;
-- _ => happy + "e"
-- } ;
-- happily = case y of {
-- "y" => happ + "ily" ;
-- _ => happy + "ly"
-- } ;
-- in mkADeg happy (happie + "r") (happie + "st") happily ;
--
-- duplADeg fat =
-- mkADeg fat
-- (fat + last fat + "er") (fat + last fat + "est") (fat + "ly") ;
--
-- compoundADeg a =
-- let ad = (a.s ! AAdj Posit)
-- in mkADeg ad ("more" ++ ad) ("most" ++ ad) (a.s ! AAdv) ;
--
-- adegA a = a ;
--
-- mkAdv x = ss x ** {lock_Adv = <>} ;
-- mkAdV x = ss x ** {lock_AdV = <>} ;
-- mkAdA x = ss x ** {lock_AdA = <>} ;
--
-- mkPreposition p = p ;
-- mkPrep p = ss p ** {lock_Prep = <>} ;
--
-- mkV a b c d e = mkVerb a b c d e ** {s1 = [] ; lock_V = <>} ;
--
-- regV cry =
-- let
-- cr = init cry ;
-- y = last cry ;
-- cries = (regN cry).s ! Pl ! Nom ; -- !
-- crie = init cries ;
-- cried = case last crie of {
-- "e" => crie + "d" ;
-- _ => crie + "ed"
-- } ;
-- crying = case y of {
-- "e" => case last cr of {
-- "e" => cry + "ing" ;
-- _ => cr + "ing"
-- } ;
-- _ => cry + "ing"
-- }
-- in mkV cry cries cried cried crying ;
--
-- regDuplV fit =
-- let fitt = fit + last fit in
-- mkV fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing") ;
--
-- irregV x y z = let reg = (regV x).s in
-- mkV x (reg ! VPres) y z (reg ! VPresPart) ** {s1 = [] ; lock_V = <>} ;
--
-- irregDuplV fit y z =
-- let
-- fitting = (regDuplV fit).s ! VPresPart
-- in
-- mkV fit (fit + "s") y z fitting ;
--
-- partV v p = verbPart v p ** {lock_V = <>} ;
-- reflV v = {s = v.s ; part = v.part ; lock_V = v.lock_V ; isRefl = True} ;
--
-- mkV2 v p = v ** {s = v.s ; s1 = v.s1 ; c2 = p ; lock_V2 = <>} ;
-- dirV2 v = mkV2 v [] ;
--
-- mkV3 v p q = v ** {s = v.s ; s1 = v.s1 ; c2 = p ; c3 = q ; lock_V3 = <>} ;
-- dirV3 v p = mkV3 v [] p ;
-- dirdirV3 v = dirV3 v [] ;
--
-- mkVS v = v ** {lock_VS = <>} ;
-- mkVV v = {
-- s = table {VVF vf => v.s ! vf ; _ => variants {}} ;
-- isAux = False ; lock_VV = <>
-- } ;
-- mkVQ v = v ** {lock_VQ = <>} ;
--
-- V0 : Type = V ;
-- V2S, V2V, V2Q, V2A : Type = V2 ;
-- AS, A2S, AV : Type = A ;
-- A2V : Type = A2 ;
--
-- mkV0 v = v ** {lock_V = <>} ;
-- mkV2S v p = mkV2 v p ** {lock_V2 = <>} ;
-- mkV2V v p t = mkV2 v p ** {s4 = t ; lock_V2 = <>} ;
-- mkVA v = v ** {lock_VA = <>} ;
-- mkV2A v p = mkV2 v p ** {lock_V2A = <>} ;
-- mkV2Q v p = mkV2 v p ** {lock_V2 = <>} ;
--
-- mkAS v = v ** {lock_A = <>} ;
-- mkA2S v p = mkA2 v p ** {lock_A = <>} ;
-- mkAV v = v ** {lock_A = <>} ;
-- mkA2V v p = mkA2 v p ** {lock_A2 = <>} ;
--
} ;

View File

@@ -0,0 +1,25 @@
--# -path=.:../abstract:../common:../../prelude
concrete PhraseRus of Phrase = CatRus ** open Prelude, ResRus in {
lin
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
UttS s = s ;
UttQS qs = {s = qs.s ! QDir} ;
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Masc! Sg} ;
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Masc!Pl} ;
UttIP ip = {s = ip.s ! PF Nom No NonPoss} ; --- Acc also
UttIAdv iadv = iadv ;
UttNP np = {s = np.s ! PF Acc No NonPoss} ;
UttVP vp = {s = vp.s ! ClInfinit ! ASg Masc! P3} ;
UttAdv adv = adv ;
NoPConj = {s = []} ;
PConjConj conj = conj ;
NoVoc = {s = []} ;
VocNP np = {s = "," ++ np.s ! PF Nom No NonPoss} ;
}

View File

@@ -0,0 +1,55 @@
--# -path=.:../abstract:../common:../../prelude
concrete QuestionRus of Question = CatRus ** open ResRus, Prelude in {
flags optimize=all_subs ;
lin
QuestCl cl = {s = \\b,cf,_ => cl.s ! b ! cf } ;
QuestVP kto spit =
{s = \\b,clf,qf => (predVerbPhrase kto spit).s!b!clf } ;
QuestSlash Kto yaGovoruO =
let { kom = Kto.s ! (mkPronForm yaGovoruO.c No NonPoss) ; o = yaGovoruO.s2 } in
{s = \\b,clf,_ => o ++ kom ++ yaGovoruO.s ! b ! clf
} ;
QuestIAdv kak tuPozhivaesh =
{s = \\b,clf,q => kak.s ++ tuPozhivaesh.s!b!clf } ;
QuestIComp kak tuPozhivaesh =
{s = \\b,clf,q => let ne = case b of {Neg => ""; Pos => []}
in
kak.s ++ ne ++tuPozhivaesh.s! PF Nom No NonPoss } ;
PrepIP p ip = {s = p.s ++ ip.s ! PF Nom No NonPoss} ;
AdvIP ip adv = {
s = \\c => ip.s ! c ++ adv.s ;
n = ip.n; p=ip.p; g=ip.g; anim=ip.anim; pron=ip.pron
} ;
IDetCN kakoj pyat umeluj okhotnik =
{s = \\pf => case kakoj.c of {
Nom =>
kakoj.s ! AF (extCase pf) okhotnik.anim (gNum okhotnik.g kakoj.n) ++
pyat.s! (extCase pf) ! okhotnik.g ++
umeluj.s!AF (extCase pf) okhotnik.anim (gNum okhotnik.g kakoj.n)++
okhotnik.s ! kakoj.n ! (extCase pf) ;
_ =>
kakoj.s ! AF (extCase pf) okhotnik.anim (gNum okhotnik.g kakoj.n) ++
pyat.s! (extCase pf) ! okhotnik.g ++
umeluj.s!AF (extCase pf) okhotnik.anim (gNum okhotnik.g kakoj.n)++
okhotnik.s ! kakoj.n ! kakoj.c };
n = kakoj.n ;
p = P3 ;
pron = False;
g = kakoj.g ;
anim = okhotnik.anim
} ;
CompIAdv a = a ;
}

View File

@@ -0,0 +1,37 @@
--# -path=.:../abstract:../common:../../prelude
concrete RelativeRus of Relative = CatRus ** open ResRus, MorphoRus in {
flags optimize=all_subs ; coding=utf8 ;
lin
RelCl A = {s = \\b,clf,gn,c, anim =>
takoj.s ! AF c anim gn ++ "что" ++ A.s !b!clf};
RelVP kotoruj gulyaet =
{ s = \\b,clf,gn, c, anim => let { nu = numGNum gn } in
kotoruj.s ! gn ! c ! anim ++ gulyaet.s2 ++ gulyaet.s ! clf ! gn !P3 ++
gulyaet.s3 ! genGNum gn ! nu
} ;
-- Preposition stranding: "that we are looking at". Pied-piping is
-- 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
++ yaVizhu.s!b!clf
} ;
FunRP p mama kotoruj =
{s = \\gn,c, anim => let {nu = numGNum gn} in
mama.s ! PF c No NonPoss ++
p.s ++ kotoruj.s ! gn ! p.c ! anim
} ;
IdRP ={ s = \\gn, c, anim =>
kotorujDet.s ! (AF c anim gn )} ;
}

View File

@@ -1,39 +1,35 @@
--1 Russian Word Classes and Morphological Parameters
--
-- Aarne Ranta, Janna Khegai 2003
--
-- This is a resource module for Russian morphology, defining the
-- morphological parameters and word classes of Russian. It is aimed
-- to be complete w.r.t. the description of word forms.
-- However, it does not include those parameters that are not needed for
-- analysing individual words: such parameters are defined in syntax modules.
--
--# -path=.:../abstract:../common:../../prelude
resource TypesRus = open Prelude in {
--1 Russian auxiliary operations.
flags coding=utf8 ;
-- This module contains operations that are needed to make the
-- resource syntax work. To define everything that is needed to
-- implement $Test$, it moreover contains regular lexical
-- patterns needed for $Lex$.
resource ResRus = ParamX ** open Prelude in {
flags coding=utf8 ; optimize=all ;
--2 Enumerated parameter types
--
-- These types are the ones found in school grammars.
-- Their parameter values are atomic.
-- Some parameters, such as $Number$, are inherited from $ParamX$.
param
Gender = Masc | Fem | Neut ;
Number = Sg | Pl ;
Case = Nom | Gen | Dat | Acc | Inst | Prepos ;
Case = Nom | Gen | Dat | Acc | Inst | Prepos ;
Animacy = Animate | Inanimate ;
Voice = Act | Pass ;
Aspect = Imperfective | Perfective ;
RusTense = Present | Past | Future ;
Degree = Pos | Comp | Super ;
Person = P1 | P2 | P3 ;
RusTense = Present | PastRus | Future ;
-- Degree = Pos | Comp | Super ;
AfterPrep = Yes | No ;
Possessive = NonPoss | Poss GenNum ;
Animacy = Animate | Inanimate ;
Anteriority = Simul | Anter ;
-- Anteriority = Simul | Anter ;
ClForm = ClIndic RusTense Anteriority | ClCondit | ClInfinit | ClImper;
-- "naked infinitive" clauses
-- A number of Russian nouns have common gender. They can
-- denote both males and females: "умница" (a clever person), "инженер" (an engineer).
@@ -43,106 +39,13 @@ param
-- the variations of the third person personal pronoun forms
-- depending on whether they come after a preposition or not.
-- The Possessive parameter is introduced in order to describe
-- the possessives of personal pronouns, which are used in the
-- Genetive constructions like "мама моя" (my mother) instead of
-- "мама меня" (the mother of mine).
--2 Word classes and hierarchical parameter types
--
-- Real parameter types (i.e. ones on which words and phrases depend)
-- are mostly hierarchical. The alternative would be cross-products of
-- simple parameters, but this would usually overgenerate.
-- However, we use the cross-products in complex cases
-- (for example, aspect and tense parameter in the verb description)
-- where the relationship between the parameters are non-trivial
-- even though we aware that some combinations do not exist
-- (for example, present perfective does not exist, but removing
-- this combination would lead to having different descriptions
-- for perfective and imperfective verbs, which we do not want for the
-- sake of uniformity).
--3 Nouns
--
-- Common nouns decline according to number and case.
-- For the sake of shorter description these parameters are
-- combined in the type SubstForm.
param SubstForm = SF Number Case ;
-- Substantives moreover have an inherent gender.
oper
CommNoun : Type = {s : SubstForm => Str ; g : Gender ; anim : Animacy } ;
numSF: SubstForm -> Number = \sf -> case sf of
{
SF Sg _ => Sg ;
_ => Pl
} ;
caseSF: SubstForm -> Case = \sf -> case sf of
{
SF _ Nom => Nom ;
SF _ Gen => Gen ;
SF _ Dat => Dat ;
SF _ Inst => Inst ;
SF _ Acc => Acc ;
SF _ Prepos => Prepos
} ;
--
--3 Pronouns
--
oper
Pronoun : Type = { s : PronForm => Str ; n : Number ;
p : Person ; g: PronGen ; pron: Bool} ;
param PronForm = PF Case AfterPrep Possessive;
-- Gender is not morphologically determined for first
-- and second person pronouns.
PronGen = PGen Gender | PNoGen ;
-- The following coercion is useful:
oper
pgen2gen : PronGen -> Gender = \p -> case p of {
PGen g => g ;
PNoGen => variants {Masc ; Fem} --- the best we can do for ya, tu
} ;
oper
extCase: PronForm -> Case = \pf -> case pf of
{ PF Nom _ _ => Nom ;
PF Gen _ _ => Gen ;
PF Dat _ _ => Dat ;
PF Inst _ _ => Inst ;
PF Acc _ _ => Acc ;
PF Prepos _ _ => Prepos
} ;
mkPronForm: Case -> AfterPrep -> Possessive -> PronForm =
\c,n,p -> PF c n p ;
--3 Adjectives
--
-- Adjectives is a very complex class.
-- The major division is between the comparison degrees.
param
AdjForm = AF Case Animacy GenNum | AdvF;
-- Declination forms depend on Case, Animacy , Gender:
-- "большие дома" - "больших домов" (big houses - big houses'),
-- Animacy plays role only in the Accusative case (Masc Sg and Plural forms):
-- Accusative Animate = Genetive, Accusaive Inanimate = Nominative
-- "я люблю большие дома"-"я люблю больших мужчин"
-- "я люблю большие дома-"я люблю больших мужчин"
-- (I love big houses - I love big men);
-- and on Number: "большой дом" - "большие дома"
-- and on Number: "большой дом - "большие дома"
-- (a big house - big houses).
-- The plural never makes a gender distinction.
@@ -159,13 +62,248 @@ oper
Pl => APl
} ;
pgNum : PronGen -> Number -> GenNum = \g,n ->
-- The Possessive parameter is introduced in order to describe
-- the possessives of personal pronouns, which are used in the
-- Genetive constructions like "моя мама" (my mother) instead of
-- "мама моя" (the mother of mine).
--2 For $Noun$
-- Nouns decline according to number and case.
-- For the sake of shorter description these parameters are
-- combined in the type SubstForm.
param
SubstForm = SF Number Case ;
-- Real parameter types (i.e. ones on which words and phrases depend)
-- are mostly hierarchical. The alternative would be cross-products of
-- simple parameters, but this would usually overgenerate.
-- However, we use the cross-products in complex cases
-- (for example, aspect and tense parameter in the verb description)
-- where the relationship between the parameters are non-trivial
-- even though we aware that some combinations do not exist
-- (for example, present perfective does not exist, but removing
-- this combination would lead to having different descriptions
-- for perfective and imperfective verbs, which we do not want for the
-- sake of uniformity).
param PronForm = PF Case AfterPrep Possessive;
oper Pronoun = { s : PronForm => Str ; n : Number ; p : Person ;
g: PronGen ; pron: Bool} ;
-- Gender is not morphologically determined for first
-- and second person pronouns.
param PronGen = PGen Gender | PNoGen ;
-- The following coercion is useful:
oper
pgen2gen : PronGen -> Gender = \p -> case p of {
PGen g => g ;
PNoGen => variants {Masc ; Fem} --- the best we can do for ya, tu
} ;
oper
extCase: PronForm -> Case = \pf -> case pf of
{ PF Nom _ _ => Nom ;
PF Gen _ _ => Gen ;
PF Dat _ _ => Dat ;
PF Inst _ _ => Inst ;
PF Acc _ _ => Acc ;
PF Prepos _ _ => Prepos
} ;
mkPronForm: Case -> AfterPrep -> Possessive -> PronForm =
\c,n,p -> PF c n p ;
CommNounPhrase: Type = {s : Number => Case => Str; g : Gender; anim : Animacy} ;
NounPhrase : Type = { s : PronForm => Str ; n : Number ;
p : Person ; g: PronGen ; anim : Animacy ; pron: Bool} ;
mkNP : Number -> CommNounPhrase -> NounPhrase = \n,chelovek ->
{s = \\cas => chelovek.s ! n ! (extCase cas) ;
n = n ; g = PGen chelovek.g ; p = P3 ; pron =False ;
anim = chelovek.anim
} ;
det2NounPhrase : Adjective -> NounPhrase = \eto ->
{s = \\pf => eto.s ! (AF (extCase pf) Inanimate (ASg Neut)); n = Sg ; g = PGen Neut ; pron = False ; p = P3 ; anim = Inanimate } ;
pron2NounPhraseNum : Pronoun -> Animacy -> Number -> NounPhrase = \ona, anim, num ->
{s = ona.s ; n = num ; g = ona.g ;
pron = ona.pron; p = ona.p ; anim = anim } ;
-- Agreement of $NP$ is a record. We'll add $Gender$ later.
-- oper Agr = {n : Number ; p : Person} ;
----2 For $Verb$
-- Mood is the main verb classification parameter.
-- The verb mood can be infinitive, subjunctive, imperative, and indicative.
-- Note: subjunctive mood is analytical, i.e. formed from the past form of the
-- indicative mood plus the particle "ли". That is why they have the same GenNum
-- parameter. We choose to keep the "redundant" form in order to indicate
-- the presence of the subjunctive mood in Russian verbs.
-- Aspect and Voice parameters are present in every mood, so Voice is put
-- before the mood parameter in verb form description the hierachy.
-- Moreover Aspect is regarded as an inherent parameter of a verb entry.
-- The primary reason for that is that one imperfective form can have several
-- perfective forms: "ломать" - "сломать" - "поломать" (to break).
-- Besides, the perfective form could be formed from imperfective
-- by prefixation, but also by taking a completely different stem:
-- "говорить"-"сказать" (to say). In the later case it is even natural to
-- regard them as different verb entries.
-- Another reason is that looking at the Aspect as an inherent verb parameter
-- seem to be customary in other similar projects:
-- http://starling.rinet.ru/morph.htm
-- Note: Of course, the whole inflection table has many redundancies
-- in a sense that many verbs do not have all grammatically possible
-- forms. For example, passive does not exist for the verb
-- "любить" (to love), but exists for the verb "ломаться" (to break).
-- In present tense verbs do not conjugate according to Genus,
-- so parameter GenNum instead Number is used for the sake of
-- using for example as adjective in predication.
-- Depending on the tense verbs conjugate according to combinations
-- of gender, person and number of the verb objects.
-- Participles (Present and PastRus) and Gerund forms are not included in the
-- current description. This is the verb type used in the lexicon:
oper Verbum : Type = { s: VerbForm => Str ; asp : Aspect };
param
VerbForm = VFORM Voice VerbConj ;
VerbConj = VIND GenNum VTense | VIMP Number Person | VINF | VSUB GenNum ;
VTense = VPresent Person | VPast | VFuture Person ;
oper
getVTense : RusTense -> Person -> VTense= \t,p ->
case t of { Present => VPresent p ; PastRus => VPast; Future => VFuture p } ;
getTense : Tense -> RusTense= \t ->
case t of { Pres => Present ; Fut => Future; _ => PastRus} ;
getVoice: VerbForm -> Voice = \vf ->
case vf of {
VFORM Act _ => Act;
VFORM Pass _ => Pass
};
oper sebya : Case => Str =table {
Nom => "";
Gen => "себя";
Dat=> "себе";
Acc => "себя";
Inst => "собой";
Prep =>"себе"};
Verb : Type = {s : ClForm => GenNum => Person => Str ; asp : Aspect ; w: Voice} ;
-- Verb phrases are discontinuous: the parts of a verb phrase are
-- (s) an inflected verb, (s2) verb adverbials (not negation though), and
-- (s3) complement. This discontinuity is needed in sentence formation
-- to account for word order variations.
VerbPhrase : Type = Verb ** {s2: Str; s3 : Gender => Number => Str ;
negBefore: Bool} ;
-- This is one instance of Gazdar's *slash categories*, corresponding to his
-- $S/NP$.
-- We cannot have - nor would we want to have - a productive slash-category former.
-- Perhaps a handful more will be needed.
--
-- Notice that the slash category has the same relation to sentences as
-- transitive verbs have to verbs: it's like a *sentence taking a complement*.
SlashNounPhrase = Clause ** Complement ;
Clause = {s : Polarity => ClForm => Str} ;
-- This is the traditional $S -> NP VP$ rule.
predVerbPhrase : NounPhrase -> VerbPhrase -> SlashNounPhrase =
\Ya, tebyaNeVizhu -> { s = \\b,clf =>
let
{ ya = Ya.s ! (mkPronForm Nom No NonPoss);
khorosho = tebyaNeVizhu.s2;
vizhu = tebyaNeVizhu.s ! clf !(gNum (pgen2gen Ya.g) Ya.n)! Ya.p;
tebya = tebyaNeVizhu.s3 ! (pgen2gen Ya.g) ! Ya.n
}
in
ya ++ khorosho ++ vizhu ++ tebya;
s2= "";
c = Nom
} ;
-- Questions are either direct ("Ты счастлив?")
-- or indirect ("Потом он спросил счастлив ли ты").
param
QuestForm = DirQ | IndirQ ;
---- The order of sentence is needed already in $VP$.
--
-- Order = ODir | OQuest ;
oper
getActVerbForm : ClForm -> Gender -> Number -> Person -> VerbForm = \clf,g,n, p -> case clf of
{ ClIndic Future _ => VFORM Act (VIND (gNum g n) (VFuture p));
ClIndic PastRus _ => VFORM Act (VIND (gNum g n) VPast);
ClIndic Present _ => VFORM Act (VIND (gNum g n) (VPresent p));
ClCondit => VFORM Act (VSUB (gNum g n));
ClInfinit => VFORM Act VINF ;
ClImper => VFORM Act (VIMP n p)
};
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
AdjForm = AF Case Animacy GenNum | AdvF;
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} } ;
@@ -177,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) } ;
@@ -194,7 +332,7 @@ oper caseAF: AdjForm -> Case = \af ->
-- "более высокий" (corresponds to "more high")
-- and predicative (indeclinable)- "выше" (higher) and more than one
-- superlative forms: "самый высокий" (corresponds to "the most high") -
-- "наивысший" (the highest).
-- "высочайший" (the highest).
-- Even one more parameter independent of the degree can be added,
-- since Russian adjectives in the positive degree also have two forms:
@@ -210,8 +348,15 @@ oper caseAF: AdjForm -> Case = \af ->
-- For example: "он - больной" (long, predicative) vs.
-- "он - болен" (short, predicative).
oper
AdjDegr : Type = {s : Degree => AdjForm => Str} ;
--3 Adjective phrases
--
-- An adjective phrase may contain a complement, e.g. "моложе Риты".
-- Then it is used as postfix in modification, e.g. "человек, моложе Риты".
IsPostfixAdj = Bool ;
-- Simple adjectives are not postfix:
-- Adjective type includes both non-degree adjective classes:
-- possesive ("мамин"[mother's], "лисий" [fox'es])
@@ -220,125 +365,52 @@ oper
Adjective : Type = {s : AdjForm => Str} ;
-- A special type of adjectives just having positive forms
-- (for semantic reasons) is useful, e.g. "русский".
oper
extAdjective : AdjDegr -> Adjective = \adj ->
{ s = \\af => adj.s ! Pos ! af } ;
-- (for semantic reasons) is useful, e.g. "финский".
--3 Verbs
-- Mood is the main verb classification parameter.
-- The verb mood can be infinitive, subjunctive, imperative, and indicative.
-- Note: subjunctive mood is analytical, i.e. formed from the past form of the
-- indicative mood plus the particle "бы". That is why they have the same GenNum
-- parameter. We choose to keep the "redundant" form in order to indicate
-- the presence of the subjunctive mood in Russian verbs.
-- Aspect and Voice parameters are present in every mood, so Voice is put
-- before the mood parameter in verb form description the hierachy.
-- Moreover Aspect is regarded as an inherent parameter of a verb entry.
-- The primary reason for that is that one imperfective form can have several
-- perfective forms: "ломать" - "с-ломать" - "по-ломать" (to break).
-- Besides, the perfective form could be formed from imperfective
-- by prefixation, but also by taking a completely different stem:
-- "говорить"-"сказать" (to say). In the later case it is even natural to
-- regard them as different verb entries.
-- Another reason is that looking at the Aspect as an inherent verb parameter
-- seem to be customary in other similar projects:
-- http://starling.rinet.ru/morph.htm
-- Note: Of course, the whole inflection table has many redundancies
-- in a sense that many verbs do not have all grammatically possible
-- forms. For example, passive does not exist for the verb
-- "любить" (to love), but exists for the verb "ломать" (to break).
-- In present tense verbs do not conjugate according to Genus,
-- so parameter GenNum instead Number is used for the sake of
-- using for example as adjective in predication.
-- Depending on the tense verbs conjugate according to combinations
-- of gender, person and number of the verb objects.
-- Participles (Present and Past) and Gerund forms are not included in the
-- current description. This is the verb type used in the lexicon:
oper Verbum : Type = { s: VerbForm => Str ; asp : Aspect };
param
VerbForm = VFORM Voice VerbConj ;
VerbConj = VIND GenNum VTense | VIMP Number Person | VINF | VSUB GenNum ;
VTense = VPresent Person | VPast | VFuture Person ;
oper
getVTense : RusTense -> Person -> VTense= \t,p ->
case t of { Present => VPresent p ; Past => VPast; Future => VFuture p } ;
getVoice: VerbForm -> Voice = \vf ->
case vf of {
VFORM Act _ => Act;
VFORM Pass _ => Pass
};
-- For writing an application grammar one usually doesn't need
-- the whole inflection table, since each verb is used in
-- a particular context that determines some of the parameters
-- (RusTense and Voice while Aspect is fixed from the beginning) for certain usage.
-- So we define the "Verb" type, that have these parameters fixed.
-- The conjugation parameters left (Gender, Number, Person)
-- are combined in the "VF" type:
--param VF = VFin GenNum Person | VImper Number Person | VInf | VSubj GenNum;
oper
-- Verb : Type = {s : VF => Str ; t: RusTense ; a : Aspect ; w: Voice} ;
Verb : Type = {s : ClForm => GenNum => Person => Str ; asp : Aspect ; w: Voice} ;
extVerb : Verbum -> Voice -> Verb = \aller, vox, ->
{ s = \\clf, gn,p => case clf of
{
ClIndic Present _ => aller.s ! VFORM vox (VIND gn (VPresent p)) ;
ClIndic Past _ => aller.s ! VFORM vox (VIND gn VPast ) ;
ClIndic Future _ => aller.s ! VFORM vox (VIND gn (VFuture p)) ;
ClCondit => aller.s ! VFORM vox (VSUB gn);
ClImper => aller.s ! VFORM vox (VIMP (numGNum gn) p) ;
ClInfinit => aller.s ! VFORM vox VINF
} ;
asp = aller.asp ;
w = vox
} ;
AdjPhrase = Adjective ** {p : IsPostfixAdj} ;
--3 Other open classes
mkAdjPhrase : Adjective -> IsPostfixAdj -> AdjPhrase = \novuj ,p -> novuj ** {p = p} ;
----2 For $Relative$
--
-- RAgr = RNoAg | RAg {n : Number ; p : Person} ;
-- RCase = RPrep | RC Case ;
--
-- Proper names and adverbs are the remaining open classes.
--2 For $Numeral$
oper
PNm : Type = {s : Case => Str ; g : Gender} ;
param DForm = unit | teen | ten | hund ;
param Place = attr | indep ;
param Size = nom | sgg | plg ;
--param Gend = masc | fem | neut ;
oper mille : Size => Str = table {
{nom} => "тысяча" ;
{sgg} => "тысячи" ;
_ => "тысяч"} ;
-- Adverbials are not inflected (we ignore comparison, and treat
-- compared adverbials as separate expressions; this could be done another way).
oper gg : Str -> Gender => Str = \s -> table {_ => s} ;
Adverb : Type = SS ;
-- CardOrd = NCard | NOrd ;
--3 Closed classes
--
-- The rest of the Russian word classes are closed, i.e. not extensible by new
-- lexical entries. Thus we don't have to know how to build them, but only
-- how to use them, i.e. which parameters they have.
----2 Transformations between parameter types
--
--3 Relative pronouns
--
-- Relative pronouns are inflected in
-- gender, number, and case just like adjectives.
oper
RelPron : Type = {s : GenNum => Case => Animacy => Str} ;
--3 Prepositions
-- the same as "Complement" category. Renaming the field "s2" into "s" has lead to
-- the internal Haskell error during grammar compilation (heap size exausted)!
Preposition = { s2: Str; c: Case };
};
numSF: SubstForm -> Number = \sf -> case sf of
{
SF Sg _ => Sg ;
_ => Pl
} ;
caseSF: SubstForm -> Case = \sf -> case sf of
{
SF _ Nom => Nom ;
SF _ Gen => Gen ;
SF _ Dat => Dat ;
SF _ Inst => Inst ;
SF _ Acc => Acc ;
SF _ Prepos => Prepos
} ;
}

View File

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

View File

@@ -1,201 +0,0 @@
--# -path=.:../abstract:../../prelude
concrete RulesRus of Rules = CategoriesRus ** open Prelude, SyntaxRus in {
lin
UsePN = nameNounPhrase ;
ComplA2 = complAdj ;
ComplAV = complVerbAdj ;
ComplObjA2V = complObjA2V ;
UseA = adj2adjPhrase ;
ModAP = modCommNounPhrase ;
UseN = noun2CommNounPhrase ;
ModGenOne = npGenDet Sg noNum ;
ModGenNum = npGenDet Pl ;
UseN2 = funAsCommNounPhrase ;
AppN2 = appFunComm ;
AppN3 = appFun2 ;
PositADeg = positAdjPhrase ;
ComparADeg = comparAdjPhrase ;
SuperlADeg = superlAdjPhrase ;
CNthatS = nounThatSentence ;
UseInt i = useInt i.s;
NoNum = noNum ;
DetNP = detNounPhrase ;
IndefOneNP = indefNounPhrase Sg ;
IndefNumNP = indefNounPhraseNum Pl ;
DefOneNP = indefNounPhrase Sg ;
DefNumNP = indefNounPhraseNum Pl ;
MassNP = indefNounPhrase Sg;
NDetNP = nDetNP ;
NDetNum = nDetNum ;
-- The main uses of verbs and verb phrases have been moved to the
-- module $Verbphrase$ (deep $VP$ nesting) and its alternative,
-- $Clause$ (shallow many-place predication structure).
PredAS = predAS ;
PredV0 = predV0 ;
-- Partial saturation.
ComplA2S = complA2S ;
--- VTrans = verbOfTransVerb ;
UseV2 = verbOfTransVerb ;
UseV2V = verbOfTransVerb ;
UseV2S = verbOfTransVerb ;
UseV2Q = verbOfTransVerb ;
UseA2S = useA2S ;
UseA2V = useA2V;
-- Formation of tensed phrases.
AdjPart = adjPart ;
UseCl = useCl ;
UseRCl = useRCl ;
UseQCl = useQCl ;
UseVCl = useVCl ;
-- s field is superficial:
PosTP t a = {s = t.s ++ a.s ; b = True ; t = t.t ; a = a.a} ;
NegTP t a = {s = t.s ++ a.s ; b = False ; t = t.t ; a = a.a} ;
TPresent = {s = [] ; t = ClPresent} ;
TPast = {s = [] ; t = ClPast} ;
TFuture = {s = [] ; t = ClFuture} ;
TConditional = {s = [] ; t = ClConditional} ;
ASimul = {s = [] ; a = Simul} ;
AAnter = {s = [] ; a = Anter} ;
PPos = {s = [] ; p = True} ;
PNeg = {s = [] ; p = False} ;
AdvPP x = x ;
AdvAdv = advAdv ;
AdjAdv a = mkAdverb (a.s ! AdvF) ;
PrepNP p = prepPhrase p ;
AdvVPI = adVerbPhraseInf ;
AdvCN = advCommNounPhrase ;
AdvNP = advNP ;
AdvAP = advAdjPhrase ;
AdvCl = advClause ;
AdCPhr = advSentencePhr ;
AdvPhr = advSentencePhr ;
IdRP = identRelPron ;
FunRP = funRelPron ;
RelCl = relCl;
RelSlash = relSlash ;
ModRS = modRS ;
FunIP = funIntPron ;
QuestAdv = questAdverbial ;
IndicPhrase = indicUtt ;
QuestPhrase = interrogUtt ;
ImperOne = imperUtterance Masc Sg ;
ImperMany = imperUtterance Masc Pl ;
IDetCN = iDetCN;
SlashV2 = slashV2 ;
SlashVV2 = slashVV2 ;
SlashAdv = slashAdv ;
IntSlash = intSlash ;
QuestCl = questCl ;
PosImpVP = posImpVP ;
NegImpVP = negImpVP ;
TwoS = twoSentence ;
ConsS = consSentence ;
ConjS = conjunctSentence ;
ConjDS = conjunctDistrSentence ;
TwoAP = twoAdjPhrase ;
ConsAP = consAdjPhrase ;
ConjAP = conjunctAdjPhrase ;
ConjDAP = conjunctDistrAdjPhrase ;
TwoNP = twoNounPhrase ;
ConsNP = consNounPhrase ;
ConjNP = conjunctNounPhrase ;
ConjDNP = conjunctDistrNounPhrase ;
ConjAdv = conjAdverb ;
ConjDAdv = conjDAdverb ;
TwoAdv = twoAdverb ;
ConsAdv = consAdverb ;
SubjQS = subjQS ;
-- This rule makes a subordinate clause into a sentence adverb, which
-- can be attached to e.g. noun phrases. It might even replace the
-- previous subjunction rules.
AdvSubj = advSubj ;
SubjS = subjunctSentence ;
SubjImper = subjunctImperative ;
PhrNP = useNounPhrase ;
PhrOneCN = useCommonNounPhrase Sg ;
PhrManyCN = useCommonNounPhrase Pl ;
PhrIP ip = postfixSS "?" ip ;
PhrIAdv ia = postfixSS "?" ia ;
OnePhr p = p ;
ConsPhr = cc2 ;
PhrVPI = phrVPI ;
--2 Special constructs.
--
-- These constructs tend to have language-specific syntactic realizations.
--- IsThereNP = isThere ;
ExistCN = existCN ;
ExistNumCN = existNumCN ;
OneNP = npOne ;
--- ThereNP = thereIs ;
--- WhoOne = intPronKto Sg ;
--- WhoMany = intPronKto Pl ;
--- WhatOne = intPronChto Sg ;
--- WhatMany = intPronChto Pl ;
--- NounIPOne = nounIntPron Sg ;
--- NounIPMany = nounIntPron Pl ;
--- SuperlNP = superlNounPhrase ;
--- QuestVP = questVerbPhrase ;
--- IntVP = intVerbPhrase ;
--- ImperVP = imperVerbPhrase ;
--- SubjQu = subjunctQuestion ;
--- ModRC = modRelClause ;
--- RelSuch = relSuch ;
--- PosSlashV2 = slashTransVerb True ;
--- NegSlashV2 = slashTransVerb False ;
} ;

View File

@@ -0,0 +1,6 @@
--# -path=.:../abstract:../common:prelude
concrete Russian of RussianAbs =
LangRus,
ExtraRus
** {} ;

View File

@@ -0,0 +1,6 @@
--# -path=.:../abstract:../common:prelude
abstract RussianAbs =
Lang,
ExtraRusAbs
** {} ;

View File

@@ -0,0 +1,87 @@
--# -path=.:../abstract:../common:../../prelude
concrete SentenceRus of Sentence = CatRus ** open Prelude, ResRus in {
flags optimize=all_subs ; coding=utf8 ;
lin
PredVP Ya tebyaNeVizhu = { s = \\b,clf =>
let {
ya = Ya.s ! (case clf of {
ClInfinit => (mkPronForm Acc No NonPoss);
_ => (mkPronForm Nom No NonPoss)
});
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 ++ khorosho)
(ya ++ vizhu ++ ne ++ tebya ++ khorosho)
} ;
PredSCVP sc vp = { s = \\b,clf =>
let {
ne = case b of {Pos=>""; Neg=>"не"};
vizhu = vp.s ! clf ! (ASg Neut)! P3;
tebya = vp.s3 ! Neut ! Sg
}
in
if_then_else Str vp.negBefore
(sc.s ++ ne ++ vizhu ++ tebya)
(sc.s ++ vizhu ++ ne ++ tebya)
} ;
SlashV2 ivan lubit = { s=\\b,clf => ivan.s ! PF Nom No NonPoss ++
lubit.s! (getActVerbForm clf (pgen2gen ivan.g) ivan.n ivan.p) ;
s2=lubit.s2; c=lubit.c };
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 };
AdvSlash slash adv = {
s = \\b,clf => slash.s ! b ! clf ++ adv.s ;
c = slash.c;
s2 = slash.s2;
} ;
SlashPrep cl p = {s=cl.s; s2=p.s; c=p.c} ;
ImpVP inf = {s = \\pol, g,n =>
let
dont = case pol of {
Neg => "не" ;
_ => []
}
in
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.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 ;
_ => 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 ;
_ => [", "] ++ rcl.s! p.p ! ClIndic (getTense t.t) a.a !gn !c !anim}};

View File

@@ -1,138 +1,134 @@
--# -path=.:../abstract:../../prelude
--1 The Top-Level Russian Resource Grammar
--
-- Janna Khegai 2003
-- on the basis of code for other languages by Aarne Ranta
--
-- This is the Russian concrete syntax of the multilingual resource
-- grammar. Most of the work is done in the file $syntax.RusU.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 is 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 $types.RusU.gf$.
--# -path=.:../abstract:../common:../../prelude
concrete StructuralRus of Structural = CategoriesRus, NumeralsRus ** open Prelude, SyntaxRus in {
flags
coding=utf8 ;
concrete StructuralRus of Structural = CatRus **
open ResRus, MorphoRus, (P = ParadigmsRus), Prelude, NounRus, in {
flags optimize=all ; coding=utf8 ;
lin
-- First mount the numerals.
UseNumeral i = i ;
-- UseNumeral i = i ;
-- Then an alphabetical list of structural words
above_Prep = { s2 = "над" ; c = Inst} ;
after_Prep = { s2 = "после" ; c = Gen };
all8mass_Det = vesDet ** {n = Sg; g = PNoGen; c = Nom} ;
all_NDet = vseDetPl ** { g = PNoGen; c = Nom} ;
almost_Adv = ss "почти" ;
above_Prep = { s = "над" ; c = Inst} ;
after_Prep = { s = "после" ; c = Gen };
-- all8mass_Det = vesDet ** {n = Sg; g = PNoGen; c = Nom} ;
all_Predet = vseDetPl ** { g = PNoGen; c = Nom} ;
almost_AdA = {s= "почти"} ;
almost_AdN = {s= "почти"} ;
although_Subj = ss "хотя" ;
always_AdV = ss "всегда" ;
and_Conj = ss "и" ** {n = Pl} ;
because_Subj = ss ["потому что"] ;
before_Prep ={ s2 = "перед" ; c = Inst};
behind_Prep = { s2 = "за" ; c = Inst };
between_Prep = { s2 = "между" ; c = Inst};
both_AndConjD = sd2 "как" [", так и"] ** {n = Pl} ;
by8agent_Prep = { s2 = ["с помощью"] ; c = Gen};
by8means_Prep = { s2 = ["с помощью"] ; c = Gen};
before_Prep ={ s = "перед" ; c = Inst};
behind_Prep = { s = "за" ; c = Inst };
between_Prep = { s = "между" ; c = Inst};
both7and_DConj = sd2 "как" [", так и"] ** {n = Pl} ;
but_PConj = ss "но" ;
by8agent_Prep = { s = ["с помощью"] ; c = Gen};
by8means_Prep = { s = ["с помощью"] ; c = Gen};
can8know_VV = verbMoch ;
can_VV = verbMoch ;
during_Prep = { s2 = ["в течение"] ; c = Gen};
either8or_ConjD = sd2 "либо" [", либо"] ** {n = Sg} ;
during_Prep = { s = ["в течение"] ; c = Gen};
either7or_DConj = sd2 "либо" [", либо"] ** {n = Sg} ;
-- comma is not visible in GUI!
every_Det = kazhdujDet ** {n = Sg ; g = PNoGen; c= Nom} ;
everybody_NP = mkNounPhrase Pl (noun2CommNounPhrase (eEnd_Decl "вс")) ;
everything_NP = pron2NounPhrase pronVseInanimate Inanimate;
everybody_NP = mkNP Pl (UseN ((eEnd_Decl "вс")**{lock_N=<>})) ;
everything_NP = UsePron (pronVseInanimate ** {lock_Pron=<>}) ;
everywhere_Adv = ss "везде" ;
from_Prep = { s2 = "от" ; c = Gen };
he_NP = pron2NounPhrase pronOn Animate;
few_Det = (ij_EndK_G_KH_Decl "немног") **{lock_Det= <>; n= Sg; g = PNoGen; c = Nom}; -- AMalenkij
first_Ord = (uy_j_EndDecl "перв" ) ** {lock_A = <>}; --AStaruyj
from_Prep = { s = "от" ; c = Gen };
he_Pron = pronOn ;
here_Adv = ss "здесь" ;
here7to_Adv = ss "сюда" ;
here7from_Adv = ss "отсюда" ;
how_IAdv = ss "как" ;
how8many_IDet = skolkoSgDet ** {n = Sg; g = (PGen Neut); c= Gen};
i_NP = pron2NounPhrase pronYa Animate;
how8many_IDet = skolkoSgDet ** {n = Pl; g = (PGen Neut); c= Gen};
i_Pron = pronYa ;
if_Subj = ss "если" ;
in8front_Prep = { s2 = "перед" ; c = Inst};
in_Prep = { s2 = "в" ; c = Prepos };
it_NP = pron2NounPhrase pronOno Inanimate;
in8front_Prep = { s = "перед" ; c = Inst};
in_Prep = { s = "в" ; c = Prepos };
it_Pron = pronOno ;
less_CAdv = ss "менее" ;
many_Det = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
most_Det = bolshinstvoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
more_CAdv = ss "более" ;
most_Predet = bolshinstvoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
-- inanimate, Sg: "большинство телефонов безмолству-ет"
most8many_Det = bolshinstvoPlDet ** {n = Pl; g = (PGen Neut); c= Gen} ;
-- most8many_Det = bolshinstvoPlDet ** {n = Pl; g = (PGen Neut); c= Gen} ;
-- animate, Pl: "большинство учащихся хорошо подготовлен-ы"
much_Det = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ; -- same as previous
must_VV = verbDolzhen ;
no_Phr = ss ["Нет ."] ;
on_Prep = { s2 = "на" ; c = Prepos };
on_Prep = { s = "на" ; c = Prepos };
one_Quant = odinDet ** {lock_QuantSg = <>; n= Sg; g = PNoGen; c = Nom };
--AStaruyj :
only_Predet = (uy_j_EndDecl "единственн" ) ** {lock_Predet = <>; n= Sg; g = PNoGen; c = Nom };
or_Conj = ss "или" ** {n = Sg} ;
otherwise_Adv = ss "иначе" ;
part_Prep = { s2 = "" ; c = Nom}; -- missing in Russian
possess_Prep = { s2 = "" ; c = Gen}; --- ?? AR 19/2/2004
otherwise_PConj = ss "иначе" ;
part_Prep = { s = "" ; c = Nom}; -- missing in Russian
please_Voc = ss "пожалуйста" ;
possess_Prep = { s = "" ; c = Gen}; --- ?? AR 19/2/2004
quite_Adv = ss "довольно" ;
she_NP = pron2NounPhrase pronOna Animate;
so_Adv = ss "так";
somebody_NP = pron2NounPhrase pronKtoTo Animate;
some_Det = nekotorujDet ** {n = Sg; g = PNoGen; c= Nom} ;
some_NDet = nekotorujDet ** { g = PNoGen; c= Nom} ;
something_NP = pron2NounPhrase pronChtoTo Inanimate ;
she_Pron = pronOna ;
so_AdA = ss "так";
somebody_NP = UsePron (pronKtoTo** {lock_Pron = <>});
someSg_Det = nekotorujDet ** {n = Sg; g = PNoGen; c= Nom} ;
somePl_Det = nekotorujDet ** {n = Pl; g = PNoGen; c= Nom} ;
something_NP = UsePron (pronChtoTo** {lock_Pron=<> }) ;
somewhere_Adv = ss "где-нибудь" ;
--- TheseNumNP n = { s =\\_ => [] ; n = Pl; p = P3; g= PGen Fem ;
--- anim = Animate ; pron = True} ; -- missing in Russian
--- ThoseNumNP n = { s =\\_ => [] ; n = Pl; p = P3; g=PGen Fem ;
--- anim = Animate ; pron = True} ; -- missing in Russian
that_Det = totDet ** {n = Sg; g = PNoGen; c= Nom} ;
these_NP = UsePron (pronEti** {lock_Pron = <>}); -- missing in Russian
those_NP = UsePron (pronTe** {lock_Pron = <>}); -- missing in Russian
that_Quant = totDet ** {n = Sg; g = PNoGen; c= Nom} ;
that_NP = det2NounPhrase totDet ; -- inanimate form only
therefore_Adv = ss "следовательно" ;
these_NDet = etotDet ** { g = PNoGen; c= Nom} ;
they8fem_NP = pron2NounPhrase pronOni Animate;
they_NP = pron2NounPhrase pronOni Animate;
this_Det = etotDet ** {n = Sg; g = PNoGen; c= Nom} ;
there_Adv = ss "там" ;
there7to_Adv = ss "туда" ;
there7from_Adv = ss "оттуда" ;
therefore_PConj = ss "следовательно" ;
-- these_NDet = etotDet ** { g = PNoGen; c= Nom} ;
-- they8fem_NP = UsePron pronOni Animate;
they_Pron = pronOni;
this_Quant = etotDet ** {n = Sg; g = PNoGen; c= Nom} ;
this_NP = det2NounPhrase etotDet ; -- inanimate form only
those_NDet = totDet ** {g = PNoGen; c= Nom} ;
thou_NP = pron2NounPhrase pronTu Animate;
through_Prep = { s2 = "через" ; c = Acc };
to_Prep = { s2 = "к" ; c = Dat };
too_Adv = ss "слишком" ;
under_Prep = { s2 = "под" ; c = Inst };
very_Adv = ss "очень" ;
-- those_NDet = totDet ** {g = PNoGen; c= Nom} ;
-- thou_NP = UsePron pronTu Animate;
through_Prep = { s = "через" ; c = Acc };
to_Prep = { s = "к" ; c = Dat };
too_AdA = ss "слишком" ;
under_Prep = { s = "под" ; c = Inst };
very_AdA = ss "очень" ;
want_VV = verbKhotet ;
we_NP = pron2NounPhrase pronMu Animate ;
what8many_IP = pron2NounPhraseNum pronChto Inanimate Pl;
what8one_IP = pron2NounPhraseNum pronChto Inanimate Sg;
we_Pron = pronMu ;
whatPl_IP = pron2NounPhraseNum pronChto Inanimate Pl;
whatSg_IP = pron2NounPhraseNum pronChto Inanimate Sg;
when_IAdv = ss "когда" ;
when_Subj = ss "когда" ;
where_IAdv = ss "где" ;
which8many_IDet = kotorujDet ** {n = Pl; g = PNoGen; c= Nom} ;
which8one_IDet = kotorujDet ** {n = Sg; g = PNoGen; c= Nom} ;
who8many_IP = pron2NounPhraseNum pronKto Animate Pl;
who8one_IP = pron2NounPhraseNum pronKto Animate Sg;
whichPl_IDet = kotorujDet ** {n = Pl; g = PNoGen; c= Nom} ;
whichSg_IDet = kotorujDet ** {n = Sg; g = PNoGen; c= Nom} ;
whoPl_IP = pron2NounPhraseNum pronKto Animate Pl;
whoSg_IP = pron2NounPhraseNum pronKto Animate Sg;
why_IAdv = ss "почему" ;
with_Prep = { s2 = "с" ; c = Inst};
without_Prep = { s2 = "без" ; c = Gen};
ye_NP = pron2NounPhrase pronVu Animate;
with_Prep = { s = "с" ; c = Inst};
without_Prep = { s = "без" ; c = Gen};
youPl_Pron = pronVu;
yes_Phr = ss ["Да ."] ;
you_NP = pron2NounPhrase pronVu Animate;
youSg_Pron = pronVu;
youPol_Pron = pronVu;
--- NoDet = nikakojDet ** {n = Sg; g = PNoGen; c= Nom} ;
--- AnyDet = lubojDet ** {n = Sg; g = PNoGen; c= Nom} ;
--- AnyNumDet = mkDeterminerNum (lubojDet ** {n = Pl; g = PNoGen; c= Nom} );
--- NoNumDet = mkDeterminerNum (nikakojDet ** {n = Pl; g = PNoGen; c= Nom} );
---NobodyNP = pron2NounPhrase pronNikto Animate;
---NothingNP = pron2NounPhrase pronNichto Inanimate;
---NobodyNP = UsePron pronNikto Animate;
---NothingNP = UsePron pronNichto Inanimate;
-- In case of "neither.. no" expression double negation is not
-- only possible, but also required in Russian.
-- There is no means of control for this however in the resource grammar.
--- NeitherNor = sd2 "ни" [", ни"] ** {n = Sg} ;
--- NowhereNP = ss "нигде" ;
--- AgentPrep = { s2 = "" ; c = Nom}; -- missing in Russian
} ;
--- AgentPrep = { s = "" ; c = Nom}; -- missing in Russian
}

View File

@@ -1,247 +0,0 @@
--# -path=.:../abstract:../../prelude
concrete SwadeshLexRus of SwadeshLex = CategoriesRus
** open ResourceRus, SyntaxRus, ParadigmsRus,
BasicRus, Prelude in {
flags coding=utf8 ;
lin
-- Pronouns
i_NP = i_NP ;
thou_NP = thou_NP ;
he_NP = he_NP ;
we_NP = we_NP ;
you_NP = you_NP ;
they_NP = they_NP ;
who8many_IP = who8many_IP ;
who8one_IP = who8one_IP ;
what8many_IP = what8many_IP ;
what8one_IP = what8one_IP ;
-- Determiners
this_Det = this_Det ;
that_Det = that_Det ;
all_NDet = all_NDet ;
many_Det = many_Det ;
some_Det = some_Det ;
few_Det = adjInvar "мало" ** {n = Sg; g = PNoGen; c= Nom} ;
other_Det = drugojDet ** {n = Sg; g = PNoGen; c= Nom} ;
-- Adverbs
here_Adv = here_Adv ;
there_Adv = there_Adv ;
where_IAdv = where_IAdv ;
when_IAdv = when_IAdv ;
how_IAdv = how_IAdv ;
-- not : Adv ; -- ?
-- Conjunctions
and_Conj = and_Conj ;
-- Prepositions
at_Prep = { s2 = "у" ; c = genitive} ;
in_Prep = { s2 = "в" ; c = prepositional} ;
with_Prep = { s2 = "с" ; c = instructive} ;
-- Numerals
one_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))) ;
two_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2))))) ;
three_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3))))) ;
four_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n4))))) ;
five_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n5))))) ;
-- Adjectives
bad_ADeg = bad_ADeg ;
big_ADeg = big_ADeg ;
black_ADeg = black_ADeg ;
cold_ADeg = cold_ADeg ;
correct_ADeg = mkADeg (AStaruyj "правильн") "правильнее";
dirty_ADeg = dirty_ADeg ;
dry_ADeg = mkADeg (AMolodoj "сух") "суше";
dull_ADeg = mkADeg (AStaruyj "скучн") "скучнее";
far_ADeg = mkADeg (AKhoroshij "далекий") "дальше";
full_ADeg = mkADeg (AStaruyj "полн") "полнее";
good_ADeg = good_ADeg ;
green_ADeg = green_ADeg ;
heavy_ADeg = mkADeg (AStaruyj "тяжел") "тяжелее";
left_A = AStaruyj "лев";
long_ADeg = long_ADeg ;
narrow_ADeg = narrow_ADeg ;
near_ADeg = mkADeg (AMalenkij "близк") "ближе";
new_ADeg = new_ADeg ;
old_ADeg = old_ADeg ;
red_ADeg = red_ADeg ;
right_A = AStaruyj "прав";
rotten_ADeg = mkADeg (AMolodoj "гнил") "гнилее";
round_ADeg = mkADeg (AStaruyj "кругл") "круглее";
sharp_ADeg = mkADeg (AStaruyj "остр") "острее";
short_ADeg = short_ADeg ;
small_ADeg = small_ADeg ;
smooth_ADeg = mkADeg (AMalenkij "гладк") "глаже";
straight_ADeg = mkADeg (AMolodoj "прям") "прямее";
thick_ADeg = thick_ADeg ;
thin_ADeg = thin_ADeg ;
warm_ADeg = warm_ADeg ;
wet_ADeg = mkADeg (AStaruyj "мокр") "мокрее";
white_ADeg = white_ADeg ;
wide_ADeg = mkADeg (AMalenkij "широк") "шире";
yellow_ADeg = yellow_ADeg ;
-- Nouns
animal_N = nZhivotnoe "животн" ;
ashes_N = nPepel "пеп" ;
back_N = nMashina "спин" ;
bark_N = mkN "лай" "лая" "лаю" "лай" "лаем" "лае" "лаи" "лаев" "лаям" "лаи" "лаями" "лаях" masculine inanimate;
belly_N = nTelefon "живот" ;
bird_N = bird_N ;
blood_N = nBol "кров" ;
bone_N = nBol "кост" ;
breast_N = nBol "грудь" ;
child_N = child_N ;
cloud_N = nChislo "облак" ;
day_N = mkN "день" "дня" "дню" "день" "днём" "дне" "дни" "дней" "дням" "дни" "днями" "днях" masculine inanimate ;
dog_N = dog_N ;
dust_N = nBol "пыл" ;
ear_N = nChislo "ухо" ;
earth_N = nTetya "земл" ;
egg_N = nChislo "яйц" ;
eye_N = nAdres "глаз" ;
fat_N = nBank "жир" ;
father_N = mkN "отец" "отца" "отцу" "отца" "отцом" "отце" "отцы" "отцов" "отцам" "отцов" "отцами" "отцах" masculine animate ;
-- father_N = UseN2 father_N2 ;
feather_N = mkN "перо" "пера" "перу" "пера" "пером" "пере" "перья" "перьев" "перьям" "перьев" "перьями" "перьях" neuter inanimate ;
fingernail_N = mkN "ноготь" "ногтя" "ногтю" "ногтя" "ногтем" "ногте" "ногти" "ногтей" "ногтям" "ногтей" "ногтями" "ногтях" masculine inanimate ;
fire_N = mkN "огонь" "огня" "огню" "огня" "огнём" "огне" "огни" "огней" "огням" "огней" "огнями" "огнях" masculine inanimate ;
fish_N = fish_N ;
flower_N = mkN "отец" "отца" "отцу" "отца" "отцом" "отце" "отцы" "отцов" "отцам" "отцов" "отцами" "отцах" masculine animate ;
fog_N = nTelefon "туман" ;
foot_N = nTetya "ступн" ;
forest_N = nAdres "лес" ;
fruit_N = fruit_N ;
grass_N = nMashina "трав" ;
guts_N = nBol "внутренност" ;
hair_N = nTelefon "волос" ;
hand_N = nNoga "рук" ;
head_N = nMashina "голов" ;
heart_N = mkN "сердце" "сердца" "сердцу" "сердца" "сердцем" "сердце" "сердца" "сердец" "сердцам" "сердец" "сердцами" "сердцах" neuter inanimate;
horn_N = nAdres "рог" ;
husband_N = mkN "муж" "мужа" "мужу" "мужа" "мужем" "муже" "мужья" "мужей" "мужьям" "мужей" "мужьями" "мужьях" masculine animate ;
ice_N = mkN "лёд" "льда" "льду" "льда" "льдом" "льде" "льды" "льдов" "льдам" "льдов" "льдами" "льдах" masculine inanimate ;
knee_N = mkN "колено" "колена" "колену" "колена" "коленом" "колене" "колени" "колен" "коленам" "колен" "коленями" "коленях" neuter inanimate ;
lake_N = lake_N ;
leaf_N = nStul "лист" ;
leg_N = nNoga "ног" ;
liver_N = nBol "печен" ;
louse_N = mkN "вошь" "вши" "вши" "вошь" "вошью" "вше" "вши" "вшей" "вшам" "вшей" "вшами" "вшах" feminine animate ;
man_N = man_N ;
meat_N = meat_N ;
moon_N = moon_N ;
mother_N = mkN "мать" "матери" "матери" "мать" "матерью" "матери" "матери" "матерей" "матерям" "матерей" "матерями" "матерях" feminine animate ;
--- mother_N = UseN2 mother_N2 ;
mountain_N = mountain_N ;
mouth_N = mkN "рот" "рта" "рту" "рот" "ртом" "рте" "рты" "ртов" "ртам" "рты" "ртами" "ртах" masculine inanimate;
name_N = mkN "имя" "имени" "имени" "имя" "именем" "имени" "имена" "имён" "именам" "имена" "именами" "именах" neuter inanimate;
neck_N = nTetya "ше" ;
night_N = nBol "ноч" ;
nose_N = nTelefon "нос" ;
person_N = nBol "личность" ;
rain_N = nNol "дожд" ;
river_N = river_N ;
road_N = nNoga "дорог" ;
root_N = nUroven "кор" ;
rope_N = nNoga "веревк" ;
salt_N = nBol "сол" ;
sand_N = mkN "песок" "песка" "песку" "песок" "песком" "песке" "пески" "песков" "пескам" "песков" "песками" "песках" masculine inanimate ;
sea_N = sea_N ;
seed_N = mkN "семя" "семени" "семении" "семя" "семенем" "семени" "семена" "семян" "семенам" "семена" "семенами" "семенах" neuter inanimate ;
skin_N = nEdinica "кож" ;
sky_N = mkN "небо" "неба" "небу" "небо" "небом" "небе" "небеса" "небес" "небесам" "небес" "небесами" "небесах" neuter inanimate ;
smoke_N = nTelefon "дым" ;
snake_N = snake_N ;
snow_N = nAdres "снег" ;
star_N = star_N ;
stick_N = nNoga "палк" ;
stone_N = stone_N ;
sun_N = sun_N ;
tail_N = nTelefon "хвост" ;
tongue_N = nBank "язык" ;
tooth_N = nTelefon "зуб" ;
tree_N = tree_N ;
water_N = water_N ;
wife_N = nMashina "жен" ;
wind_N = mkN "ветер" "ветра" "ветру" "ветер" "ветром" "ветра" "ветров" "ветра" "ветрам" "ветров" "ветрами" "ветрах" masculine inanimate ;
wing_N = mkN "крыло" "крыла" "крылу" "крыло" "крылом" "крыле" "крылья" "крыльев" "крыльям" "крылья" "крыльями" "крыльях" neuter inanimate ;
woman_N = woman_N ;
worm_N = nNol "черв" ;
year_N = nAdres "год" ;
-- Verbs
bite_V = mkRegVerb imperfective first "куса" "ю" "кусал" "кусай" "кусать";
blow_V = mkRegVerb imperfective first "ду" "ю" "дул" "дуй" "дуть" ;
breathe_V = mkRegVerb imperfective second "дыш" "у" "дышал" "дыши" "дышать" ;
burn_V = mkRegVerb imperfective second "гор" "ю" "горел" "гори" "гореть" ;
come_V = come_V ;
count_V = mkRegVerb imperfective first "счита" "ю" "считал" "считай" "считать" ;
cut_V = mkRegVerb imperfective first "реж" "у" "резал" "режь" "резать" ;
die_V = die_V ;
dig_V = mkRegVerb imperfective first "копа" "ю" "копал" "копай" "копать" ;
drink_V = mkRegVerb imperfective firstE "пь" "ю" "пил" "пей" "пить" ;
eat_V = mkVerbum imperfective "ем" "ешь" "ест" "едим" "едите" "едят" "ел" "ешь" "есть" ;
fall_V = mkRegVerb imperfective first "пада" "ю" "падал" "падай" "падать" ;
fear_V = mkRegVerb imperfective second "бо" "ю" "боял" "бой" "боять" ;
fight_V = mkRegVerb imperfective firstE "дер" "у" "драл" "дери" "драть" ;
float_V = mkRegVerb imperfective firstE "плыв" "у" "плыл" "плыви" "плыть" ;
flow_V = mkRegVerb imperfective firstE "тек" "у" "тёк" "теки" "течь" ;
fly_V = mkRegVerb imperfective second "лета" "ю" "летал" "летай" "летать" ;
freeze_V = mkRegVerb imperfective first "замерза" "ю" "замерзал" "замерзай" "замерзать" ;
give_V = mkRegVerb imperfective firstE "да" "ю" "давал" "давай" "давать" ;
hear_V = mkRegVerb imperfective first "слыш" "у" "слышал" "слышь" "слышать" ;
hit_V = mkRegVerb imperfective first "ударя" "ю" "ударял" "ударяй" "ударять" ;
hold_V = mkRegVerb imperfective second "держ" "у" "держал" "держи" "держать" ;
hunt_V = mkRegVerb imperfective second "охоч" "у" "охотил" "охоть" "охотить" ;
kill_V = mkRegVerb imperfective first "убива" "ю" "убивал" "убивай" "убивать" ;
know_V = mkRegVerb imperfective first "зна" "ю" "знал" "знай" "знать" ;
laugh_V = mkRegVerb imperfective firstE "сме" "ю" "смеял" "смей" "смеять" ;
lie_V = mkRegVerb imperfective firstE "лг" "у" "лгал" "лги" "лгать" ;
live_V = live_V ;
play_V = mkRegVerb imperfective first "игра" "ю" "играл" "играй" "играть" ;
pull_V = mkRegVerb imperfective first "тян" "у" "тянул" "тяни" "тянуть" ;
push_V = mkRegVerb imperfective first "толка" "ю" "толкал" "толкай" "толкать" ;
rub_V = mkRegVerb imperfective firstE "тр" "у" "тёр" "три" "тереть" ;
say_V = mkRegVerb imperfective second "говор" "ю" "говорил" "говори" "говорить";
scratch_V = mkRegVerb imperfective first "чеш" "у" "чесал" "чеши" "чесать" ; see_V = mkRegVerb imperfective second "смотр" "ю" "смотрел" "смотри" "смотреть" ;
sew_V = mkRegVerb imperfective firstE "шь" "ю" "шил" "шей" "шить" ;
sing_V = mkRegVerb imperfective firstE "по" "ю" "пел" "пой" "петь" ;
sit_V = mkVerbum imperfective "сижу" "сидишь" "сидит" "сидим" "сидите" "сидят" "сидел" "сиди" "сидеть" ;
sleep_V = sleep_V ;
smell_V = mkRegVerb imperfective first "пахн" "у" "пахнул" "пахни" "пахнуть" ;
spit_V = mkRegVerb imperfective firstE "плю" "ю" "плевал" "плюй" "плевать" ;
split_V = mkRegVerb imperfective first "разбива" "ю" "разбивал" "разбей" "разбивать" ;
squeeze_V = mkRegVerb imperfective first "сжима" "ю" "сжимал" "сжимай" "сжимать" ;
stab_V = mkRegVerb imperfective first "кол" "ю" "колол" "коли" "колоть" ;
stand_V = mkRegVerb imperfective second "сто" "ю" "стоял" "стой" "стоять" ;
suck_V = mkRegVerb imperfective firstE "сос" "у" "сосал" "соси" "сосать" ;
swell_V = mkRegVerb imperfective first "опуха" "ю" "опухал" "опухай" "опухать" ;
swim_V = mkRegVerb imperfective first "плава" "ю" "плавал" "плавай" "плавать" ;
think_V = mkRegVerb imperfective first "дума" "ю" "думал" "думай" "думать" ;
throw_V = mkRegVerb imperfective first "броса" "ю" "бросал" "бросай" "бросать" ;
tie_V = mkRegVerb imperfective first "вяж" "у" "вязал" "вяжи" "вязать" ;
turn_V = mkRegVerb imperfective first "поворачива" "ю" "поворачивал" "поворачивай" "поворачивать" ;
vomit_V = mkRegVerb imperfective firstE "рв" "у" "рвал" "рви" "рвать" ;
walk_V = walk_V ;
wash_V = mkRegVerb imperfective first "мо" "ю" "мыл" "мой" "мыть" ;
wipe_V = mkRegVerb imperfective first "вытира" "ю" "вытирал" "вытирай" "вытирать" ;
};

File diff suppressed because it is too large Load Diff

View File

@@ -1,42 +0,0 @@
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,243 @@
--# -path=.:../abstract:../common:../../prelude
concrete VerbRus of Verb = CatRus ** open ResRus, Prelude in {
flags optimize=all_subs ; coding=utf8 ;
lin
CompNP masha =
{ s=\\clf,gn,p => case clf of
{
(ClIndic Present _) => masha.s ! (mkPronForm Nom No NonPoss) ;
(ClIndic PastRus _) => case gn of
{ (ASg Fem) =>"была"++masha.s ! (mkPronForm Inst No NonPoss);
(ASg Masc) =>"был" ++ masha.s!(mkPronForm Inst No NonPoss);
(ASg Neut) =>"было" ++ masha.s!(mkPronForm Inst No NonPoss);
APl => "были" ++ masha.s ! (mkPronForm Inst No NonPoss)
};
(ClIndic Future _) => case gn of
{ APl => case p of
{ P3 => "будут"++masha.s ! (mkPronForm Inst No NonPoss);
P2 => "будете"++masha.s !(mkPronForm Inst No NonPoss);
P1 => "будем"++masha.s ! (mkPronForm Inst No NonPoss)
};
(ASg _) => case p of
{ P3=>"будет"++masha.s!(mkPronForm Inst No NonPoss) ;
P2 => "будешь"++ masha.s ! (mkPronForm Inst No NonPoss) ;
P1=> "буду"++ masha.s ! (mkPronForm Inst No NonPoss)
} --case p
}; --case gn
ClCondit => "" ;
ClImper => case (numGNum gn) of
{Sg => "будь" ++ masha.s ! (mkPronForm Inst No NonPoss);
Pl => "будьте" ++ masha.s ! (mkPronForm Inst No NonPoss)
};
ClInfin => "быть" ++ masha.s ! (mkPronForm Inst No NonPoss)
}; -- case clf
asp = Imperfective ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n => ""
} ;
CompAP zloj ={
s= \\clf,gn,p => case clf of {
-- person is ignored !
ClInfinit => "быть" ++ zloj.s ! AF Inst Animate (ASg Masc) ;
ClImper => case gn of
{ (ASg _) => "будь" ++ zloj.s ! AF Inst Animate (ASg Masc);
APl => "будьте" ++ zloj.s ! AF Inst Animate APl
};
-- infinitive does not save GenNum,
-- but indicative does for the sake of adjectival predication !
ClIndic Present _ => zloj.s ! AF Nom Animate gn ;
ClIndic PastRus _ => case gn of
{ (ASg Fem) => "была" ++ zloj.s! AF Nom Animate (ASg Fem);
(ASg Masc) => "был" ++ zloj.s! AF Nom Animate (ASg Masc);
(ASg Neut) => "был" ++ zloj.s! AF Nom Animate (ASg Neut);
APl => "были" ++ zloj.s! AF Nom Animate APl
};
ClIndic Future _ => case gn of
{ APl => case p of
{ P3 => "будут" ++ zloj.s! AF Nom Animate APl;
P2 => "будете" ++ zloj.s! AF Nom Animate APl;
P1 => "будем" ++ zloj.s! AF Nom Animate APl
} ;
(ASg _) => case p of
{P3 => "будет" ++ zloj.s! AF Nom Animate (ASg (genGNum gn));
P2 => "будешь"++ zloj.s! AF Nom Animate (ASg (genGNum gn));
P1=> "буду" ++ zloj.s! AF Nom Animate (ASg (genGNum gn))
}
};
ClCondit => ""
} ;
asp = Imperfective ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n=> ""
} ;
-- Verb phrases can also be formed from adjectives (" молод"),
-- common nouns (" человек"), and noun phrases (" самый молодой").
-- The third rule is overgenerating: " каждый человек" has to be ruled out
-- on semantic grounds.
-- Note: we omit a dash "-" because it will cause problems with negation word order:
-- "Я не - волшебник". Alternatively, we can consider verb-based VP and
-- all the rest.
CompAdv zloj =
{ s= \\clf,gn,p => case clf of {
ClImper => case gn of
{ ASg _ => "будь" ++ zloj.s; -- person is ignored !
APl => "будьте" ++ zloj.s
};
ClInfinit => "быть" ++ zloj.s;
ClIndic Present _ => zloj.s ;
ClIndic PastRus _ => case gn of
{ (ASg Fem) => "была" ++ zloj.s;
(ASg Masc) => "был" ++ zloj.s;
(ASg Neut) => "было" ++ zloj.s;
APl => "были" ++ zloj.s
};
ClIndic Future _ => case gn of
{ (ASg _) => "будет" ++ zloj.s;
APl => "будут" ++ zloj.s
};
ClCondit => ""
} ;
asp = Imperfective ;
w = Act;
s2 = "";
negBefore = True;
s3 = \\g,n => ""
} ;
UseComp comp = comp ;
UseVS, UseVQ = \vv -> {s = vv.s ; asp = vv.asp; s2 = [] ; c = Acc} ;
-- CompAP ap = ap ;
-- CompNP np = {s = \\_ => np.s ! Acc} ;
-- CompAdv a = {s = \\_ => a.s} ;
-- A simple verb can be made into a verb phrase with an empty complement.
-- There are two versions, depending on if we want to negate the verb.
-- N.B. negation is *not* a function applicable to a verb phrase, since
-- double negations with "inte" are not grammatical.
UseV se =
{s=\\clf,gn,p => se.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ;
asp = se.asp ;
w=Act;
s2 = "";
negBefore = True;
s3 = table{_=> table{_ => ""}}
} ;
-- The rule for using transitive verbs is the complementization rule:
ComplV2 se tu =
{s =\\clf,gn,p => se.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p)
++ se.s2 ++ tu.s ! (mkPronForm se.c No NonPoss) ;
asp = se.asp ;
w = Act;
s2 = "";
s3 = \\g,n => "";
negBefore = True
} ;
ComplV3 dat tu pivo =
let
tebepivo = dat.s2 ++
tu.s ! PF dat.c No NonPoss ++ dat.s4 ++ pivo.s ! PF dat.c2 Yes NonPoss
in
{s = \\clf,gn,p => dat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ tebepivo ;
asp = dat.asp ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n=> ""
} ;
ReflV2 v =
{ s = \\clf,gn,p => v.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ v.s2 ++ sebya!v.c;
asp = v.asp ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n=> ""
} ;
-- To generate "сказал, что Иван гуляет" / "не сказал, что Иван гуляет":
ComplVS vidit tuUlubaeshsya =
{s = \\clf,gn,p => vidit.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p)
++ [", что"] ++ tuUlubaeshsya.s ;
asp = vidit.asp;
w = Act;
s2="";
negBefore = True;
s3 = \\g,n => ""
} ;
-- To generate "can walk"/"can't walk"; "tries to walk"/"does not try to walk":
-- The contraction of "not" is not provided, since it would require changing
-- the verb parameter type.
ComplVV putatsya bezhat =
{ 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;
s2 = "";
s3 =\\g,n => ""
} ;
ComplVQ dat esliOnPridet =
{s = \\clf,gn,p => dat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ esliOnPridet.s ! QDir ;
asp = dat.asp ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n=> ""
} ;
ComplVA vuglyadet molodoj =
{s = \\clf,gn,p => vuglyadet.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ;
asp = vuglyadet.asp ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n => molodoj.s!(AF Inst Animate (gNum g n))
} ;
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) ;
asp = obechat.asp ;
w = Act;
negBefore = True;
s2 = "";
s3 = \\g,n =>""
} ;
AdvVP poet khorosho =
{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 } ;
AdVVP khorosho poet =
{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 ! (getPassVerbForm clf (genGNum gn) (numGNum gn) p) ;
asp=se.asp; w=Pass; s2 = se.s2;
negBefore = True;
s3 = table{_=> table{_ => ""}}

View File

@@ -1,63 +0,0 @@
--# -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 ;
}