(Kor) Add more conjunctions

This commit is contained in:
Inari Listenmaa
2020-04-01 19:53:02 +02:00
parent cd9dd6bdc7
commit f75b9b1c31

View File

@@ -1,5 +1,5 @@
concrete ConjunctionKor of Conjunction = concrete ConjunctionKor of Conjunction =
CatKor ** open ResKor, Coordination, Prelude in { CatKor ** open ResKor, Prelude in {
flags optimize=all_subs ; flags optimize=all_subs ;
@@ -25,30 +25,36 @@ concrete ConjunctionKor of Conjunction =
ConsAdv = consrSS comma ; ConsAdv = consrSS comma ;
ConjAdv = conjunctSS ; ConjAdv = conjunctSS ;
--} -}
-- Adverb and other simple {s : Str} types.
lincat lincat
[Adv],[AdV],[IAdv] = {s1,s2 : Str} ; [Adv],[AdV],[IAdv],[RS] = ConjSS ;
lin lin
BaseAdv, BaseAdV, BaseIAdv = twoSS ; BaseAdv, BaseAdV, BaseIAdv, BaseRS = baseSS ;
ConsAdv, ConsAdV, ConsIAdv = consrSS comma ; ConsAdv, ConsAdV, ConsIAdv, ConsRS = consSS ;
ConjAdv, ConjAdV, ConjIAdv = conjunctDistrSS ; ConjAdv, ConjAdV, ConjIAdv, ConjRS = conjSS ;
oper
ConjSS : Type = SS ** {firstSS : ConjType => Str} ;
{- baseSS : SS -> SS -> ConjSS = \s1,s2 -> s2 ** {
-- RS depends on X, Y and Z, otherwise exactly like previous. firstSS = mkFirstSS s1 ;
-- RS can modify CNs, which are open for …, and have inherent … } ;
lincat
[RS] = {s1,s2 : … => Str} ; consSS : SS -> ConjSS -> ConjSS = \s,ss -> ss ** {
firstSS = \\conj =>
mkFirstSS s ! conj ++ ss.firstSS ! conj ;
} ;
conjSS : Conj -> ConjSS -> SS = \co,ss -> {
s = co.s1 ++ ss.firstSS ! co.c ++ ss.s
} ;
oper
mkFirstSS : SS -> ConjType => Str = \s ->
\\conj => glue s.s (conjTable ! NStar ! conj) ;
lin
BaseRS = twoTable3 … ;
ConsRS = consrTable3 … comma ;
ConjRS = conjunctRSTable ;
-}
lincat lincat
[S] = ResKor.Sentence ** {firstS : ConjType => Str} ; [S] = ResKor.Sentence ** {firstS : ConjType => Str} ;
@@ -131,4 +137,5 @@ oper
mkFirstNP : ResKor.NounPhrase -> ConjType => Str = \np -> mkFirstNP : ResKor.NounPhrase -> ConjType => Str = \np ->
\\conj => glue (np.s ! Bare) (conjTable ! NStar ! conj) ; \\conj => glue (np.s ! Bare) (conjTable ! NStar ! conj) ;
} }