From b3e13c29af09c52429fb847234f4bec36a276204 Mon Sep 17 00:00:00 2001 From: Meowyam Date: Thu, 25 Jan 2024 18:47:00 +0800 Subject: [PATCH] correct order for Malay Slash3V3 --- src/malay/VerbMay.gf | 9 +++++++-- src/malay/unittest/complements.gftest | 5 +++-- src/malay/unittest/relative.gftest | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/malay/VerbMay.gf b/src/malay/VerbMay.gf index 48863c0e..4ab5da38 100644 --- a/src/malay/VerbMay.gf +++ b/src/malay/VerbMay.gf @@ -56,8 +56,13 @@ lin -- : V3 -> NP -> VPSlash ; -- give (it) to her Slash3V3 v3 iobj = useV { - s = \\vf => v3.s ! vf ++ applyPrep v3.c2 iobj ++ - applyPrep v3.c3 emptyNP ; + s = \\vf => v3.s ! vf ++ + case iobj.a of { + IsPron p => applyPrep v3.c2 emptyNP ++ applyPrep v3.c3 iobj ; + _ => applyPrep v3.c2 iobj ++ applyPrep v3.c3 emptyNP + } + -- ++ applyPrep v3.c2 iobj ++ + -- applyPrep v3.c3 emptyNP ; --iobj.s ! Bare -- applyPrep v3.c3 iobj -- TODO check if this works for all -- probably not } ** { c2 = v3.c2 ;-- Now the VPSlash is missing only the direct object diff --git a/src/malay/unittest/complements.gftest b/src/malay/unittest/complements.gftest index 152149c5..f5becfcb 100644 --- a/src/malay/unittest/complements.gftest +++ b/src/malay/unittest/complements.gftest @@ -2,8 +2,9 @@ Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ComplSlash (Slash2V3 give_V3 (MassNP (UseN cat_N))) (UsePron i_Pron)))) LangMay: dia memberi kucing kepadaku --- Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ComplSlash (Slash3V3 give_V3 (UsePron i_Pron)) (MassNP (UseN cat_N))))) --- LangMay: dia memberi aku kucing +Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ComplSlash (Slash3V3 give_V3 (UsePron i_Pron)) (MassNP (UseN cat_N))))) +LangMay: dia memberi aku kucing +-- dia memberi aku kepada kucing -- Sentence complements diff --git a/src/malay/unittest/relative.gftest b/src/malay/unittest/relative.gftest index be6748d6..552309cc 100644 --- a/src/malay/unittest/relative.gftest +++ b/src/malay/unittest/relative.gftest @@ -49,7 +49,7 @@ LangMay: bapanya memberi buku kepadanya -- 2. A book that her father gave her -- TODO: would it be better as "buku yang bapanya beri kepadanya"? (Or any other variation?) Lang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron she_Pron))) (Slash3V3 give_V3 (UsePron she_Pron)))))) -LangMay: buku yang bapanya memberi kepada dia +LangMay: buku yang bapanya memberi kepadanya -- The preposition "kepada" comes from the definition of give_V3 in LexiconMay.gf. -- If "buku yang bapanya beri kepadanya" is correct in general, but sometimes @@ -64,7 +64,7 @@ LangMay: buku yang bapanya memberi kepada dia -- I want to read the book that my father gave me -- TODO check: would "aku mahu baca buku yang bapaku beri kepadaku" be better? Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron i_Pron))) (Slash3V3 give_V3 (UsePron i_Pron))))))))) -LangMay: aku mahu membaca buku yang bapaku memberi kepada aku +LangMay: aku mahu membaca buku yang bapaku memberi kepadaku -- I want to read the book that my father read Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron i_Pron))) (SlashV2a read_V2))))))))