From 7b09a6cf8b18e87ce838cd6289bc10b0fc5d6775 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Wed, 1 Apr 2020 17:31:15 +0200 Subject: [PATCH] (Kor) Add new VForms, replace AForm with VForm (now identical) --- src/korean/ConjunctionKor.gf | 10 +++++----- src/korean/NounKor.gf | 2 +- src/korean/ParamKor.gf | Bin 2764 -> 2779 bytes src/korean/ResKor.gf | 30 +++++++++++++++++++----------- src/korean/VerbKor.gf | 2 +- 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/korean/ConjunctionKor.gf b/src/korean/ConjunctionKor.gf index ba0edcf6..c3eaad01 100644 --- a/src/korean/ConjunctionKor.gf +++ b/src/korean/ConjunctionKor.gf @@ -69,10 +69,10 @@ lin oper mkFirstS : ResKor.Sentence -> ConjType => Str = \s -> - \\conj => glue (s.s ! Subord) (conjTable ! NStar ! conj) ; + \\conj => glue (s.s ! WithConj) (conjTable ! NStar ! conj) ; lincat - [AP] = ResKor.AdjPhrase ** {firstAP : AForm => ConjType => Str} ; + [AP] = ResKor.AdjPhrase ** {firstAP : VForm => ConjType => Str} ; lin BaseAP a1 a2 = a2 ** { @@ -90,10 +90,10 @@ lin oper - mkFirstAP : ResKor.AdjPhrase -> AForm => ConjType => Str = \ap -> + mkFirstAP : ResKor.AdjPhrase -> VForm => ConjType => Str = \ap -> \\af,conj => case af of { - AAttr => glue (ap.s ! AAttr) (conjTable ! NStar ! conj) ; - APred _ => glue (ap.s ! APred VStem) (conjTable ! VStar ! conj) } ; + VAttr p => glue (ap.s ! VAttr p) (conjTable ! NStar ! conj) ; + _ => glue (ap.s ! VStem) (conjTable ! VStar ! conj) } ; {- lincat diff --git a/src/korean/NounKor.gf b/src/korean/NounKor.gf index d2a3860c..6ff30cb4 100644 --- a/src/korean/NounKor.gf +++ b/src/korean/NounKor.gf @@ -155,7 +155,7 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in { -- Use3N3 n3 = lin N2 n3 ; -- : AP -> CN -> CN AdjCN ap cn = cn ** { - s = \\nf => ap.s ! AAttr ++ cn.s ! nf + s = \\nf => ap.s ! VAttr Pos ++ cn.s ! nf } ; -- : CN -> RS -> CN ; diff --git a/src/korean/ParamKor.gf b/src/korean/ParamKor.gf index d37f35f8fa24923b7901221c07d032871ab33c4e..1b2a715db18a8cf765565e5416dd7723151b3fe0 100644 GIT binary patch delta 88 zcmX>jdRuhE64uEdnL{^gvTbHocPuF>QV7V;Ni51NsZ`L_RY=P(QYbD>$}dXE%u6gu pRY=ZBEGH5XSc7XZhxA3Fd5 delta 79 zcmcaDdPa1^5?0-U#G=GpE(HZgxBQ}91zRo!FmQA%DJcT8YZM# Str} ; + Adjective : Type = {s : VForm => Str} ; -- Adjectives are verbs Adjective2 : Type = Adjective ; mkAdj : Str -> Adjective = \plain -> let stem = init plain ; verb = mkVerb plain ; in { - s = table { AAttr => add_N stem ; - APred vf => verb.s ! vf } + s = table { + VAttr Pos => add_N stem ; -- Positive Attr form is different in + vf => verb.s ! vf } -- adjectives, otherwise adj forms == verb forms. } ; AdjPhrase : Type = Adjective ** {compar : Str} ; @@ -159,9 +160,6 @@ oper mkVerb : (plain : Str) -> Verb = \plain -> let stem = init plain ; - -- plainpres = case vowFinal stem of { -- not used in grammar yet - -- True => add_N stem + "다" ; - -- False => stem + "는다" } ; informal = add_eo stem ; -- not used in grammar yet polpres = informal + "요" ; formalpres = case vowFinal stem of { @@ -179,15 +177,19 @@ oper mkVerbReg : (x1,_,_,x4 : Str) -> Verb = \plain,polite,formal,neg -> let stem = init plain ; + attrpos = stem + "는" ; -- TODO: ㄹ-irregulars + attrneg = neg ++ "않는" ; planeg = neg ++ negForms ! Plain ; polneg = neg ++ negForms ! Polite ; formneg = neg ++ negForms ! Formal ; - in mkVerbFull stem plain polite formal planeg polneg formneg ; + in mkVerbFull stem attrpos attrneg plain polite formal planeg polneg formneg ; - mkVerbFull : (x1,_,_,_,_,_,x7 : Str) -> Verb = - \stem,plain,polite,formal,planeg,polneg,formneg -> { + mkVerbFull : (x1,_,_,_,_,_,_,_,x9 : Str) -> Verb = + \stem,attrpos,attrneg,plain,polite,formal,planeg,polneg,formneg -> { s = table { VStem => stem ; + VAttr Pos => attrpos ; + VAttr Neg => attrneg ; VF Plain Pos => plain ; VF Plain Neg => planeg ; VF Polite Pos => polite ; @@ -200,6 +202,8 @@ oper copula : Verb = mkVerbFull "이" + "이는" -- TODO does this exist? + "아니는" -- TODO does this exist? "이다" "이에요" "입니다" @@ -209,6 +213,7 @@ oper copulaAfterVowel : Verb = copula ** { s = \\vf => case vf of { + VAttr Pos => "는" ; -- TODO just guessing VF Plain Pos => "다" ; VF Polite Pos => "예요" ; _ => copula.s ! vf } @@ -216,6 +221,8 @@ oper have_V : Verb = mkVerbFull "있" + "있는" + "없는" "있다" "있어요" "있습니다" @@ -309,8 +316,9 @@ oper predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** { s = \\t,a,p,cltyp => let vf = case cltyp of { - Subord => VStem ; - _ => VF Polite p } -- TODO: more tenses, politeness + Subord => VAttr p ; + WithConj => VStem ; + _ => VF Polite p } -- TODO: more tenses, politeness in np.s ! vp.sc ++ vp.nObj -- an object, not copula complement ++ vp.adv diff --git a/src/korean/VerbKor.gf b/src/korean/VerbKor.gf index 33dc4c18..fad6da70 100644 --- a/src/korean/VerbKor.gf +++ b/src/korean/VerbKor.gf @@ -111,7 +111,7 @@ lin -- : AP -> Comp ; CompAP ap = emptyComp ** { - s = \\vf => ap.s ! APred vf + s = ap.s } ; -- : CN -> Comp ;