From 4a56f8e3fdec4044a7133d445d65758d05d848c8 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 24 Feb 2023 15:26:03 +0800 Subject: [PATCH 1/3] (Chi) Add ComplVPIVV, GerundNP and GerundAdv --- src/chinese/ExtendChi.gf | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/chinese/ExtendChi.gf b/src/chinese/ExtendChi.gf index 36255bff..dfcabd29 100644 --- a/src/chinese/ExtendChi.gf +++ b/src/chinese/ExtendChi.gf @@ -5,12 +5,13 @@ concrete ExtendChi of Extend = CatChi ** VPS, ListVPS, VPI, ListVPI , MkVPS, BaseVPS, ConsVPS, ConjVPS , PredVPS, SQuestVPS, RelVPS --, QuestVPS -- TODO - , MkVPI, BaseVPI, ConsVPI, ConjVPI --, ComplVPIVV -- TODO + , MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV , VPS2, ListVPS2, VPI2, ListVPI2 , MkVPS2, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, ReflVPS2 , MkVPI2, BaseVPI2, ConsVPI2, ConjVPI2, ComplVPI2 , ProDrop, ComplDirectVS, ComplDirectVQ - , PassVPSlash, PassAgentVPSlash ] + , PassVPSlash, PassAgentVPSlash + , GerundAdv, GerundNP ] with (Grammar=GrammarChi) ** open Prelude , Coordination @@ -60,6 +61,12 @@ concrete ExtendChi of Extend = CatChi ** BaseVPI2 v w = twoSS v w ** w ; ConsVPI2 v vs = consrSS duncomma v vs ** vs ; + ComplVPIVV vv vpi = predV vv [] ** { + compl = vpi.s ; + } ; + + GerundAdv vp = mkAdv (infVP vp) ; + GerundNP vp = ResChi.mkNP (infVP vp) ; GenNP np = {s,pl = np.s ++ possessive_s ; detType = DTPoss} ; GenRP nu cn = {s = \\_ => cn.s ++ relative_s} ; From 2fcd5bd3aedced32bb06520b0c3b3cbcb0b20c17 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 24 Feb 2023 15:26:57 +0800 Subject: [PATCH 2/3] (Chi) compile ExtendChi + use linref for VP --- src/chinese/AllChi.gf | 2 +- src/chinese/AllChiAbs.gf | 4 ++-- src/chinese/CatChi.gf | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/chinese/AllChi.gf b/src/chinese/AllChi.gf index 39a54866..4da6f54a 100644 --- a/src/chinese/AllChi.gf +++ b/src/chinese/AllChi.gf @@ -1,3 +1,3 @@ --# -path=.:../abstract:../common:../api:../prelude -concrete AllChi of AllChiAbs = LangChi, ExtraChi ; +concrete AllChi of AllChiAbs = LangChi, ExtendChi ; diff --git a/src/chinese/AllChiAbs.gf b/src/chinese/AllChiAbs.gf index 6a1a8733..eb721b70 100644 --- a/src/chinese/AllChiAbs.gf +++ b/src/chinese/AllChiAbs.gf @@ -1,5 +1,5 @@ --# -path=.:../abstract:../common:prelude -abstract AllChiAbs = +abstract AllChiAbs = Lang, - ExtraChiAbs ; + Extend ; diff --git a/src/chinese/CatChi.gf b/src/chinese/CatChi.gf index 15398e15..ff996643 100644 --- a/src/chinese/CatChi.gf +++ b/src/chinese/CatChi.gf @@ -90,4 +90,5 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelu linref S = linS ; Prep = linPrep ; + VP = infVP ; } From b462d7893fd7b7d8893fdd6db3eac7b2016c3366 Mon Sep 17 00:00:00 2001 From: Meowyam Date: Wed, 1 Mar 2023 15:06:25 +0800 Subject: [PATCH 3/3] changes to mkA2, mkV and insertObj in malay rgl added --- src/malay/ParadigmsMay.gf | 3 ++- src/malay/ResMay.gf | 2 +- src/malay/SentenceMay.gf | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/malay/ParadigmsMay.gf b/src/malay/ParadigmsMay.gf index 2b209442..dd22ff33 100644 --- a/src/malay/ParadigmsMay.gf +++ b/src/malay/ParadigmsMay.gf @@ -136,11 +136,12 @@ oper mkA2 : (adj : Str) -> A2 = \s -> lin A2 ((mkAdj s) ** {c2 = emptyPrep}) ; mkA2 : A -> A2 = \a -> lin A2 (a ** {c2 = emptyPrep}) ; mkA2 : A -> Prep -> A2 = \a,p -> lin A2 (a ** {c2 = p}) ; + mkA2 : (adj : Str) -> Prep -> A2 = \a,p -> lin A2 ((mkAdj a) ** {c2 = p}) ; } ; mkV = overload { mkV : Str -> V = \v -> lin V (regVerb v Ber) ; - mkV : Str -> Prefix -> V = \v,p -> lin V (regVerb v p) + mkV : Str -> Prefix -> V = \v,p -> lin V (regVerb v p) ; } ; prefixV : V -> V = \v -> v ** { diff --git a/src/malay/ResMay.gf b/src/malay/ResMay.gf index 2645b437..f974f1e7 100644 --- a/src/malay/ResMay.gf +++ b/src/malay/ResMay.gf @@ -257,7 +257,7 @@ oper -- insertObjc : (Agr => Str) -> SlashVP -> SlashVP = \obj,vp -> -- insertObj obj vp ** {c2 = vp.c2 ; gapInMiddle = vp.gapInMiddle ; missingAdv = vp.missingAdv } ; insertObj : Str -> VerbPhrase -> VerbPhrase = \str,vp -> vp ** { - s = \\vf,pol => vp.s ! Active ! Pos ++ str ; + s = \\vf,pol => str ++ vp.s ! Active ! Pos ; } ; insertComp : AdjPhrase -> VerbPhrase -> VerbPhrase = \ap,vp -> vp ** { diff --git a/src/malay/SentenceMay.gf b/src/malay/SentenceMay.gf index ddda0769..d09387f9 100644 --- a/src/malay/SentenceMay.gf +++ b/src/malay/SentenceMay.gf @@ -95,7 +95,7 @@ lin oper advS : (comma : Str) -> Adverb -> S -> S = \comma,a,sent -> sent ** { - s = a.s ++ comma ++ sent.s + s = sent.s ++ comma ++ a.s } ; }