From 70cbbe689dbbb0e6fae98324ecb4a03e865478a8 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 29 May 2023 19:30:40 +0200 Subject: [PATCH] (Kor) Use obj in imp, overriding V2's subject case --- src/korean/ParamKor.gf | 3 +++ src/korean/RelativeKor.gf | 2 +- src/korean/ResKor.gf | 22 +++++++++++++--------- src/korean/SentenceKor.gf | 2 +- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/korean/ParamKor.gf b/src/korean/ParamKor.gf index 52dd00f2c..647fbffc6 100644 --- a/src/korean/ParamKor.gf +++ b/src/korean/ParamKor.gf @@ -108,6 +108,9 @@ param | Imperative | Propositive ; + ObjectForm = -- sometimes need to override V2's object case for Imp + DeclObj + | ImpObj ; -- TODO: include Aspect and SentenceType. -- These are all Generic and Declarative. diff --git a/src/korean/RelativeKor.gf b/src/korean/RelativeKor.gf index 92e37fcba..a16b997d9 100644 --- a/src/korean/RelativeKor.gf +++ b/src/korean/RelativeKor.gf @@ -8,7 +8,7 @@ lin -- : RP -> VP -> RCl ; RelVP rp vp = vp ** { -- TODO no tenses yet in the grammar s = \\t,a,p,cltyp => - rp.s ++ vp.adv ++ vp.nObj ++ + rp.s ++ vp.adv ++ vp.nObj ! DeclObj ++ case cltyp of { WithConj => vp.s ! VStem p ; _ => vp.s ! VAttr p } ; diff --git a/src/korean/ResKor.gf b/src/korean/ResKor.gf index fbf4c2272..bb062c068 100644 --- a/src/korean/ResKor.gf +++ b/src/korean/ResKor.gf @@ -320,17 +320,14 @@ oper BaseVP : Type = { adv, - nObj, - vComp : Str - -- {subjunc : Str ; -- inflected verb complement - -- inf : Str ; -- infinitive verb complement - -- subcl : Str} -- clause complement + vComp : Str ; + nObj : ObjectForm => Str ; -- may need diff form for imperative vs. declarative sentences } ; baseVP : BaseVP = { adv, - nObj, vComp = [] ; + nObj = \\_ => [] } ; VerbPhrase : Type = BaseVerb ** Complement ** BaseVP ; @@ -342,7 +339,9 @@ oper useVc : Verb2 -> VPSlash = \v2 -> baseVP ** v2 ; insertComp : VPSlash -> NounPhrase -> VerbPhrase = \v2,np -> useV v2 ** { - nObj = np.s ! v2.c2 ++ v2.p2.s ! np.p + nObj = table { + DeclObj => np.s ! v2.c2 ++ v2.p2.s ! np.p ; + ImpObj => np.s ! Object ++ v2.p2.s ! np.p } -- use 을/를 always for imperative } ; insertAdv : VerbPhrase -> SS -> VerbPhrase = \vp,adv -> vp ** {adv = adv.s ++ vp.adv} ; @@ -378,7 +377,7 @@ oper WithConj => VStem p ; Statement st => VF st p } -- TODO: more tenses in np - ++ vp.nObj -- an object, not copula complement + ++ vp.nObj ! DeclObj -- an object, not copula complement ++ vp.adv ++ vp.s ! vf } ; @@ -387,6 +386,11 @@ oper -- linrefs linVerb : Verb -> Str = \v -> v.s ! linVF ; -linVP : VForm -> VerbPhrase -> Str = \vf,vp -> vp.nObj ++ vp.adv ++ vp.s ! vf ; +linVP : VForm -> VerbPhrase -> Str = \vf,vp -> vp.nObj ! DeclObj ++ vp.adv ++ vp.s ! vf ; +linImp : Polarity -> VerbPhrase -> Str = \pol,vp -> + let vf : VForm = case pol of { + Pos => VF Polite Pos ; + Neg => VImpNeg } + in vp.nObj ! ImpObj ++ vp.adv ++ vp.s ! vf ; linAP : AdjPhrase -> Str = \ap -> ap.compar ++ ap.s ! linVF ; } diff --git a/src/korean/SentenceKor.gf b/src/korean/SentenceKor.gf index 3afe8a3a8..daa6c0589 100644 --- a/src/korean/SentenceKor.gf +++ b/src/korean/SentenceKor.gf @@ -32,7 +32,7 @@ lin -} --2 Imperatives -- : VP -> Imp ; - ImpVP vp = {s = \\pol => linVP (VF Polite pol) vp} ; + ImpVP vp = {s = \\pol => linImp pol vp} ; --2 Embedded sentences