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