From e689b1cc5aae5fb153658773093bcfda5ffe7314 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 3 Apr 2020 11:57:47 +0200 Subject: [PATCH] (Kor) Add new constructor for V2, export CaseParticle in Paradigms --- src/korean/LexiconKor.gf | 2 +- src/korean/ParadigmsKor.gf | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/korean/LexiconKor.gf b/src/korean/LexiconKor.gf index 185dc31c0..d4d047f3b 100644 --- a/src/korean/LexiconKor.gf +++ b/src/korean/LexiconKor.gf @@ -209,7 +209,7 @@ lin laugh_V = mkV "웃다" ; -- lin leave_V2 = mkV2 "" ; -- lin leg_N = mkN "" ; -- lin lie_V = mkV "" ; --- lin like_V2 = mkV2 "" ; +lin like_V2 = mkV2 (mkV "좋다") topic subject ; -- lin listen_V2 = mkV2 "" ; -- lin live_V = mkV ""; -- lin liver_N = mkN "" ; diff --git a/src/korean/ParadigmsKor.gf b/src/korean/ParadigmsKor.gf index a8e1d6d73..73746fb41 100644 --- a/src/korean/ParadigmsKor.gf +++ b/src/korean/ParadigmsKor.gf @@ -4,11 +4,16 @@ oper --2 Parameters -- --- To abstract over number, valency and (some) case names, +-- To abstract over number, valency and (some) CaseParticle names, -- we define the following identifiers. The application programmer -- should always use these constants instead of the constructors -- defined in $ResKor$. + CaseParticle : Type ; -- Arguments to give to V2, V3 + topic : CaseParticle ; -- 은 or 는 + subject : CaseParticle ; -- 이 or 가 + object : CaseParticle ; -- 을 or 를 + noCase : CaseParticle ; -- No case particle --2 Nouns @@ -36,8 +41,9 @@ oper copula : V ; -- The copula verb '' mkV2 : overload { - mkV2 : (plain : Str) -> V2 ; -- Regular verb. Takes plain, uninflected -다 form, object particle is 를. - mkV2 : V -> V2 ; -- Takes preconstructed V, object particle is 를. + mkV2 : (plain : Str) -> V2 ; -- Regular verb. Takes plain, uninflected -다 form, subject particle is 가/이 and object particle is 를/을. + mkV2 : V -> V2 ; -- Takes preconstructed V, subject particle is 가/이 and object particle is 를/을. + mkV2 : V -> (subj,obj : CaseParticle) -> V2 ; -- Takes preconstructed V, and subject and object particles. E.g. `mkV2 좋다_V topic subject` for "as for 는, 가 is good". } ; -- mkV3 : overload { @@ -91,6 +97,12 @@ oper -- The definitions should not bother the user of the API. So they are -- hidden from the document. + CaseParticle : Type = ResKor.NForm ; + topic = Topic ; + subject = Subject ; + object = Object ; + noCase = Bare ; + mkN = overload { mkN : Str -> N = \s -> lin N (mkNoun s) ; } ; @@ -124,6 +136,8 @@ oper mkV2 = overload { mkV2 : (plain : Str) -> V2 = \v2 -> lin V2 (mkVerb2 v2) ; mkV2 : V -> V2 = vtov2 ; + mkV2 : V -> (subj,obj : CaseParticle) -> V2 = \v,sc,c2 -> + vtov2 v ** {sc = sc ; c2 = c2} ; } ; mkV3 = overload {