Improvements of Russian Phrasebook that do not rely on Participles and Numerals

This commit is contained in:
Nick Frolov
2011-10-18 15:16:58 +00:00
parent 08bcc07325
commit bdd52b0560
10 changed files with 137 additions and 117 deletions

View File

@@ -157,7 +157,7 @@ lin
important_A = mkA "важный" ;
industry_N = mkN "промышленность" ;
iron_N = mkN "железо" ;
john_PN = mkPN "Иван" Masc Animate ;
john_PN = mkPN "Иван" Masc Sg Animate ;
jump_V = regV imperfective first "прыга" "ю" "прыгал" "прыгай" "прыгать" ;
kill_V2 = dirV2 (regV imperfective first "убива" "ю" "убивал" "убивай" "убивать" ) ;
king_N = mkN "король" "короля" "королю" "короля" "королем" "короле" "короле" "короли" "королей" "королям" "королей" "королями" "королях" masculine animate ;
@@ -211,7 +211,7 @@ lin
paint_V2A = dirV2 (regV imperfective first "рису" "ю" "рисовал" "рисуй" "рисовать" ) ;
--- palace_N = nDvorec "двор" ; -- +++ MG_UR: added +++
paper_N = mkN "бумага" ;
paris_PN = mkPN "Париж" Masc Inanimate ;
paris_PN = mkPN "Париж" Masc Sg Inanimate ;
peace_N = mkN "мир" ;
pen_N = mkN "ручка" ;
person_N = mkN "лицo" animate ; -- irregular
@@ -317,7 +317,7 @@ lin
think_V = regV imperfective first "дума" "ю" "думал" "думай" "думать" ;
throw_V2 = dirV2 (regV imperfective first "броса" "ю" "бросал" "бросай" "бросать" ) ;
tie_V2 = dirV2 (regV imperfective first "вяж" "у" "вязал" "вяжи" "вязать") ;
-- today_Adv = ;
today_Adv = mkAdv "сегодня" ;
tongue_N = mkN "язык" ;
tooth_N = mkN "зуб" ;
train_N = mkN "поезд" ;
@@ -353,7 +353,7 @@ lin
wood_N = mkN "дерево" ;
worm_N = mkN "черв" ;
write_V2 = dirV2 (regV imperfective first "пиш" "у" "писал" "пиши" "писать" );
year_N = mkN "годь" ;
year_N = mkN "год" ;
yellow_A = mkA "жёлтый" ;
young_A = mkA "молодой" "моложе";
}

View File

@@ -34,7 +34,7 @@ oper pronTu : Pronoun =
Prepos _ => "тебе" } }
in pronYaTu nonPoss "тво" P2 ;
-- Pronouns ya, tu, svoj
-- Pronouns ya, ty, svoj
oper pronYaTu : { s : Case => Str } -> Str -> Person -> Pronoun =
\nonPoss, mo, pers ->
{ s = table {
@@ -1313,4 +1313,15 @@ oper ProperName : Type = {s : Case => Str ; g : Gender ; anim : Animacy} ;
(Prepos _) => masha + "е" };
g = Fem ; anim = anim };
-- Люберцы, Нидерланды
mkProperNamePl : Str -> Animacy -> ProperName = \lubercy, anim ->
let a : Str = case lubercy of {_+("ч"|"щ"|"ш"|"ж") => "а"; _ => "о" } in
{ s = table { Nom => lubercy + "ы";
Gen => lubercy + a + "в";
Dat => lubercy + "ам";
Acc => lubercy + "ы";
Inst => lubercy + "ей";
(Prepos _) => lubercy + "ах" };
g = Neut ; anim = anim };
};

View File

@@ -101,7 +101,7 @@ oper
-- Proper names.
mkPN : Str -> Gender -> Animacy -> PN ; -- "Иван", "Маша"
mkPN : Str -> Gender -> Number -> Animacy -> PN ; -- "Иван", "Маша"
nounPN : N -> PN ;
@@ -130,6 +130,7 @@ oper
-- Adjectives with irregular comparative.
mkA : (positive, comparative : Str) -> A ;
} ;
-- Two-place adjectives need a preposition and a case as extra arguments.
@@ -361,10 +362,13 @@ foreign = Foreign; -- +++ MG_UR: added +++
mkN3 f p2 p3 = (UseN f) ** {c2 = p2; c3 = p3; lock_N3 = <>} ;
mkPN = \ivan, g, anim ->
case g of {
Masc => mkProperNameMasc ivan anim ;
_ => mkProperNameFem ivan anim
mkPN = \ivan, g, n, anim ->
case n of {
Sg => case g of {
Masc => mkProperNameMasc ivan anim ;
_ => mkProperNameFem ivan anim
} ;
Pl => mkProperNamePl ivan anim
} ** {lock_PN =<>};
nounPN n = {s=\\c => n.s! NF Sg c; anim=n.anim; g=n.g; lock_PN=<>};
@@ -377,7 +381,7 @@ foreign = Foreign; -- +++ MG_UR: added +++
makeCN = UseN;
makeNP = \x,y,z -> UsePN (mkPN x y z) ;
makeNP = \x,y,z -> UsePN (mkPN x y singular z) ;
mkA = overload {
mkA : (positive : Str) -> A = mk1A ;
@@ -397,6 +401,12 @@ foreign = Foreign; -- +++ MG_UR: added +++
stem => mkAdjDeg (adjInvar stem) comparative
} ;
-- mkParticiple : VP -> AP = \v, voice ->
-- case voice of {
-- Act => ;
-- Pass => ;
-- } ;
-- khaki, mini, hindi, netto
adjInvar : Str -> Adjective = \stem -> { s = \\_ => stem } ;

View File

@@ -47,6 +47,7 @@ lin
here7from_Adv = ss "отсюда" ;
how_IAdv = ss "как" ;
how8many_IDet = skolkoSgDet ** {n = Pl; g = (PGen Neut); c= Gen};
how8much_IAdv = ss "сколько" ;
i_Pron = pronYa ;
if_Subj = ss "если" ;
in8front_Prep = { s = "перед" ; c = Inst};
@@ -114,6 +115,9 @@ lin
youPol_Pron = pronVu;
have_V2= P.dirV2 (P.regV P.imperfective P.first "име" "ю" "имел" "имей" "иметь" );
have_V3 = P.mkV3 (P.mkV P.imperfective "есть" "есть" "есть" "есть" "есть" "есть" "был" "будь" "есть") "" "у" Nom Gen;
have_not_V3 = P.mkV3 (P.mkV P.imperfective "нет" "нет" "нет" "нет" "нет" "нет" "не было" "не будь" "нет") "" "у" Gen Gen;
--- NoDet = nikakojDet ** {n = Sg; g = PNoGen; c= Nom} ;
--- AnyDet = lubojDet ** {n = Sg; g = PNoGen; c= Nom} ;

View File

@@ -2,30 +2,9 @@
concrete SymbolRus of Symbol = CatRus ** open Prelude, ResRus in {
{- TODO!
lin
SymbPN i = {s = addGenitiveS i.s ; g = Neutr} ;
IntPN i = {s = addGenitiveS i.s ; g = Neutr} ;
FloatPN i = {s = addGenitiveS i.s ; g = Neutr} ;
NumPN i = {s = i.s ; g = Neutr} ;
CNIntNP cn i = {
s = \\c => cn.s ! Sg ! Nom ++ (addGenitiveS i.s) ! c ;
a = agrgP3 Sg cn.g
} ;
CNSymbNP det cn xs = {
s = \\c => det.s ++ cn.s ! det.n ! Nom ++ (addGenitiveS xs.s) ! c ;
a = agrgP3 det.n cn.g
} ;
CNNumNP cn i = {
s = \\c => cn.s ! Sg ! Nom ++ i.s ! c ;
a = agrgP3 Sg cn.g
} ;
SymbS sy = sy ;
SymbNum sy = { s = addGenitiveS sy.s ; n = Pl ; hasCard = True } ;
SymbOrd sy = { s = \\c => sy.s ++ (regGenitiveS "th")!c} ;
-}
{- TODO! -}
-- lin
-- SymbPN i = {s = i.s ; g = Neut } ;
lincat
@@ -37,5 +16,4 @@ lin
-- BaseSymb = infixSS "and" ;
ConsSymb = infixSS "," ;
}

View File

@@ -53,7 +53,8 @@ concrete VerbRus of Verb = CatRus ** open ResRus, Prelude in {
};
-- infinitive does not save GenNum,
-- but indicative does for the sake of adjectival predication !
ClIndic Present _ => zloj.s ! AF Nom Animate gn ;
-- ClIndic Present _ => zloj.s ! AF Nom Animate gn ;
ClIndic Present _ => zloj.s ! AFShort gn ;
ClIndic PastRus _ => case gn of
{ (GSg Fem) => "была" ++ zloj.s! AF Nom Animate (GSg Fem);
(GSg Masc) => "был" ++ zloj.s! AF Nom Animate (GSg Masc);