diff --git a/src/korean/CatKor.gf b/src/korean/CatKor.gf index 9f615449d..94be91df6 100644 --- a/src/korean/CatKor.gf +++ b/src/korean/CatKor.gf @@ -65,8 +65,7 @@ concrete CatKor of Cat = CommonX ** open ResKor, Prelude in { Predet = {s : Phono => Str ; p : Phono} ; Quant = ResKor.Quant ; Num = ResKor.Num ; - Ord = { - s : VForm => Str ; -- Ord can come from AP and become AP again + Ord = ResKor.Adjective ** { -- Ord can come from AP and become AP again n : Number -- Ord can come from Num, which has inherent number } ; DAP = ResKor.Determiner ; diff --git a/src/korean/ConjunctionKor.gf b/src/korean/ConjunctionKor.gf index 01f407db2..4f2ac1d1e 100644 --- a/src/korean/ConjunctionKor.gf +++ b/src/korean/ConjunctionKor.gf @@ -39,11 +39,11 @@ oper ConjSS : Type = {s : ConjType => Str} ; baseSS : SS -> SS -> ConjSS = \s1,s2 -> { - s = \\conj => glue s1.s (conjTable ! NStar ! conj) ++ s2.s ; + s = \\conj => glue s1.s (conjTable ! NStar ! conj ! Vowel) ++ s2.s ; -- TODO check phono } ; consSS : SS -> ConjSS -> ConjSS = \s,ss -> ss ** { - s = \\conj => glue s.s (conjTable ! NStar ! conj) ++ ss.s ! conj ; + s = \\conj => glue s.s (conjTable ! NStar ! conj ! Vowel) ++ ss.s ! conj ; } ; conjSS : Conj -> ConjSS -> SS = \co,ss -> { @@ -79,7 +79,7 @@ lin oper mkFirstS : ResKor.Sentence -> ConjType => Str = \s -> - \\conj => glue (s.s ! WithConj) (conjTable ! VStar ! conj) ; + \\conj => glue (s.s ! WithConj) (conjTable ! VStar ! conj ! s.p) ; lincat [AP] = ResKor.AdjPhrase ** {firstAP : VForm => ConjType => Str} ; @@ -101,7 +101,8 @@ lin oper mkFirstAP : ResKor.AdjPhrase -> VForm => ConjType => Str = \ap -> - \\af,conj => ap.compar ++ glue (ap.s ! VStem Pos) (conjTable ! VStar ! conj) ; + \\af,conj => ap.compar + ++ glue (ap.s ! VStem Pos) (conjTable ! VStar ! conj ! ap.p) ; {- lincat @@ -137,7 +138,7 @@ lin oper mkFirstNP : ResKor.NounPhrase -> ConjType => Str = \np -> - \\conj => glue (np.s ! Bare) (conjTable ! NStar ! conj) ; + \\conj => glue (np.s ! Bare) (conjTable ! NStar ! conj ! np.p) ; -- Versions with commas, no repeated conjunctions baseNPcomma : NP -> NP -> ListNP = \x,y -> y ** { diff --git a/src/korean/NounKor.gf b/src/korean/NounKor.gf index 0adf057dc..327cc8ded 100644 --- a/src/korean/NounKor.gf +++ b/src/korean/NounKor.gf @@ -123,7 +123,7 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in { -- } ; -- : A -> Ord ; - OrdSuperl a = { + OrdSuperl a = a ** { s = \\vf => "가장" ++ a.s ! vf ; n = Sg -- ?? is this meaningful? } ; diff --git a/src/korean/ParadigmsKor.gf b/src/korean/ParadigmsKor.gf index 185cb147d..aab5f2a59 100644 --- a/src/korean/ParadigmsKor.gf +++ b/src/korean/ParadigmsKor.gf @@ -149,7 +149,7 @@ oper mkA : (plain,polite,formal,attr : Str) -> A = \x1,x2,x3,x4 -> lin A (mkAdjReg x1 x2 x3 x4) ; mkA : (jaemi : Str) -> (itda : V) -> A - = \jaemi,itda -> lin A ({s = \\vf => jaemi ++ itda.s ! vf}) ; + = \jaemi,itda -> lin A (itda ** {s = \\vf => jaemi ++ itda.s ! vf}) ; } ; mkA2 = overload { diff --git a/src/korean/ParamKor.gf b/src/korean/ParamKor.gf index bd852d353..f82924081 100644 Binary files a/src/korean/ParamKor.gf and b/src/korean/ParamKor.gf differ diff --git a/src/korean/RelativeKor.gf b/src/korean/RelativeKor.gf index 7fbe1030d..92e37fcba 100644 --- a/src/korean/RelativeKor.gf +++ b/src/korean/RelativeKor.gf @@ -6,7 +6,7 @@ lin RelCl = relSlash (ss "") ; -- : RP -> VP -> RCl ; - RelVP rp vp = { -- TODO no tenses yet in the grammar + RelVP rp vp = vp ** { -- TODO no tenses yet in the grammar s = \\t,a,p,cltyp => rp.s ++ vp.adv ++ vp.nObj ++ case cltyp of { @@ -25,7 +25,7 @@ lin --FunRP prep np rp = {} ; oper - relSlash : SS -> ClSlash -> ResKor.RClause = \rp,cls -> { + relSlash : SS -> ClSlash -> ResKor.RClause = \rp,cls -> cls ** { s = \\t,a,p,cltyp => rp.s ++ case cltyp of { WithConj => cls.s ! t ! a ! p ! WithConj ; diff --git a/src/korean/ResKor.gf b/src/korean/ResKor.gf index 4fdf7a11f..d1b472622 100644 --- a/src/korean/ResKor.gf +++ b/src/korean/ResKor.gf @@ -142,10 +142,13 @@ oper -------------------------------------------------------------------------------- -- Adjectives - Adjective : Type = {s : VForm => Str} ; -- Adjectives are verbs + Adjective : Type = { + s : VForm => Str ; -- Adjectives are verbs + p, pNeg : Phono ; -- needed for attaching conjunction + } ; Adjective2 : Type = Adjective ** {c2 : NForm ; p2 : Postposition} ; - v2a : (attrpos : Str) -> Verb -> Adjective = \attrpos,v -> { + v2a : (attrpos : Str) -> Verb -> Adjective = \attrpos,v -> v ** { s = table { VAttr Pos => attrpos ; -- Positive Attr is different in vf => v.s ! vf } -- adjectives, otherwise adj forms == verb forms. @@ -168,6 +171,7 @@ oper BaseVerb : Type = { sc : NForm ; -- subject case + p, pNeg : Phono ; -- needed for attaching conjunction } ; Verb : Type = BaseVerb ** { s : VForm => Str ; @@ -218,7 +222,9 @@ oper VF Formal Pos => formal ; VF Formal Neg => formneg } ; - sc = Subject + sc = Subject ; + p = if_then_else Phono (vowFinal stem) Vowel Consonant ; + pNeg = if_then_else Phono (vowFinal (init planeg)) Vowel Consonant ; } ; copula : Verb = mkVerbFull @@ -340,7 +346,9 @@ oper -------------------------------------------------------------------------------- -- Cl, S - Clause : Type = {s : Tense => Anteriority => Polarity => ClType => Str} ; + Clause : Type = { + s : Tense => Anteriority => Polarity => ClType => Str ; + p, pNeg : Phono} ; {- After PredVP, we might still want to add more adverbs (QuestIAdv), but we're done with verb inflection. @@ -351,7 +359,10 @@ oper RClause : Type = Clause ; - Sentence : Type = {s : ClType => Str} ; + Sentence : Type = { + s : ClType => Str ; + p : Phono -- Needed for attaching conjunction + } ; predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> let npstr : Str = np.s ! vp.sc in predVP' npstr vp ; diff --git a/src/korean/SentenceKor.gf b/src/korean/SentenceKor.gf index 9553d6f7f..869b93ff0 100644 --- a/src/korean/SentenceKor.gf +++ b/src/korean/SentenceKor.gf @@ -49,7 +49,10 @@ lin -- : Temp -> Pol -> Cl -> S ; UseCl t p cl = { - s = \\c => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! c + s = \\c => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! c ; + p = case p.p of { -- Phono of VStem + Pos => cl.p ; + Neg => cl.pNeg } ; } ; -- : Temp -> Pol -> QCl -> QS ; @@ -58,7 +61,10 @@ lin -- : Temp -> Pol -> RCl -> RS ; UseRCl t p rcl = { - s = \\c => t.s ++ p.s ++ rcl.s ! t.t ! t.a ! p.p ! c + s = \\c => t.s ++ p.s ++ rcl.s ! t.t ! t.a ! p.p ! c ; + p = case p.p of { -- Phono of VStem + Pos => rcl.p ; + Neg => rcl.pNeg } ; } ; -- AdvS : Adv -> S -> S ; -- then I will go home diff --git a/src/korean/SymbolKor.gf b/src/korean/SymbolKor.gf index 2ed90518e..a90f4c4c9 100644 --- a/src/korean/SymbolKor.gf +++ b/src/korean/SymbolKor.gf @@ -39,7 +39,7 @@ lin s = \\nf => cn.s ! nf ++ i.s ! cn.c.origin ! Indep}) ; -- : Symb -> S ; - SymbS sy = {s = \\_ => sy.s} ; + SymbS sy = {s = \\_ => sy.s ; p = Vowel} ; -- : Symb -> Card ; SymbNum sy = baseNum ** {s = \\_,_ => sy.s} ; @@ -47,7 +47,7 @@ lin -- : Symb -> Ord ; SymbOrd sy = let comp : Comp = VK.CompAdv (lin Adv sy) - in {s = comp.s ; n=Pl} ; + in {s = comp.s ; n = Pl ; p,pNeg = Vowel} ; lincat Symb, [Symb] = SS ;