1
0
forked from GitHub/gf-core

A tested grammar for Russian participles and gerunds. Several verbs of mixed conjugation are not covered yet, though.

This commit is contained in:
Nick Frolov
2011-12-22 14:43:40 +00:00
parent cd671c58a9
commit d9502fa575
2 changed files with 75 additions and 8 deletions

View File

@@ -1015,8 +1015,6 @@ oper ti_j_EndDecl : Str -> Adjective = \s ->{s = table {
} ;
-}
---- 2 Adverbs
--
--oper vsegda: Adverb = { s = "всегда" } ;
@@ -1037,6 +1035,47 @@ oper ti_j_EndDecl : Str -> Adjective = \s ->{s = table {
-- +++ MG_UR: new conjugation class 'Foreign' introduced +++
param Conjugation = First | FirstE | Second | SecondA | Mixed | Dolzhen | Foreign ;
oper hasConj : Verbum -> Conjugation = \ v ->
case v.s ! VFORM Act VINF of {
-- irregular first
_+("бр"|"стел"|"поч"|"зижд"|"б"|"в"|"л"|"п"|"ш"|"гн"|"ж"|"зыб"|"шиб")+"ить"+(""|"ся") => First ;
-- irregular second
_+("блест"|"бол"|"вел"|"верт"|"вид"|"вис"|"галд"|"гляд"|"гор"|"грем"|"гуд"|"гунд"|"дуд"
|"завис"|"звен"|"зр"|"зуд"|"кип"|"киш"|"копт"|"корп"|"кряхт"|"лет"|"ненавид"|"обид"
|"перд"|"пыхт"|"сверб"|"свирист"|"свист"|"сид"|"сип"|"скорб"|"скрип"|"смерд"|"смотр"|"соп"
|"тарахт"|"терп"|"храп"|"хруст"|"шелест"|"шелест")+"еть"+(""|"ся") => Second ;
_+("бренч"|"брюзж"|"бурч"|"верещ"|"визж"|"ворч"|"гн"|"дребезж"|"дыш"|"держ"|"дрож"|"жужж"|"журч"
|"звуч"|"крич"|"леж"|"молч"|"мыч"|"пищ"|"рыч"|"слыш"|"сп"|"стуч"|"торч"|"трещ"
|"урч"|"фырч"|"шурш"|"шкварч")+"ать"+(""|"ся") => SecondA ;
-- regular first
_+("сто"|"бо")+"ять"+(""|"ся") => SecondA ;
stem+("е"|"а"|"о"|"у"|"я"|"ы")+"ть" => First;
-- regular second
stem+"ить" => Second;
-- default
stem+"ть" => First
} ;
oper verbStem : Verbum -> Str = \ v ->
case v.s ! VFORM Act VINF of {
stem+"ть" => stem ;
stem+"ти" => stem ;
stem+"и" => stem
} ;
oper verbHasEnding : Verbum -> Str = \ v ->
case v.s ! (VFORM Act (VIND GPl (VPresent P3))) of {
_+"ут" => "ущ" ;
_+"ют" => "ющ" ;
_+"ат" => "ащ" ;
_+"ят" => "ящ"
} ;
oper stemHasEnding : Str -> Str = \ s ->
case s of {
_+("а"|"е"|"ё"|"и"|"о"|"у"|"э"|"ю"|"я") => "вш" ;
_ => "ш"
} ;
--3 First conjugation (in Present) verbs :
oper verbIdti : Verbum = verbDecl Imperfective First "ид" "у" "шел" "иди" "идти";

View File

@@ -401,12 +401,6 @@ 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 } ;
@@ -420,6 +414,40 @@ foreign = Foreign; -- +++ MG_UR: added +++
} ** {lock_A = <>};
oper mkParticiple : Voice -> VTense -> V -> A = \voice, tense, v ->
let vstem = verbStem v in
let actpres = verbHasEnding v in
let actpast = stemHasEnding vstem in
let passpast = case hasConj v of {
(First|FirstE) => "ем" ;
(Second|SecondA) => "им" ;
_ => "ем"
} in
case <voice, tense> of {
<Act, VPresent _> => mkA (vstem + actpres + "ий") ;
<Act, VPast> => mkA (vstem + actpast + "ий") ;
<Pass, VPresent _> => mkA (vstem + "нный") ;
<Pass, VPast> => mkA (vstem + passpast + "ый") ;
_ => mkA "" -- Russian participles do not have a future tense
} ;
oper mkActPresParticiple : V -> A = mkParticiple Act (VPresent P3) ;
oper mkActPastParticiple : V -> A = mkParticiple Act (VPresent P3) ;
oper mkPassPresParticiple : V -> A = mkParticiple Pass VPast ;
oper mkPassPastParticiple : V -> A = mkParticiple Pass VPast ;
oper mkGerund : VTense -> V -> Adv = \tense, v ->
let vstem = verbStem v in
let suffix = case hasConj v of {
SecondA => "а" ;
_ => "я"
} in
case tense of {
VPresent _ => mkAdv (vstem + suffix) ;
VPast => mkAdv (vstem + "в") ;
_ => mkAdv "" -- Russian gerunds do not have a future tense
} ;
mkA2 a p c= a ** {c2 = {s=p; c=c}; lock_A2 = <>};
-- mkADeg a s = mkAdjDeg a s ** {lock_ADeg = <>}; -- defined in morpho.RusU