From 69356d8c9b47712a4b370b969e796c3784459935 Mon Sep 17 00:00:00 2001 From: Meowyam Date: Tue, 21 Mar 2023 16:27:05 +0800 Subject: [PATCH] add PassAgentVPSlash to May --- src/malay/AdverbMay.gf | 4 ++++ src/malay/ExtendMay.gf | 14 ++++++++++++++ src/malay/LexiconMay.gf | 2 +- src/malay/ParadigmsMay.gf | 6 ++++-- src/malay/StructuralMay.gf | 2 +- src/malay/VerbMay.gf | 25 ++++++++++++++++--------- src/malay/unittest/questions.gftest | 9 ++++++++- 7 files changed, 48 insertions(+), 14 deletions(-) diff --git a/src/malay/AdverbMay.gf b/src/malay/AdverbMay.gf index d7b65fd70..15465cab1 100644 --- a/src/malay/AdverbMay.gf +++ b/src/malay/AdverbMay.gf @@ -20,9 +20,13 @@ lin --AdAdv : AdA -> Adv -> Adv ; -- very quickly -- AdAdv ada adv = adv ** -- Like adverbs, adadjectives can be produced by adjectives. + AdAdv ada adv = adv ** { + s = ada.s ++ adv.s ; + } ; -- : A -> AdA ; -- extremely -- PositAdAAdj a = { } ; + -- PositAdAAdj a = {s = a.s} ; -- Subordinate clauses can function as adverbs. diff --git a/src/malay/ExtendMay.gf b/src/malay/ExtendMay.gf index 85fec8244..60806f363 100644 --- a/src/malay/ExtendMay.gf +++ b/src/malay/ExtendMay.gf @@ -8,6 +8,7 @@ concrete ExtendMay of Extend = CatMay , ListVPI -- infinitive VP's (TODO: with anteriority and polarity) , MkVPS , PredVPS, RelVPS, QuestVPS, SQuestVPS + , PassVPSlash, PassAgentVPSlash -- excluded because RGL funs needed for them not implemented yet , PredAPVP @@ -78,6 +79,7 @@ concrete ExtendMay of Extend = CatMay PastPartAP vp = { s = linVP vp } ; + -- GenModNP : Num -> NP -> CN -> NP ; -- this man's car(s) GenModNP n np cn = variants {}; @@ -98,6 +100,18 @@ concrete ExtendMay of Extend = CatMay GerundAdv vp = ss (linVP vp) ; + -- PassVPSlash : VPS -> VP ; + -- be forced to sleep + PassVPSlash vps = vps ** { + s = \\vf,pol => vps.s ! Passive ! pol ; + }; + + -- PassAgentVPSlash : VPSlash -> NP -> VP ; -- be begged by her to go + PassAgentVPSlash vps np = { + s = \\vf,pol => vps.s ! Passive ! pol ++ (applyPrep by8agent_Prep np) ; + }; + + -- MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved -- ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates -- ComplVPS2 : VPS2 -> NP -> VPS ; -- has loved and now hates that person diff --git a/src/malay/LexiconMay.gf b/src/malay/LexiconMay.gf index effc63b48..2e832dd4b 100644 --- a/src/malay/LexiconMay.gf +++ b/src/malay/LexiconMay.gf @@ -27,7 +27,7 @@ lin bank_N = mkN "bank" ; lin beautiful_A = mkA "cantik" ; -- lin become_VA = mkVA "jadi" ; lin beer_N = mkN "bir" ; --- lin beg_V2V = mkV2 "" ; +lin beg_V2V = mkV2 "seru" ; -- lin belly_N = mkN "" ; lin big_A = mkA "besar" ; lin bike_N = mkN "basikal" ; diff --git a/src/malay/ParadigmsMay.gf b/src/malay/ParadigmsMay.gf index dd22ff332..58aa653ed 100644 --- a/src/malay/ParadigmsMay.gf +++ b/src/malay/ParadigmsMay.gf @@ -79,8 +79,10 @@ oper -- -- mkV2A : Str -> V2A -- = \s -> lin V2A (regV s ** {c2 = noPrep}) ; - -- mkV2Q : Str -> V2Q - -- = \s -> lin V2Q (regV s ** {c2 = noPrep}) ; + mkV2Q : overload { + mkV2Q : Str -> V2Q ; + mkV2Q : V -> Prep -> V2Q ; + } ; ----- diff --git a/src/malay/StructuralMay.gf b/src/malay/StructuralMay.gf index 9dea37153..a5b058d59 100644 --- a/src/malay/StructuralMay.gf +++ b/src/malay/StructuralMay.gf @@ -104,7 +104,7 @@ lin by8agent_Prep = mkPrep "oleh" ; -- for pronoun agent, see Mintz p. 170, 5.4. lin by8means_Prep = mkPrep "dengan" ; -- lin during_Prep = mkPrep ; -- lin except_Prep = mkPrep ; --- lin for_Prep = mkPrep ; +lin for_Prep = mkPrep "untuk" ; -- lin from_Prep = mkPrep "" ; -- lin in8front_Prep = mkPrep "" ; lin in_Prep = mkPrep "di" ; diff --git a/src/malay/VerbMay.gf b/src/malay/VerbMay.gf index 64b6ccbb4..1f77440ab 100644 --- a/src/malay/VerbMay.gf +++ b/src/malay/VerbMay.gf @@ -1,4 +1,4 @@ -concrete VerbMay of Verb = CatMay ** open ResMay, AdverbMay, Prelude in { +concrete VerbMay of Verb = CatMay ** open ResMay, AdverbMay, StructuralMay, Prelude in { lin @@ -72,11 +72,11 @@ lin } ; -- : V2V -> VP -> VPSlash ; -- beg (her) to go - SlashV2V v2 vp = vp ** useV { - s = \\vf => v2.s ! vf ++ (linVP vp); + SlashV2V v2 vp = useV { + s = \\vf => v2.s ! vf ++ for_Prep.s ++ vp.s ! Root ! Pos; } ** { c2 = v2.c2; - adjCompl = [] ; + adjCompl = []; } ; @@ -86,6 +86,11 @@ lin adjCompl = "yang" ++ s.s ; -- TODO check /Inari } ; + -- : V2Q -> QS -> VPSlash ; -- ask (him) who came + -- SlashV2Q v2q qs = useV v2q ** { + -- s = + -- }; + {- -- : V2S -> S -> VPSlash ; -- answer (to him) that it is good @@ -102,12 +107,9 @@ lin -- : VPSlash -> NP -> VP ComplSlash vps np = vps ** { s = \\vf,pol => - vps.s ! vf ! pol - ++ applyPrep vps.c2 np ++ vps.adjCompl - -- s = \\vf,pol => vps.s ! vf ! pol ++ applyPrep vps.c2 np + vps.s ! vf ! pol ++ vps.adjCompl ++ applyPrep vps.c2 np } ; - -- : VV -> VPSlash -> VPSlash ; SlashVV vv vps = ComplVV vv vps ** { c2 = vps.c2 ; -- like ComplVV except missing object @@ -141,7 +143,12 @@ lin AdVVPSlash adv vps = vps ** { adv = adv.s ++ vps.adv } ; -} -- : VP -> Prep -> VPSlash ; -- live in (it) - -- VPSlashPrep vp prep = vp ** {c2 = prep} ; + VPSlashPrep vp prep = vp ** { + s = \\vf,pol => vp.s ! vf ! pol ; + } ** { + c2 = prep ; + adjCompl =[] ; + } ; --2 Complements to copula diff --git a/src/malay/unittest/questions.gftest b/src/malay/unittest/questions.gftest index 76c478363..8c45c2d55 100644 --- a/src/malay/unittest/questions.gftest +++ b/src/malay/unittest/questions.gftest @@ -70,4 +70,11 @@ LangMay: mengapa dia makan daging Lang: UseQCl (TTAnt TPast ASimul) PPos (QuestVP whatSg_IP (UseComp (CompNP (DetCN (DetQuant DefArt NumSg) (RelCN (UseN meat_N) (UseRCl (TTAnt TPast ASimul) PPos (RelVP IdRP (PassV2 eat_V2)))))))) LangEng: what was the meat that was eaten -LangMay: apa daging yang dimakan \ No newline at end of file +LangMay: apa daging yang dimakan + +AllEngAbs: (PastPartAP (VPSlashPrep (ComplSlash (SlashV2V beg_V2V (UseV go_V)) (UsePron i_Pron)) by8agent_Prep)) +AllEng: begged by me to go +AllMay: diseru aku untuk pergi + +AllEngAbs: l (PassAgentVPSlash (SlashV2V beg_V2V (UseV go_V)) (UsePron i_Pron)) +AllEng: be begged to go by me \ No newline at end of file