mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-29 04:38:55 -06:00
resource = resource-1.0
This commit is contained in:
4
lib/resource-0.9/russian/AllResourceRus.gf
Normal file
4
lib/resource-0.9/russian/AllResourceRus.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete AllResourceRus of AllResource = RulesRus, StructuralRus ** {} ;
|
||||
|
||||
237
lib/resource-0.9/russian/BasicRus.gf
Normal file
237
lib/resource-0.9/russian/BasicRus.gf
Normal file
@@ -0,0 +1,237 @@
|
||||
--# -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 ;
|
||||
180
lib/resource-0.9/russian/CategoriesRus.gf
Normal file
180
lib/resource-0.9/russian/CategoriesRus.gf
Normal file
@@ -0,0 +1,180 @@
|
||||
--# -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} ;
|
||||
}
|
||||
|
||||
4
lib/resource-0.9/russian/ClauseRus.gf
Normal file
4
lib/resource-0.9/russian/ClauseRus.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete ClauseRus of Clause = CategoriesRus **
|
||||
ClauseI with (Rules=RulesRus), (Verbphrase=VerbphraseRus) ;
|
||||
32
lib/resource-0.9/russian/CountryRus.gf
Normal file
32
lib/resource-0.9/russian/CountryRus.gf
Normal file
@@ -0,0 +1,32 @@
|
||||
concrete CountryRus of Country = open CategoriesRus
|
||||
,MorphoRus
|
||||
--,ParadigmsRus
|
||||
in {
|
||||
|
||||
|
||||
lincat
|
||||
Country = PN ;
|
||||
Nationality = A ;
|
||||
Language = N ;
|
||||
|
||||
lin
|
||||
Denmark = daniya ** {lock_PN=<>};
|
||||
England = angliya ** {lock_PN=<>};
|
||||
Finland = finlyandiya ** {lock_PN=<>};
|
||||
France = franciya ** {lock_PN=<>} ;
|
||||
Germany = germaniya ** {lock_PN=<>};
|
||||
Italy = italiya ** {lock_PN=<>};
|
||||
Norway = norvegiya ** {lock_PN=<>};
|
||||
Russia = rossiya ** {lock_PN=<>};
|
||||
Spain = ispaniya ** {lock_PN=<>};
|
||||
Sweden = shveciya ** {lock_PN=<>};
|
||||
|
||||
Danish = datskij ** {lock_A=<>} ;
|
||||
English = anglijskij ** {lock_A=<>};
|
||||
|
||||
DanishLang = mkAdjCommNounMascInanim datskij ** {lock_N=<>};
|
||||
EnglishLang = mkAdjCommNounMascInanim anglijskij ** {lock_N=<>};
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
7
lib/resource-0.9/russian/DemonstrativeRus.gf
Normal file
7
lib/resource-0.9/russian/DemonstrativeRus.gf
Normal file
@@ -0,0 +1,7 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete DemonstrativeRus of Demonstrative =
|
||||
CategoriesRus ** DemonstrativeI with
|
||||
(Resource = ResourceRus),
|
||||
(Basic = BasicRus),
|
||||
(DemRes = DemResRus) ;
|
||||
25
lib/resource-0.9/russian/LangRus.gf
Normal file
25
lib/resource-0.9/russian/LangRus.gf
Normal file
@@ -0,0 +1,25 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete LangRus of Lang =
|
||||
RulesRus,
|
||||
ClauseRus,
|
||||
StructuralRus,
|
||||
-- BasicRus,
|
||||
TimeRus,
|
||||
CountryRus,
|
||||
-- MathRus
|
||||
|
||||
** open Prelude, ParadigmsRus, TypesRus
|
||||
in {
|
||||
flags coding=utf8 ;
|
||||
lin
|
||||
AdvDate d = {s=d.s ! (SF Sg Acc) };
|
||||
AdvTime t = prefixSS "в" t ;
|
||||
NWeekday w = w ;
|
||||
PNWeekday w = nounPN w ;
|
||||
|
||||
PNCountry x = x ;
|
||||
ANationality x = x ;
|
||||
NLanguage x = x ;
|
||||
|
||||
}
|
||||
57
lib/resource-0.9/russian/MathRus.gf
Normal file
57
lib/resource-0.9/russian/MathRus.gf
Normal file
@@ -0,0 +1,57 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete MathRus of Math = CategoriesRus ** open Prelude, SyntaxRus, ParadigmsRus
|
||||
in {
|
||||
flags coding=utf8 ;
|
||||
lin
|
||||
SymbPN i = {s = \\_ => i.s ; g = Masc ; anim = Inanimate} ;
|
||||
IntPN i = {s = \\_ => i.s ; g = Neut ; anim = Inanimate } ;
|
||||
IntNP mu i = {s = \\pf => mu.s! Sg !(extCase pf) ++ i.s;
|
||||
n = Sg ; p = P3; g = PGen mu.g ; pron = False; anim = mu.anim } ;
|
||||
|
||||
|
||||
IndefSymbNumNP dva mu xs =
|
||||
{s = \\pf => dva.s ! (extCase pf) ! mu.g ++ mu.s! Pl !(extCase pf) ++xs.s;
|
||||
n = Pl ; p = P3; g = PGen mu.g ; pron = False; anim = mu.anim } ;
|
||||
DefSymbNumNP dva mu xs =
|
||||
{s = \\pf => dva.s ! (extCase pf) ! mu.g ++ mu.s! Pl !(extCase pf) ++xs.s;
|
||||
n = Pl ; p = P3; g = PGen mu.g ; pron = False; anim = mu.anim } ;
|
||||
NDetSymbNP det dva mu xs =
|
||||
{s = \\pf => dva.s ! (extCase pf) ! mu.g ++ det.s!AF (extCase pf) mu.anim APl
|
||||
++mu.s! Pl !(extCase pf) ++xs.s;
|
||||
n = Pl ; p = P3; g = PGen mu.g ; pron = False; anim = mu.anim } ;
|
||||
|
||||
|
||||
lincat
|
||||
SymbList = SS ;
|
||||
|
||||
lin
|
||||
SymbTwo = infixSS "and" ;
|
||||
SymbMore = infixSS "," ;
|
||||
|
||||
LetImp x np = {s = \\_,_ => "пусть" ++ x.s ! PF Nom No NonPoss ++ "это" ++ np.s ! PF Inst No NonPoss } ;
|
||||
|
||||
ExistNP bar = {s =\\b,clf => case b of
|
||||
{True => verbSuchestvovat.s ! (getActVerbForm clf (pgen2gen bar.g) bar.n P3)
|
||||
++ bar.s ! PF Nom No NonPoss;
|
||||
False => "не" ++ verbSuchestvovat.s !(getActVerbForm clf (pgen2gen bar.g) bar.n P3)
|
||||
++ bar.s ! PF Nom No NonPoss
|
||||
}
|
||||
} ;
|
||||
|
||||
-- Moved from $RulesRus$.
|
||||
--- these two by AR 3/6/2004
|
||||
SymbCN cn s =
|
||||
{s = \\n,c => cn.s ! n ! c ++ s.s ;
|
||||
g = cn.g ;
|
||||
anim = cn.anim
|
||||
} ;
|
||||
|
||||
IntCN cn s =
|
||||
{s = \\n,c => cn.s ! n ! c ++ s.s ;
|
||||
g = cn.g ;
|
||||
anim = cn.anim
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
1764
lib/resource-0.9/russian/MorphoRus.gf
Normal file
1764
lib/resource-0.9/russian/MorphoRus.gf
Normal file
File diff suppressed because it is too large
Load Diff
8
lib/resource-0.9/russian/MultimodalRus.gf
Normal file
8
lib/resource-0.9/russian/MultimodalRus.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
--# -path=.:../abstract:../scandinavian:../../prelude
|
||||
|
||||
concrete MultimodalRus of Multimodal =
|
||||
RulesRus, StructuralRus, BasicRus, TimeRus, DemonstrativeRus ** MultimodalI with
|
||||
(Resource = ResourceRus),
|
||||
(Basic = BasicRus),
|
||||
(Lang = LangRus),
|
||||
(DemRes = DemResRus) ;
|
||||
102
lib/resource-0.9/russian/NumeralsRus.gf
Normal file
102
lib/resource-0.9/russian/NumeralsRus.gf
Normal file
@@ -0,0 +1,102 @@
|
||||
concrete NumeralsRus of Numerals = open MorphoRus, Prelude 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} ;
|
||||
lincat Sub1000 = {s : Place => Gender => Str ; size : Size} ;
|
||||
lincat Sub1000000 = {s : Gender => Str} ;
|
||||
|
||||
lin num x = {s = table{ _ => x.s }};
|
||||
|
||||
lin n2 =
|
||||
{s = table {{unit} => table {{Fem} => "две" ; _ => "два"} ;
|
||||
{teen} => gg "двенадцать" ;
|
||||
{ten} => gg "двадцать" ;
|
||||
{hund} => gg "двести"} ;
|
||||
size = sgg} ;
|
||||
lin n3 =
|
||||
{s = table {{unit} => gg "три" ;
|
||||
{teen} => gg "тринадцать" ;
|
||||
{ten} => gg "тридцать" ;
|
||||
{hund} => gg "триста"} ;
|
||||
size = sgg} ;
|
||||
lin n4 =
|
||||
{s = table {{unit} => gg "четыре" ;
|
||||
{teen} => gg "четырнадцать" ;
|
||||
{ten} => gg "сорок" ;
|
||||
{hund} => gg "четыреста"} ;
|
||||
size = sgg} ;
|
||||
lin n5 =
|
||||
{s = table {{unit} => gg "пять" ;
|
||||
{teen} => gg "пятнадцать" ;
|
||||
{ten} => gg "пятьдесят" ;
|
||||
{hund} => gg "пятьсот"} ;
|
||||
size = plg} ;
|
||||
lin n6 =
|
||||
{s = table {{unit} => gg "шесть" ;
|
||||
{teen} => gg "шестнадцать" ;
|
||||
{ten} => gg "шестьдесят" ;
|
||||
{hund} => gg "шестьсот"} ;
|
||||
size = plg} ;
|
||||
lin n7 =
|
||||
{s = table {{unit} => gg "семь" ;
|
||||
{teen} => gg "семнадцать" ;
|
||||
{ten} => gg "семьдесят" ;
|
||||
{hund} => gg "семьсот"} ;
|
||||
size = plg} ;
|
||||
lin n8 =
|
||||
{s = table {{unit} => gg "восемь" ;
|
||||
{teen} => gg "восемнадцать" ;
|
||||
{ten} => gg "восемьдесят" ;
|
||||
{hund} => gg "восемьсот"} ;
|
||||
size = plg} ;
|
||||
lin n9 =
|
||||
{s = table {{unit} => gg "девять" ;
|
||||
{teen} => gg "девятнадцать" ;
|
||||
{ten} => gg "девяносто" ;
|
||||
{hund} => gg "девятьсот"} ;
|
||||
size = plg} ;
|
||||
|
||||
|
||||
lin pot01 =
|
||||
{s = table {{attr} => table {{hund} => gg "сто" ; _ => gg []} ;
|
||||
_ => table {{hund} => gg "сто" ;
|
||||
_ => table {{Masc} => "один" ; {Fem} => "одна" ; _ => "одно"}}} ;
|
||||
size = nom} ;
|
||||
lin pot0 d =
|
||||
{s = table {_ => d.s} ; size = d.size} ;
|
||||
lin pot110 =
|
||||
{s = table {_ => gg "десять"} ; size = plg} ;
|
||||
lin pot111 =
|
||||
{s = table {_ => gg "одиннадцать"} ; size = plg} ; --- 11
|
||||
lin pot1to19 d =
|
||||
{s = table {_ => d.s ! teen} ; size = plg} ;
|
||||
lin pot0as1 n =
|
||||
{s = table {p => n.s ! p ! unit} ; size = n.size} ;
|
||||
lin pot1 d =
|
||||
{s = table {_ => d.s ! ten} ; size = plg} ; ---
|
||||
lin pot1plus d e =
|
||||
{s = table {_ =>
|
||||
table {g => d.s ! ten ! g ++ e.s ! indep ! unit ! g}} ; size = e.size} ;
|
||||
lin pot1as2 n =
|
||||
{s = n.s ; size = n.size} ;
|
||||
lin pot2 d =
|
||||
{s = table {p => d.s ! p ! hund} ; size = plg} ;
|
||||
lin pot2plus d e =
|
||||
{s = table {p => table {g => d.s ! p ! hund ! g ++ e.s ! indep ! g}} ; size = e.size} ;
|
||||
lin pot2as3 n =
|
||||
{s = n.s ! indep} ;
|
||||
lin pot3 n =
|
||||
{s = gg (n.s ! attr ! Fem ++ mille ! n.size)} ;
|
||||
lin pot3plus n m =
|
||||
{s = table {g => n.s ! attr ! Fem ++ mille ! n.size ++ m.s ! indep ! g}} ;
|
||||
|
||||
--- TODO
|
||||
--- raz/odin
|
||||
}
|
||||
452
lib/resource-0.9/russian/ParadigmsRus.gf
Normal file
452
lib/resource-0.9/russian/ParadigmsRus.gf
Normal file
@@ -0,0 +1,452 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
--1 Russian Lexical Paradigms
|
||||
--
|
||||
-- Aarne Ranta, Janna Khegai 2003
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- Closed categories (determiners, pronouns, conjunctions) are
|
||||
-- accessed through the resource syntax API, $resource.Abs.gf$.
|
||||
--
|
||||
--
|
||||
-- The following files are presupposed:
|
||||
|
||||
resource ParadigmsRus = open (Predef=Predef), Prelude, MorphoRus, SyntaxRus,
|
||||
CategoriesRus, RulesRus in {
|
||||
|
||||
flags coding=utf8 ;
|
||||
|
||||
--2 Parameters
|
||||
--
|
||||
-- To abstract over gender names, we define the following identifiers.
|
||||
|
||||
oper
|
||||
Gender : Type ;
|
||||
masculine : Gender ;
|
||||
feminine : Gender ;
|
||||
neuter : Gender ;
|
||||
|
||||
-- To abstract over case names, we define the following.
|
||||
Case : Type ;
|
||||
|
||||
nominative : Case ;
|
||||
genitive : Case ;
|
||||
dative : Case ;
|
||||
accusative : Case ;
|
||||
instructive : Case ;
|
||||
prepositional : Case ;
|
||||
|
||||
-- In some (written in English) textbooks accusative case
|
||||
-- is put on the second place. However, we follow the case order
|
||||
-- standard for Russian textbooks.
|
||||
|
||||
-- To abstract over number names, we define the following.
|
||||
Number : Type ;
|
||||
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
|
||||
--2 Nouns
|
||||
|
||||
-- Best case: indeclinabe nouns: "кофе", "пальто", "ВУЗ".
|
||||
Animacy: Type ;
|
||||
|
||||
animate: Animacy;
|
||||
inanimate: Animacy;
|
||||
|
||||
mkIndeclinableNoun: Str -> Gender -> Animacy -> N ;
|
||||
|
||||
-- Worst case - give six singular forms:
|
||||
-- Nominative, Genetive, Dative, Accusative, Instructive and Prepositional;
|
||||
-- corresponding six plural forms and the gender.
|
||||
-- May be the number of forms needed can be reduced,
|
||||
-- but this requires a separate investigation.
|
||||
-- Animacy parameter (determining whether the Accusative form is equal
|
||||
-- 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 ;
|
||||
|
||||
-- мужчина, мужчины, мужчине, мужчину, мужчиной, мужчине
|
||||
-- мужчины, мужчин, мужчинам, мужчин, мужчинами, мужчинах
|
||||
|
||||
|
||||
-- Here are some common patterns. The list is far from complete.
|
||||
|
||||
-- Feminine patterns.
|
||||
|
||||
nMashina : Str -> N ; -- feminine, inanimate, ending with "-а", Inst -"машин-ой"
|
||||
nEdinica : Str -> N ; -- feminine, inanimate, ending with "-а", Inst -"единиц-ей"
|
||||
nZhenchina : Str -> N ; -- feminine, animate, ending with "-a"
|
||||
nNoga : Str -> N ; -- feminine, inanimate, ending with "г_к_х-a"
|
||||
nMalyariya : Str -> N ; -- feminine, inanimate, ending with "-ия"
|
||||
nTetya : Str -> N ; -- feminine, animate, ending with "-я"
|
||||
nBol : Str -> N ; -- feminine, inanimate, ending with "-ь"(soft sign)
|
||||
|
||||
-- Neuter patterns.
|
||||
|
||||
nObezbolivauchee : Str -> N ; -- neutral, inanimate, ending with "-ee"
|
||||
nProizvedenie : Str -> N ; -- neutral, inanimate, ending with "-e"
|
||||
nChislo : Str -> N ; -- neutral, inanimate, ending with "-o"
|
||||
nZhivotnoe : Str -> N ; -- masculine, inanimate, ending with "-ень"
|
||||
|
||||
-- Masculine patterns.
|
||||
|
||||
--Ending with consonant:
|
||||
nPepel : Str -> N ; -- masculine, inanimate, ending with "-ел"- "пеп-ла"
|
||||
|
||||
nBrat: Str -> N ; -- animate, брат-ья
|
||||
nStul: Str -> N ; -- same as above, but inanimate
|
||||
nMalush : Str -> N ; -- малышей
|
||||
nPotolok : Str -> N ; -- потол-ок - потол-ка
|
||||
|
||||
-- the next four differ in plural nominative and/or accusative form(s) :
|
||||
nBank: Str -> N ; -- банк-и (Nom=Acc)
|
||||
nStomatolog : Str -> N ; -- same as above, but animate
|
||||
nAdres : Str -> N ; -- адрес-а (Nom=Acc)
|
||||
nTelefon : Str -> N ; -- телефон-ы (Nom=Acc)
|
||||
|
||||
nNol : Str -> N ; -- masculine, inanimate, ending with "-ь" (soft sign)
|
||||
nUroven : Str -> N ; -- masculine, inanimate, ending with "-ень"
|
||||
|
||||
-- Nouns used as functions need a preposition. The most common is with Genitive.
|
||||
|
||||
mkFun : N -> Preposition -> Case -> N2 ;
|
||||
mkN2 : N -> N2 ;
|
||||
mkN3 : N -> Preposition -> Preposition -> N3 ;
|
||||
|
||||
-- Proper names.
|
||||
|
||||
mkPN : Str -> Gender -> Animacy -> PN ; -- "Иван", "Маша"
|
||||
nounPN : N -> PN ;
|
||||
|
||||
-- On the top level, it is maybe $CN$ that is used rather than $N$, and
|
||||
-- $NP$ rather than $PN$.
|
||||
|
||||
mkCN : N -> CN ;
|
||||
mkNP : Str -> Gender -> Animacy -> NP ;
|
||||
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
-- Non-comparison (only positive degree) one-place adjectives need 28 (4 by 7)
|
||||
-- forms in the worst case:
|
||||
|
||||
|
||||
-- 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
|
||||
-- in the current description, otherwise there would be 32 forms for
|
||||
-- positive degree.
|
||||
|
||||
-- mkA : ( : 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 "-ой",
|
||||
-- plural - молод-ые"
|
||||
AKakoj_Nibud : Str -> Str -> A ; -- ending with "-ой",
|
||||
-- plural - "как-ие"
|
||||
|
||||
-- Two-place adjectives need a preposition and a case as extra arguments.
|
||||
|
||||
mkA2 : A -> Str -> Case -> A2 ; -- "делим на"
|
||||
|
||||
-- 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
|
||||
-- comparison adjective with only one extra argument -
|
||||
-- non-syntaxic comparative form.
|
||||
-- Syntaxic forms are based on the positive forms.
|
||||
|
||||
|
||||
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 ;
|
||||
|
||||
--2 Adverbs
|
||||
|
||||
-- Adverbs are not inflected. Most lexical ones have position
|
||||
-- after the verb. Some can be preverbal (e.g. "always").
|
||||
|
||||
mkAdv : Str -> Adv ;
|
||||
|
||||
--2 Verbs
|
||||
--
|
||||
-- In our lexicon description ("Verbum") there are 62 forms:
|
||||
-- 2 (Voice) by { 1 (infinitive) + [2(number) by 3 (person)](imperative) +
|
||||
-- [ [2(Number) by 3(Person)](present) + [2(Number) by 3(Person)](future) +
|
||||
-- 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.
|
||||
Voice: Type;
|
||||
Aspect: Type;
|
||||
Tense : Type;
|
||||
Bool: Type;
|
||||
Conjugation: Type ;
|
||||
|
||||
first: Conjugation; -- "гуля-Ешь, гуля-Ем"
|
||||
firstE: Conjugation; -- Verbs with vowel "ё": "даёшь" (give), "пьёшь" (drink)
|
||||
second: Conjugation; -- "вид-Ишь, вид-Им"
|
||||
mixed: Conjugation; -- "хоч-Ешь - хот-Им"
|
||||
dolzhen: Conjugation; -- irregular
|
||||
|
||||
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
|
||||
-- ("я бегу", "ты бежишь", "он бежит", "мы бежим", "вы бежите", "они бегут"),
|
||||
-- a past form (singular, masculine: "я бежал"), an imperative form
|
||||
-- (singular, second person: "беги"), an infinitive ("бежать").
|
||||
-- Inherent aspect should also be specified.
|
||||
|
||||
mkVerbum : Aspect -> (_,_,_,_,_,_,_,_,_ : Str) -> V ;
|
||||
|
||||
-- Common conjugation patterns are two conjugations:
|
||||
-- first - verbs ending with "-ать/-ять" and second - "-ить/-еть".
|
||||
-- Instead of 6 present forms of the worst case, we only need
|
||||
-- a present stem and one ending (singular, first person):
|
||||
-- "я люб-лю", "я жд-у", etc. To determine where the border
|
||||
-- between stem and ending lies it is sufficient to compare
|
||||
-- first person from with second person form:
|
||||
-- "я люб-лю", "ты люб-ишь". Stems shoud be the same.
|
||||
-- So the definition for verb "любить" looks like:
|
||||
-- mkRegVerb Imperfective Second "люб" "лю" "любил" "люби" "любить";
|
||||
|
||||
mkRegVerb :Aspect -> Conjugation -> (_,_,_,_,_ : Str) -> V ;
|
||||
|
||||
-- For writing an application grammar one usualy doesn't need
|
||||
-- the whole inflection table, since each verb is used in
|
||||
-- a particular context that determines some of the parameters
|
||||
-- (Tense and Voice while Aspect is fixed from the beginning) for certain usage.
|
||||
-- The "V" type, that have these parameters fixed.
|
||||
-- We can extract the "V" from the lexicon.
|
||||
|
||||
-- mkV: Verbum -> Voice -> V ;
|
||||
-- mkPresentV: Verbum -> Voice -> V ;
|
||||
|
||||
|
||||
-- Two-place verbs, and the special case with direct object. Notice that
|
||||
-- a particle can be included in a $V$.
|
||||
|
||||
mkTV : V -> Str -> Case -> V2 ; -- "войти в дом"; "в", accusative
|
||||
mkV3 : V -> Str -> Str -> Case -> Case -> V3 ; -- "сложить письмо в конверт"
|
||||
tvDir : V -> V2 ; -- "видеть", "любить"
|
||||
tvDirDir : V -> V3 ;
|
||||
|
||||
-- The definitions should not bother the user of the API. So they are
|
||||
-- hidden from the document.
|
||||
--.
|
||||
Gender = SyntaxRus.Gender ;
|
||||
Case = SyntaxRus.Case ;
|
||||
Number = SyntaxRus.Number ;
|
||||
Animacy = SyntaxRus.Animacy;
|
||||
Aspect = SyntaxRus.Aspect;
|
||||
Voice = SyntaxRus.Voice ;
|
||||
Tense = SyntaxRus.RusTense ;
|
||||
Bool = Prelude.Bool ;
|
||||
Conjugation = MorphoRus.Conjugation;
|
||||
first = First ;
|
||||
firstE = FirstE ;
|
||||
second = Second ;
|
||||
mixed = Mixed ;
|
||||
dolzhen = Dolzhen;
|
||||
|
||||
true = True;
|
||||
false = False ;
|
||||
masculine = Masc ;
|
||||
feminine = Fem ;
|
||||
neuter = Neut ;
|
||||
nominative = Nom ;
|
||||
accusative = Acc ;
|
||||
dative = Dat ;
|
||||
genitive = Gen ;
|
||||
instructive = Inst ;
|
||||
prepositional = Prepos ;
|
||||
singular = Sg ;
|
||||
plural = Pl ;
|
||||
animate = Animate ;
|
||||
inanimate = Inanimate ;
|
||||
active = Act ;
|
||||
passive = Pass ;
|
||||
imperfective = Imperfective ;
|
||||
perfective = Perfective ;
|
||||
present = Present ;
|
||||
past = Past ;
|
||||
-- Degree = Pos | Comp | Super ;
|
||||
-- Person = P1 | P2 | P3 ;
|
||||
-- AfterPrep = Yes | No ;
|
||||
-- Possessive = NonPoss | Poss GenNum ;
|
||||
|
||||
-- Noun definitions
|
||||
|
||||
mkIndeclinableNoun = \s,g, anim ->
|
||||
{
|
||||
s = table { SF _ _ => s } ;
|
||||
g = g ;
|
||||
anim = anim
|
||||
} ** {lock_N = <>};
|
||||
|
||||
|
||||
mkN = \nomSg, genSg, datSg, accSg, instSg, preposSg,
|
||||
nomPl, genPl, datPl, accPl, instPl, preposPl, g, anim ->
|
||||
{
|
||||
s = table {
|
||||
SF Sg Nom => nomSg ;
|
||||
SF Sg Gen => genSg ;
|
||||
SF Sg Dat => datSg ;
|
||||
SF Sg Acc => accSg ;
|
||||
SF Sg Inst => instSg ;
|
||||
SF Sg Prepos => preposSg ;
|
||||
SF Pl Nom => nomPl ;
|
||||
SF Pl Gen => genPl ;
|
||||
SF Pl Dat => datPl ;
|
||||
SF Pl Acc => accPl ;
|
||||
SF Pl Inst => instPl ;
|
||||
SF Pl Prepos => preposPl
|
||||
} ;
|
||||
g = g ;
|
||||
anim = anim
|
||||
} ** {lock_N = <>} ;
|
||||
|
||||
nMashina = \s -> aEndInAnimateDecl s ** {lock_N = <>};
|
||||
nEdinica = \s -> ej_aEndInAnimateDecl s ** {lock_N = <>};
|
||||
nZhenchina = \s -> (aEndAnimateDecl s) ** { g = Fem ; anim = Animate } ** {lock_N = <>};
|
||||
nNoga = \s -> aEndG_K_KH_Decl s ** {lock_N = <>};
|
||||
nMalyariya = \s -> i_yaEndDecl s ** {lock_N = <>};
|
||||
nTetya = \s -> (yaEndAnimateDecl s) ** {g = Fem; anim = Animate; lock_N = <>} ;
|
||||
nBol = \s -> softSignEndDeclFem s ** {lock_N = <>};
|
||||
|
||||
-- Neuter patterns.
|
||||
|
||||
nObezbolivauchee = \s -> eeEndInAnimateDecl s ** {lock_N = <>};
|
||||
nZhivotnoe = \s -> oeEndAnimateDecl s ** {lock_N = <>};
|
||||
nProizvedenie = \s -> eEndInAnimateDecl s ** {lock_N = <>};
|
||||
nChislo = \s -> oEndInAnimateDecl s ** {lock_N = <>};
|
||||
|
||||
|
||||
-- Masculine patterns.
|
||||
nBank = \s -> nullEndInAnimateDecl s ** {lock_N = <>};
|
||||
nStomatolog = \s -> nullEndAnimateDecl s ** {lock_N = <>};
|
||||
nMalush = \s -> shEndDeclMasc s ** {lock_N = <>};
|
||||
nPotolok = \s ->okEndDeclMasc s ** {lock_N = <>};
|
||||
|
||||
nBrat = \s -> nullEndAnimateDeclBrat s** {lock_N = <>};
|
||||
nStul = \s -> nullEndInAnimateDeclStul s** {lock_N = <>};
|
||||
|
||||
nAdres = \s -> nullEndInAnimateDecl2 s ** {lock_N = <>};
|
||||
nTelefon = \s -> nullEndInAnimateDecl1 s ** {lock_N = <>};
|
||||
nPepel = \s -> nullEndInAnimateDeclPepel s ** {lock_N = <>};
|
||||
|
||||
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
|
||||
|
||||
mkPN = \ivan, g, anim ->
|
||||
case g of {
|
||||
Masc => mkProperNameMasc ivan anim ;
|
||||
_ => mkProperNameFem ivan anim
|
||||
} ** {lock_PN =<>};
|
||||
nounPN n = (mkCNProperName n)**{lock_PN=<>};
|
||||
|
||||
mkCN = UseN ;
|
||||
mkNP = \x,y,z -> UsePN (mkPN x y z) ;
|
||||
|
||||
-- Adjective definitions
|
||||
|
||||
adjInvar = \s -> { s = \\af => s } ** {lock_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= <>};
|
||||
|
||||
mkA2 a p c= mkAdjective2 a p 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
|
||||
|
||||
mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||
|
||||
-- Verb definitions
|
||||
|
||||
mkVerbum = \asp, sgP1, sgP2, sgP3, plP1, plP2, plP3,
|
||||
sgMascPast, imperSgP2, inf -> case asp of {
|
||||
Perfective =>
|
||||
mkVerb (perfectiveActivePattern inf imperSgP2
|
||||
(presentConj sgP1 sgP2 sgP3 plP1 plP2 plP3) (pastConj sgMascPast))
|
||||
(pastConj sgMascPast) ** { lock_V=<> };
|
||||
Imperfective =>
|
||||
mkVerb (imperfectiveActivePattern inf imperSgP2
|
||||
(presentConj sgP1 sgP2 sgP3 plP1 plP2 plP3) (pastConj sgMascPast))
|
||||
(pastConj sgMascPast) ** { lock_V=<> }
|
||||
};
|
||||
|
||||
oper presentConj: (_,_,_,_,_,_: Str) -> PresentVerb =
|
||||
\sgP1, sgP2, sgP3, plP1, plP2, plP3 ->
|
||||
table {
|
||||
PRF (ASg _) P1 => sgP1 ;
|
||||
PRF (ASg _) P2 => sgP2 ;
|
||||
PRF (ASg _) P3 => sgP3 ;
|
||||
PRF APl P1 => plP1 ;
|
||||
PRF APl P2 => plP2 ;
|
||||
PRF APl P3 => plP3
|
||||
};
|
||||
|
||||
mkRegVerb a b c d e f g = verbDecl a b c d e f g ** {lock_V = <>} ;
|
||||
-- defined in morpho.RusU.gf
|
||||
{-
|
||||
mkV a b = extVerb a b ** {lock_V = <>}; -- defined in types.RusU.gf
|
||||
|
||||
mkPresentV = \aller, vox ->
|
||||
{ s = table {
|
||||
VFin gn p => aller.s ! VFORM vox (VIND (VPresent (numGNum gn) p)) ;
|
||||
VImper n p => aller.s ! VFORM vox (VIMP n p) ;
|
||||
VInf => aller.s ! VFORM vox VINF ;
|
||||
VSubj gn => aller.s ! VFORM vox (VSUB gn)
|
||||
}; t = 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
|
||||
|
||||
} ;
|
||||
4
lib/resource-0.9/russian/ResourceRus.gf
Normal file
4
lib/resource-0.9/russian/ResourceRus.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
concrete ResourceRus of Resource = RulesRus, ClauseRus, StructuralRus ** {} ;
|
||||
---- concrete ResourceRus of Resource = RulesRus, VerbphraseRus ** {} ;
|
||||
201
lib/resource-0.9/russian/RulesRus.gf
Normal file
201
lib/resource-0.9/russian/RulesRus.gf
Normal file
@@ -0,0 +1,201 @@
|
||||
--# -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 ;
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
138
lib/resource-0.9/russian/StructuralRus.gf
Normal file
138
lib/resource-0.9/russian/StructuralRus.gf
Normal file
@@ -0,0 +1,138 @@
|
||||
--# -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$.
|
||||
|
||||
concrete StructuralRus of Structural = CategoriesRus, NumeralsRus ** open Prelude, SyntaxRus in {
|
||||
flags
|
||||
coding=utf8 ;
|
||||
|
||||
lin
|
||||
|
||||
-- First mount the numerals.
|
||||
|
||||
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 "почти" ;
|
||||
although_Subj = ss "хотя" ;
|
||||
and_Conj = ss "и" ** {n = Pl} ;
|
||||
because_Subj = ss ["потому что"] ;
|
||||
before_Prep ={ s2 = "перед" ; c = Inst};
|
||||
behind_Prep = { s2 = "за" ; c = Inst };
|
||||
between_Prep = { s2 = "между" ; c = Inst};
|
||||
both_AndConjD = sd2 "как" [", так и"] ** {n = Pl} ;
|
||||
by8agent_Prep = { s2 = ["с помощью"] ; c = Gen};
|
||||
by8means_Prep = { s2 = ["с помощью"] ; c = Gen};
|
||||
can8know_VV = verbMoch ;
|
||||
can_VV = verbMoch ;
|
||||
during_Prep = { s2 = ["в течение"] ; c = Gen};
|
||||
either8or_ConjD = sd2 "либо" [", либо"] ** {n = Sg} ;
|
||||
-- comma is not visible in GUI!
|
||||
every_Det = kazhdujDet ** {n = Sg ; g = PNoGen; c= Nom} ;
|
||||
everybody_NP = mkNounPhrase Pl (noun2CommNounPhrase (eEnd_Decl "вс")) ;
|
||||
everything_NP = pron2NounPhrase pronVseInanimate Inanimate;
|
||||
everywhere_Adv = ss "везде" ;
|
||||
from_Prep = { s2 = "от" ; c = Gen };
|
||||
he_NP = pron2NounPhrase pronOn Animate;
|
||||
how_IAdv = ss "как" ;
|
||||
how8many_IDet = skolkoSgDet ** {n = Sg; g = (PGen Neut); c= Gen};
|
||||
i_NP = pron2NounPhrase pronYa Animate;
|
||||
if_Subj = ss "если" ;
|
||||
in8front_Prep = { s2 = "перед" ; c = Inst};
|
||||
in_Prep = { s2 = "в" ; c = Prepos };
|
||||
it_NP = pron2NounPhrase pronOno Inanimate;
|
||||
many_Det = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
|
||||
|
||||
most_Det = bolshinstvoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
|
||||
-- inanimate, Sg: "большинство телефонов безмолству-ет"
|
||||
most8many_Det = bolshinstvoPlDet ** {n = Pl; g = (PGen Neut); c= Gen} ;
|
||||
-- animate, Pl: "большинство учащихся хорошо подготовлен-ы"
|
||||
much_Det = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ; -- same as previous
|
||||
must_VV = verbDolzhen ;
|
||||
no_Phr = ss ["Нет ."] ;
|
||||
on_Prep = { s2 = "на" ; c = Prepos };
|
||||
or_Conj = ss "или" ** {n = Sg} ;
|
||||
otherwise_Adv = ss "иначе" ;
|
||||
part_Prep = { s2 = "" ; c = Nom}; -- missing in Russian
|
||||
possess_Prep = { s2 = "" ; c = Gen}; --- ?? AR 19/2/2004
|
||||
quite_Adv = ss "довольно" ;
|
||||
she_NP = pron2NounPhrase pronOna Animate;
|
||||
so_Adv = ss "так";
|
||||
somebody_NP = pron2NounPhrase pronKtoTo Animate;
|
||||
some_Det = nekotorujDet ** {n = Sg; g = PNoGen; c= Nom} ;
|
||||
some_NDet = nekotorujDet ** { g = PNoGen; c= Nom} ;
|
||||
something_NP = pron2NounPhrase pronChtoTo Inanimate ;
|
||||
somewhere_Adv = ss "где-нибудь" ;
|
||||
--- TheseNumNP n = { s =\\_ => [] ; n = Pl; p = P3; g= PGen Fem ;
|
||||
--- anim = Animate ; pron = True} ; -- missing in Russian
|
||||
--- ThoseNumNP n = { s =\\_ => [] ; n = Pl; p = P3; g=PGen Fem ;
|
||||
--- anim = Animate ; pron = True} ; -- missing in Russian
|
||||
that_Det = totDet ** {n = Sg; g = PNoGen; c= Nom} ;
|
||||
that_NP = det2NounPhrase totDet ; -- inanimate form only
|
||||
therefore_Adv = ss "следовательно" ;
|
||||
these_NDet = etotDet ** { g = PNoGen; c= Nom} ;
|
||||
they8fem_NP = pron2NounPhrase pronOni Animate;
|
||||
they_NP = pron2NounPhrase pronOni Animate;
|
||||
this_Det = etotDet ** {n = Sg; g = PNoGen; c= Nom} ;
|
||||
this_NP = det2NounPhrase etotDet ; -- inanimate form only
|
||||
those_NDet = totDet ** {g = PNoGen; c= Nom} ;
|
||||
thou_NP = pron2NounPhrase pronTu Animate;
|
||||
through_Prep = { s2 = "через" ; c = Acc };
|
||||
to_Prep = { s2 = "к" ; c = Dat };
|
||||
too_Adv = ss "слишком" ;
|
||||
under_Prep = { s2 = "под" ; c = Inst };
|
||||
very_Adv = ss "очень" ;
|
||||
want_VV = verbKhotet ;
|
||||
we_NP = pron2NounPhrase pronMu Animate ;
|
||||
what8many_IP = pron2NounPhraseNum pronChto Inanimate Pl;
|
||||
what8one_IP = pron2NounPhraseNum pronChto Inanimate Sg;
|
||||
when_IAdv = ss "когда" ;
|
||||
when_Subj = ss "когда" ;
|
||||
where_IAdv = ss "где" ;
|
||||
which8many_IDet = kotorujDet ** {n = Pl; g = PNoGen; c= Nom} ;
|
||||
which8one_IDet = kotorujDet ** {n = Sg; g = PNoGen; c= Nom} ;
|
||||
who8many_IP = pron2NounPhraseNum pronKto Animate Pl;
|
||||
who8one_IP = pron2NounPhraseNum pronKto Animate Sg;
|
||||
why_IAdv = ss "почему" ;
|
||||
with_Prep = { s2 = "с" ; c = Inst};
|
||||
without_Prep = { s2 = "без" ; c = Gen};
|
||||
ye_NP = pron2NounPhrase pronVu Animate;
|
||||
yes_Phr = ss ["Да ."] ;
|
||||
you_NP = pron2NounPhrase pronVu Animate;
|
||||
--- NoDet = nikakojDet ** {n = Sg; g = PNoGen; c= Nom} ;
|
||||
--- AnyDet = lubojDet ** {n = Sg; g = PNoGen; c= Nom} ;
|
||||
--- AnyNumDet = mkDeterminerNum (lubojDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
--- NoNumDet = mkDeterminerNum (nikakojDet ** {n = Pl; g = PNoGen; c= Nom} );
|
||||
---NobodyNP = pron2NounPhrase pronNikto Animate;
|
||||
---NothingNP = pron2NounPhrase pronNichto Inanimate;
|
||||
|
||||
-- In case of "neither.. no" expression double negation is not
|
||||
-- only possible, but also required in Russian.
|
||||
-- There is no means of control for this however in the resource grammar.
|
||||
--- NeitherNor = sd2 "ни" [", ни"] ** {n = Sg} ;
|
||||
--- NowhereNP = ss "нигде" ;
|
||||
--- AgentPrep = { s2 = "" ; c = Nom}; -- missing in Russian
|
||||
} ;
|
||||
247
lib/resource-0.9/russian/SwadeshLexRus.gf
Normal file
247
lib/resource-0.9/russian/SwadeshLexRus.gf
Normal file
@@ -0,0 +1,247 @@
|
||||
--# -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 "вытира" "ю" "вытирал" "вытирай" "вытирать" ;
|
||||
|
||||
};
|
||||
1522
lib/resource-0.9/russian/SyntaxRus.gf
Normal file
1522
lib/resource-0.9/russian/SyntaxRus.gf
Normal file
File diff suppressed because it is too large
Load Diff
42
lib/resource-0.9/russian/TimeRus.gf
Normal file
42
lib/resource-0.9/russian/TimeRus.gf
Normal file
@@ -0,0 +1,42 @@
|
||||
concrete TimeRus of Time = NumeralsRus **
|
||||
open Prelude, CategoriesRus
|
||||
--, ParadigmsRus
|
||||
, MorphoRus in {
|
||||
|
||||
flags coding=utf8 ;
|
||||
|
||||
lincat
|
||||
-- SS does not work for Russian,
|
||||
-- например, "первое мая, суббота" - "парад состоялся первоГО мая, в субботУ" :
|
||||
Date = N ;
|
||||
Weekday = N ;
|
||||
Hour = {s: Case => Str} ;
|
||||
Minute = {s: Case => Str};
|
||||
Time = SS ;
|
||||
|
||||
lin
|
||||
DayDate day = day ;
|
||||
DayTimeDate day time = {s=\\sf => day.s ! sf ++ "," ++ time.s; g=day.g; anim=day.anim; lock_N=<>} ;
|
||||
|
||||
-- The formulation (strings in between) depends on the number
|
||||
-- например, "один час" - "двенадцать часОВ"
|
||||
-- so all the definitions that deal with "Time" are only partially correct:
|
||||
FormalTime h m = ss (h.s!Nom ++ "часов" ++ m.s!Nom ++ "минут") ;
|
||||
PastTime h m = ss (m.s!Nom++ "минут"++h.s!Gen) ;
|
||||
ToTime h m = ss ("без"++m.s!Gen ++ "минут" ++ h.s!Nom) ;
|
||||
ExactTime h = ss (h.s!Nom ++ "ровно") ;
|
||||
|
||||
-- "Numerals.gf" is not refined enough to give the time categories:
|
||||
NumHour n = {s = \\_ => n.s ! attr ! Masc} ;
|
||||
NumMinute n = {s =\\_ => n.s ! attr ! Fem } ;
|
||||
|
||||
monday = ponedelnik ** {lock_N=<>};
|
||||
tuesday = vtornik ** {lock_N=<>};
|
||||
wednesday = sreda ** {lock_N=<>};
|
||||
thursday = chetverg ** {lock_N=<>};
|
||||
friday = pyatnica ** {lock_N=<>};
|
||||
saturday = subbota ** {lock_N=<>};
|
||||
sunday = voskresenje ** {lock_N=<>};
|
||||
|
||||
} ;
|
||||
|
||||
344
lib/resource-0.9/russian/TypesRus.gf
Normal file
344
lib/resource-0.9/russian/TypesRus.gf
Normal file
@@ -0,0 +1,344 @@
|
||||
--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.
|
||||
--
|
||||
|
||||
resource TypesRus = open Prelude in {
|
||||
|
||||
flags coding=utf8 ;
|
||||
|
||||
--2 Enumerated parameter types
|
||||
--
|
||||
-- These types are the ones found in school grammars.
|
||||
-- Their parameter values are atomic.
|
||||
|
||||
param
|
||||
Gender = Masc | Fem | Neut ;
|
||||
Number = Sg | Pl ;
|
||||
Case = Nom | Gen | Dat | Acc | Inst | Prepos ;
|
||||
Voice = Act | Pass ;
|
||||
Aspect = Imperfective | Perfective ;
|
||||
RusTense = Present | Past | Future ;
|
||||
Degree = Pos | Comp | Super ;
|
||||
Person = P1 | P2 | P3 ;
|
||||
AfterPrep = Yes | No ;
|
||||
Possessive = NonPoss | Poss GenNum ;
|
||||
Animacy = Animate | Inanimate ;
|
||||
Anteriority = Simul | Anter ;
|
||||
ClForm = ClIndic RusTense Anteriority | ClCondit | ClInfinit | ClImper;
|
||||
-- "naked infinitive" clauses
|
||||
|
||||
|
||||
-- A number of Russian nouns have common gender. They can
|
||||
-- denote both males and females: "умница" (a clever person), "инженер" (an engineer).
|
||||
-- We overlook this phenomenon for now.
|
||||
|
||||
-- The AfterPrep parameter is introduced in order to describe
|
||||
-- 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: "большой дом" - "большие дома"
|
||||
-- (a big house - big houses).
|
||||
-- The plural never makes a gender distinction.
|
||||
|
||||
GenNum = ASg Gender | APl ;
|
||||
|
||||
-- Coercions between the compound gen-num type and gender and number:
|
||||
oper
|
||||
gNum : Gender -> Number -> GenNum = \g,n ->
|
||||
case n of
|
||||
{ Sg => case g of
|
||||
{ Fem => ASg Fem ;
|
||||
Masc => ASg Masc ;
|
||||
Neut => ASg Neut } ;
|
||||
Pl => APl
|
||||
} ;
|
||||
|
||||
pgNum : PronGen -> Number -> GenNum = \g,n ->
|
||||
case n of
|
||||
{ Sg => case g of
|
||||
{ PGen Fem => ASg Fem ;
|
||||
PGen Masc => ASg Masc ;
|
||||
PGen Neut => ASg Neut ;
|
||||
_ => ASg Masc } ;
|
||||
Pl => APl
|
||||
} ;
|
||||
-- _ => variants {ASg Masc ; ASg Fem} } ;
|
||||
-- "variants" version cause "no term variants" error during linearization
|
||||
|
||||
|
||||
|
||||
oper numGNum : GenNum -> Number = \gn ->
|
||||
case gn of { APl => Pl ; _ => Sg } ;
|
||||
|
||||
oper genGNum : GenNum -> Gender = \gn ->
|
||||
case gn of { ASg Fem => Fem; _ => Masc } ;
|
||||
|
||||
oper numAF: AdjForm -> Number = \af ->
|
||||
case af of { AdvF => Sg; AF _ _ gn => (numGNum gn) } ;
|
||||
|
||||
oper genAF: AdjForm -> Gender = \af ->
|
||||
case af of { AdvF => Neut; AF _ _ gn => (genGNum gn) } ;
|
||||
|
||||
oper caseAF: AdjForm -> Case = \af ->
|
||||
case af of { AdvF => Nom; AF c _ _ => c } ;
|
||||
|
||||
-- The Degree parameter should also be more complex, since most Russian
|
||||
-- adjectives have two comparative forms:
|
||||
-- attributive (syntactic (compound), declinable) -
|
||||
-- "более высокий" (corresponds to "more high")
|
||||
-- and predicative (indeclinable)- "выше" (higher) and more than one
|
||||
-- superlative forms: "самый высокий" (corresponds to "the most high") -
|
||||
-- "наивысший" (the highest).
|
||||
|
||||
-- Even one more parameter independent of the degree can be added,
|
||||
-- since Russian adjectives in the positive degree also have two forms:
|
||||
-- long (attributive and predicative) - "высокий" (high) and short (predicative) - "высок"
|
||||
-- although this parameter will not be exactly orthogonal to the
|
||||
-- degree parameter.
|
||||
-- Short form has no case declension, so in principle
|
||||
-- it can be considered as an additional case.
|
||||
|
||||
-- Note: although the predicative usage of the long
|
||||
-- form is perfectly grammatical, it can have a slightly different meaning
|
||||
-- compared to the short form.
|
||||
-- For example: "он - больной" (long, predicative) vs.
|
||||
-- "он - болен" (short, predicative).
|
||||
|
||||
oper
|
||||
AdjDegr : Type = {s : Degree => AdjForm => Str} ;
|
||||
|
||||
-- Adjective type includes both non-degree adjective classes:
|
||||
-- possesive ("мамин"[mother's], "лисий" [fox'es])
|
||||
-- and relative ("русский" [Russian]) adjectives.
|
||||
|
||||
Adjective : Type = {s : AdjForm => Str} ;
|
||||
|
||||
-- A special type of adjectives just having positive forms
|
||||
-- (for semantic reasons) is useful, e.g. "русский".
|
||||
|
||||
oper
|
||||
extAdjective : AdjDegr -> Adjective = \adj ->
|
||||
{ s = \\af => adj.s ! Pos ! af } ;
|
||||
|
||||
--3 Verbs
|
||||
|
||||
-- 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
|
||||
} ;
|
||||
|
||||
|
||||
--3 Other open classes
|
||||
--
|
||||
-- Proper names and adverbs are the remaining open classes.
|
||||
|
||||
oper
|
||||
PNm : Type = {s : Case => Str ; g : Gender} ;
|
||||
|
||||
-- Adverbials are not inflected (we ignore comparison, and treat
|
||||
-- compared adverbials as separate expressions; this could be done another way).
|
||||
|
||||
Adverb : Type = SS ;
|
||||
|
||||
|
||||
--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.
|
||||
--
|
||||
|
||||
--3 Relative pronouns
|
||||
--
|
||||
-- Relative pronouns are inflected in
|
||||
-- gender, number, and case just like adjectives.
|
||||
|
||||
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 };
|
||||
};
|
||||
63
lib/resource-0.9/russian/VerbphraseRus.gf
Normal file
63
lib/resource-0.9/russian/VerbphraseRus.gf
Normal file
@@ -0,0 +1,63 @@
|
||||
--# -path=.:../abstract:../../prelude
|
||||
|
||||
--1 The Top-Level Russian Resource Grammar: Combination Rules
|
||||
--
|
||||
-- Aarne Ranta 2002 -- 2003
|
||||
--
|
||||
-- This is the Russian concrete syntax of the multilingual resource
|
||||
-- grammar. Most of the work is done in the file $syntax.Rus.gf$.
|
||||
-- However, for the purpose of documentation, we make here explicit the
|
||||
-- linearization types of each category, so that their structures and
|
||||
-- dependencies can be seen.
|
||||
-- Another substantial part are the linearization rules of some
|
||||
-- structural words.
|
||||
--
|
||||
-- The users of the resource grammar should not look at this file for the
|
||||
-- linearization rules, which are in fact hidden in the document version.
|
||||
-- They should use $resource.Abs.gf$ to access the syntactic rules.
|
||||
-- This file can be consulted in those, hopefully rare, occasions in which
|
||||
-- one has to know how the syntactic categories are
|
||||
-- implemented. The parameter types are defined in $TypesRus.gf$.
|
||||
|
||||
concrete VerbphraseRus of Verbphrase = CategoriesRus **
|
||||
open Prelude, SyntaxRus in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
UseV = predVerb ;
|
||||
UsePassV = passVerb ;
|
||||
ComplV2 = complTransVerb ;
|
||||
ComplV3 = complDitransVerb ;
|
||||
ComplReflV2 = reflTransVerb ;
|
||||
ComplVS = complSentVerb ;
|
||||
ComplVV = complVerbVerb ;
|
||||
ComplVQ = complQuestVerb ;
|
||||
ComplVA = complAdjVerb ;
|
||||
ComplV2A = complDitransAdjVerb ;
|
||||
ComplSubjV2V = complDitransVerbVerb ;
|
||||
ComplObjV2V = complDitransVerbVerb_2 ;
|
||||
ComplV2S = complDitransSentVerb ;
|
||||
ComplV2Q = complDitransQuestVerb ;
|
||||
|
||||
PredAP = predAdjective ;
|
||||
PredCN = predCommNoun ;
|
||||
PredNP = predNounPhrase ;
|
||||
PredAdv = predAdverb ;
|
||||
|
||||
PredProgVP x = x ;
|
||||
|
||||
-- Use VPs
|
||||
|
||||
PredVP = predVerbGroupClause ;
|
||||
RelVP = relVerbPhrase ;
|
||||
IntVP = intVerbPhrase ;
|
||||
|
||||
-- PosVP tp = predVerbGroup True tp ;
|
||||
-- NegVP tp = predVerbGroup False tp ;
|
||||
UseVP = predVerbGroupI ;
|
||||
|
||||
AdvVP = adVerbPhrase ;
|
||||
SubjVP = subjunctVerbPhrase ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user