From 3e79ab25e1d6b0198af2aae0b20913838bf66311 Mon Sep 17 00:00:00 2001 From: Meowyam Date: Wed, 11 May 2022 14:56:01 +0800 Subject: [PATCH] add VPS and VPI to ExtendMay --- src/malay/ExtendMay.gf | 62 ++++++++++++++++++++++++++++++++++++++++-- src/malay/PhraseMay.gf | 2 +- src/malay/ResMay.gf | 2 ++ 3 files changed, 62 insertions(+), 4 deletions(-) diff --git a/src/malay/ExtendMay.gf b/src/malay/ExtendMay.gf index 232940d9..9b46b1c9 100644 --- a/src/malay/ExtendMay.gf +++ b/src/malay/ExtendMay.gf @@ -1,8 +1,64 @@ --# -path=.:../common:../abstract concrete ExtendMay of Extend = CatMay - -- ** ExtendFunctor - [] - -- with (Grammar=GrammarMay) - ** open Prelude, ResMay, NounMay in { + ** ExtendFunctor - [ + VPS -- finite VP's with tense and polarity + , ListVPS + , VPI + , ListVPI -- infinitive VP's (TODO: with anteriority and polarity) + , MkVPS + , PredVPS + + + + -- VPS2 ; -- have loved (binary version of VPS) + -- [VPS2] {2} ; -- has loved, hates" + -- VPI2 ; -- to love (binary version of VPI) + -- [VPI2] {2} ; -- to love, to hate + +] + with (Grammar=GrammarMay) + ** open Prelude, Coordination, ResMay, NounMay in { + lincat + VPS, VPI = SS ; + ListVPS, ListVPI = ListX ; + lin + -- MkVPS : Temp -> Pol -> VP -> VPS ; -- hasn't slept + MkVPS t p vp = { + s = t.s ++ p.s ++ vp.s ! Active ! p.p; + } ; + + -- BaseVPS : VPS -> VPS -> ListVPS ; + BaseVPS vps vps2 = twoSS vps vps2 ; + -- ConsVPS : VPS -> ListVPS -> ListVPS ; + ConsVPS str listvps vps = consSS "," listvps vps ; + -- ConjVPS : Conj -> [VPS] -> VPS ; -- has walked and won't sleep + ConjVPS conj listvps = conjunctX conj listvps ; + -- PredVPS : NP -> VPS -> S ; -- she [has walked and won't sleep] + PredVPS np vps = { + s = np.s ! Bare ++ vps.s ; + } ; + -- SQuestVPS : NP -> VPS -> QS ; -- has she walked + -- QuestVPS : IP -> VPS -> QS ; -- who has walked + -- RelVPS : RP -> VPS -> RS ; -- which won't sleep + + -- MkVPI : VP -> VPI ; -- to sleep (TODO: Ant and Pol) + MkVPI vp = {s = linVP vp} ; + + + -- BaseVPI : VPI -> VPI -> ListVPI ; + BaseVPI vpi vpi2 = twoSS vpi vpi2 ; + -- ConsVPI : VPI -> ListVPI -> ListVPI ; + ConsVPI str listvpi vpi = consSS "," listvpi vpi ; + + + -- 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 + -- ReflVPS2 : VPS2 -> RNP -> VPS ; -- have loved and now hate myself and my car + + -- MkVPI2 : VPSlash -> VPI2 ; -- to love + -- ConjVPI2 : Conj -> [VPI2] -> VPI2 ; -- to love and hate + -- ComplVPI2 : VPI2 -> NP -> VPI ; -- to love and hate that person } ; diff --git a/src/malay/PhraseMay.gf b/src/malay/PhraseMay.gf index 17c00326..a3a03204 100644 --- a/src/malay/PhraseMay.gf +++ b/src/malay/PhraseMay.gf @@ -10,7 +10,7 @@ concrete PhraseMay of Phrase = CatMay ** open Prelude, ResMay in { UttIP ip = {s = ip.sp ! NF Sg Bare} ; UttImpSg pol imp = { s = pol.s ++ imp.s ! Sg ! pol.p } ; UttImpPol pol imp = {s = pol.s ++ imp.s ! Sg ! pol.p} ; - UttVP vp = {s = vp.s ! Active ! Pos} ; + UttVP vp = {s = linVP vp} ; {- UttImpSg pol imp = UttImpPl pol imp = diff --git a/src/malay/ResMay.gf b/src/malay/ResMay.gf index d70c8f55..0a621724 100644 --- a/src/malay/ResMay.gf +++ b/src/malay/ResMay.gf @@ -276,6 +276,8 @@ oper s = \\vf,pol => nounneg pol ++ s ; } ; + linVP : VerbPhrase -> Str = \vp -> vp.s ! Active ! Pos; + -- https://www.reddit.com/r/indonesian/comments/gsizsv/when_to_use_tidak_bukan_jangan_belum/ verbneg : Polarity -> Str = \pol -> case pol of {