1
0
forked from GitHub/gf-rgl

(Som) WIP: Passive.

This commit is contained in:
Inari Listenmaa
2019-06-10 15:57:23 +02:00
parent 8c6be2e7b2
commit 7a545c25f1
6 changed files with 56 additions and 30 deletions
+24 -9
View File
@@ -140,6 +140,11 @@ oper
isPron = False
} ;
impersNP : NounPhrase = emptyNP ** {
a = Impers ;
isPron = True
} ;
--------------------------------------------------------------------------------
-- Pronouns
@@ -244,7 +249,9 @@ oper
ka => mkPrep "ka" "iga" "kaa" "naga" "idinka" "laga" ;
la => mkPrep "la" "ila" "kula" "nala" "idinla" "lala" ;
u => mkPrep "u" "ii" "kuu" "noo" "idiin" "loo" ;
noPrep => mkPrep [] "i" "ku" "na" "idin" "la"
noPrep => mkPrep [] "i" "ku" "na" "idin" "la" ;
-- impersonal subject clitic combining with object clitics. TODO find out the rest of the forms.
passive => mkPrep [] "la <1sg.obj>" "lagu" "la <1pl.obj>" "la <2pl.obj>" "la"
} ;
prepCombTable : Agreement => PrepCombination => Str = table {
@@ -531,7 +538,7 @@ oper
} ;
VerbPhrase : Type = Verb ** Complement ** {
isPred : Bool ; -- to choose right sentence type marker
isPred : Bool ; -- to choose right sentence type marker
adv : Str ;
c2, c3 : Preposition ; -- can combine together and with object pronoun(s?)
obj2 : {s : Str ; a : AgreementPlus} ;
@@ -584,21 +591,27 @@ oper
-- If the old object is 3rd person, we can safely replace its agreement.
-- We keep both old and new string (=noun, if there was one) in obj2.s.
NotPronP3|IsPron (Sg3 _|Pl3) =>
NotPronP3|IsPron (Sg3 _|Pl3|Impers) =>
vp ** {obj2 = {
s = vp.obj2.s ++ noun ;
a = agr2agrplus np.isPron np.a} ; --
} ; -- no secObj, because there's ≤1 non-3rd-person pronoun.
-- If old object was non-3rd person, we keep its agreement.
_ => vp ** {
obj2 = vp.obj2 ** {
s = vp.obj2.s ++ noun
} ;
secObj = vp.secObj ++ secondObject ! np.a}
_ =>
vp ** {obj2 = vp.obj2 ** {
s = vp.obj2.s ++ noun
} ;
secObj = vp.secObj ++ secondObject ! np.a}
} ;
passV2 : Verb2 -> VerbPhrase = \v2 -> useVc v2 ** {
--s = forceAgr Impers v2.s ;
c2 = passive ;
c3 = v2.c2 ;
} ;
insertAdv : Adverb -> VerbPhrase -> VerbPhrase = \adv,vp ->
case adv.c2 of {
noPrep => vp ** {adv = adv.s} ; -- The adverb is not formed with PrepNP
@@ -648,9 +661,11 @@ oper
in stm ++ subjpron ! a ;
subjpron : Agreement => Str = table {
Sg1|Pl1 _ => "aan" ;
Sg1|Pl1 Excl => "aan" ;
Pl1 Incl => "aynu" ;
Sg2|Pl2 => "aad" ;
Sg3 Masc => "uu" ;
Impers => [] ;
_ => "ay" } ;
--------------------------------------------------------------------------------