diff --git a/src/malay/NounMay.gf b/src/malay/NounMay.gf index a4f6556e..30c352b2 100644 --- a/src/malay/NounMay.gf +++ b/src/malay/NounMay.gf @@ -132,9 +132,9 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in { -- : N2 -> NP -> CN ; ComplN2 n2 np = useN n2 ** { s = \\nf => - case of { - - => n2.s ! NF num (Poss p) ++ np.empty ; + case of { + + => n2.s ! NF num (Poss p) ++ np.empty ; -- DirObj is reused here to mean possession _ => n2.s ! nf ++ applyPrep n2.c2 np } } ; diff --git a/src/malay/ParamMay.gf b/src/malay/ParamMay.gf index 6f60b52e..6d47d18c 100644 --- a/src/malay/ParamMay.gf +++ b/src/malay/ParamMay.gf @@ -1,3 +1,4 @@ + resource ParamMay = ParamX ** open Prelude in { -------------------------------------------------------------------------------- @@ -119,6 +120,8 @@ param -------------------------------------------------------------------------------- -- Prepositions +param + PrepType = DirObj | EmptyPrep | OtherPrep ; -------------------------------------------------------------------------------- -- Verbs diff --git a/src/malay/RelativeMay.gf b/src/malay/RelativeMay.gf index 5dbf128a..d9cc71a0 100644 --- a/src/malay/RelativeMay.gf +++ b/src/malay/RelativeMay.gf @@ -17,10 +17,13 @@ lin subj = rp.s -- yang ++ cls.subj ; -- saya pred = \\per,pol => - cls.pred ! Root ! pol -- ikut sama - ++ case cls.c2.isPoss of { - True => [] ; - False => cls.c2.obj ! per} -- dengan+nya (depends on the head, not known yet) + let object : Str = case cls.c2.prepType of { + OtherPrep + => cls.c2.obj ! per ; -- depends on the head, not known yet + _ => [] -- if the preposition is dir.obj or empty, no obj. pronoun + } ; + in cls.pred ! Root ! pol -- ikut sama + ++ object -- dengan+nya } ; -- : RP ; diff --git a/src/malay/ResMay.gf b/src/malay/ResMay.gf index 75d8064f..0ee2a6e0 100644 --- a/src/malay/ResMay.gf +++ b/src/malay/ResMay.gf @@ -105,13 +105,13 @@ oper Preposition : Type = { s : Str ; -- dengan obj : Person => Str ; -- dengan+nya -- needed in relative clauses to refer to the object - isPoss : Bool ; -- TODO rename, the name is confusing + prepType : PrepType ; -- TODO rename, the name is confusing } ; mkPrep : Str -> Preposition = \dengan -> { s = dengan ; obj = \\p => dengan + poss2str (Poss p) ; - isPoss = False ; + prepType = OtherPrep ; } ; -- direct object: "hits him" -> "memukul+nya" @@ -121,22 +121,22 @@ oper P1 => BIND ++ "ku" ; P2 => BIND ++ "mu" ; P3 => BIND ++ "nya" } ; - isPoss = True ; + prepType = DirObj ; } ; -- truly empty emptyPrep : Preposition = { s = [] ; obj = \\_ => [] ; - isPoss = True ; + prepType = EmptyPrep ; } ; datPrep : Preposition = mkPrep "kepada" ; applyPrep : Preposition -> NounPhrase -> Str = \prep,np -> - case np.a of { - IsPron p => prep.obj ! p ++ np.empty ; - NotPron => prep.s ++ np.s ! Bare + case of { + => prep.obj ! p ++ np.empty ; + _ => prep.s ++ np.s ! Bare } ; --------------------------------------------------------------------------------