diff --git a/src/malay/CatMay.gf b/src/malay/CatMay.gf index 9b61bebb..08579abb 100644 --- a/src/malay/CatMay.gf +++ b/src/malay/CatMay.gf @@ -9,7 +9,7 @@ concrete CatMay of Cat = CommonX ** open ResMay, Prelude in { S = ResMay.Sentence ; QS = SS ; - RS = ResMay.RClause ; + RS = ResMay.RS ; -- relative sentence. Tense and polarity fixed, -- but agreement may depend on the CN/NP it modifies. diff --git a/src/malay/NounMay.gf b/src/malay/NounMay.gf index f684da46..d80d1198 100644 --- a/src/malay/NounMay.gf +++ b/src/malay/NounMay.gf @@ -39,7 +39,7 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in { -- : NP -> RS -> NP ; -- Paris, which is here RelNP np rs = np ** { - s = np.s ++ rs.subj ++ rs.pred ! np.p + s = np.s ++ rs.s ! np.p } ; -- Determiners can form noun phrases directly. @@ -147,7 +147,7 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in { -- : CN -> RS -> CN ; RelCN cn rs = cn ** { - s = \\nf => cn.s ! nf ++ rs.subj ++ rs.pred ! P3 + s = \\nf => cn.s ! nf ++ rs.s ! P3 } ; {- diff --git a/src/malay/RelativeMay.gf b/src/malay/RelativeMay.gf index 80aff1b2..b6657f5c 100644 --- a/src/malay/RelativeMay.gf +++ b/src/malay/RelativeMay.gf @@ -9,7 +9,7 @@ lin -- : RP -> VP -> RCl ; RelVP rp vp = { subj = rp.s ; - pred = \\_ => vp.s ! Root ; -- TODO + pred = \\_ => vp.s ! Root ; } ; -- : RP -> ClSlash -> RCl ; -- who I went with @@ -17,7 +17,7 @@ lin subj = rp.s -- yang ++ cls.subj ; -- saya pred = - \\p => cls.pred -- ikut sama + \\p => cls.pred ! Root -- ikut sama ++ cls.c2.obj ! p -- dengan+nya (depends on the head, not known yet) } ; diff --git a/src/malay/ResMay.gf b/src/malay/ResMay.gf index 0b9e0fb1..bc2fcebd 100644 --- a/src/malay/ResMay.gf +++ b/src/malay/ResMay.gf @@ -154,11 +154,17 @@ oper -------------------------------------------------------------------------------- -- Cl, S - Clause : Type = {subj, pred : Str} ; + Clause : Type = { + subj : Str ; + pred : VForm => Str -- Cl may become relative clause, need to keep open + } ; RClause : Type = { subj : Str ; - pred : Person => Str} ; + pred : Person => Str + } ; + + RS : Type = {s : Person => Str} ; ClSlash : Type = Clause ** {c2 : Preposition} ; @@ -166,7 +172,7 @@ oper predVP : NounPhrase -> VerbPhrase -> Clause = \np,vp -> { subj = np.s ; - pred = vp.s ! Active ; -- TODO + pred = vp.s } ; predVPSlash : NounPhrase -> VPSlash -> ClSlash = \np,vps -> diff --git a/src/malay/SentenceMay.gf b/src/malay/SentenceMay.gf index de58e7aa..82771743 100644 --- a/src/malay/SentenceMay.gf +++ b/src/malay/SentenceMay.gf @@ -51,17 +51,17 @@ lin -- : Temp -> Pol -> Cl -> S ; UseCl t p cl = { - s = cl.subj ++ t.s ++ p.s ++ cl.pred ; + s = cl.subj ++ t.s ++ p.s ++ cl.pred ! Active ; } ; -- : Temp -> Pol -> QCl -> QS ; UseQCl t p cl = { - s = cl.subj ++ t.s ++ p.s ++ cl.pred ; + s = cl.subj ++ t.s ++ p.s ++ cl.pred ! Active ; } ; -- : Temp -> Pol -> RCl -> RS ; - UseRCl t p cl = cl ** { - pred = \\per => t.s ++ p.s ++ cl.pred ! per ; + UseRCl t p cl = { + s = \\per => cl.subj ++ t.s ++ p.s ++ cl.pred ! per ; } ; -- AdvS : Adv -> S -> S ; -- then I will go home diff --git a/src/malay/unittest/relative.gftest b/src/malay/unittest/relative.gftest index b7ab1ff2..89557570 100644 --- a/src/malay/unittest/relative.gftest +++ b/src/malay/unittest/relative.gftest @@ -6,6 +6,10 @@ Lang: DetCN (DetQuant IndefArt NumSg) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres A LangEng: a cat that drinks milk LangMay: kucing yang minum susu +Lang: MassNP (RelCN (UseN milk_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (SlashV2a drink_V2))))) +LangEng: milk that the cat drinks +LangMay: susu yang kucing minum + Lang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashPrep (PredVP (DetCN (DetQuant DefArt NumSg) (UseN dog_N)) (UseV walk_V)) with_Prep)))) LangEng: the cat that the dog walks with -LangMay: kucing yang anjing berjalan dengannya \ No newline at end of file +LangMay: kucing yang anjing jalan dengannya \ No newline at end of file