mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
(Kor) Add conjunctions for AP and CN
This commit is contained in:
@@ -85,7 +85,7 @@ concrete CatKor of Cat = CommonX ** open ResKor, Prelude in {
|
||||
--2 Structural words
|
||||
|
||||
-- Constructed in StructuralKor.
|
||||
Conj = {s2 : Bool => Str ; s1 : Str ; n : Number } ;
|
||||
Conj = ResKor.Conj ;
|
||||
Subj = SS ;
|
||||
Prep = ResKor.Postposition ;
|
||||
|
||||
|
||||
@@ -58,15 +58,32 @@ lin
|
||||
ConsS x xs =
|
||||
xs ** { } ;
|
||||
ConjS co xs = {} ;
|
||||
|
||||
-}
|
||||
lincat
|
||||
[AP] = {} ;
|
||||
[AP] = ResKor.AdjPhrase ** {firstAP : AForm => ConjType => Str} ;
|
||||
|
||||
lin
|
||||
BaseAP x y = twoTable … x y ** y ; --choose all the other fields from second argument
|
||||
ConsAP as a = consrTable … comma as a ** as ;
|
||||
ConjAP co as = conjunctDistrTable … co as ** as ;
|
||||
BaseAP a1 a2 = a2 ** {
|
||||
firstAP = mkFirstAP a1 ;
|
||||
} ;
|
||||
|
||||
ConsAP a as = as ** {
|
||||
firstAP = \\af,conj =>
|
||||
mkFirstAP a ! af ! conj ++ as.firstAP ! af ! conj ;
|
||||
} ;
|
||||
|
||||
ConjAP co as = as ** {
|
||||
s = \\af => co.s1 ++ as.firstAP ! af ! co.c ++ as.s ! af
|
||||
} ;
|
||||
|
||||
|
||||
oper
|
||||
mkFirstAP : ResKor.AdjPhrase -> AForm => 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) } ;
|
||||
|
||||
{-
|
||||
lincat
|
||||
[CN] = { } ;
|
||||
|
||||
@@ -83,15 +100,23 @@ lin
|
||||
ConsDAP xs x = xs **
|
||||
ConjDet conj xs = xs **
|
||||
|
||||
|
||||
-}
|
||||
-- Noun phrases
|
||||
lincat
|
||||
[NP] =
|
||||
[NP] = ResKor.NounPhrase ** {firstNP : ConjType => Str} ;
|
||||
|
||||
lin
|
||||
BaseNP x y =
|
||||
ConsNP x xs =
|
||||
ConjNP conj xs =
|
||||
BaseNP np1 np2 = np2 ** {firstNP = mkFirstNP np1} ;
|
||||
ConsNP np nps = nps ** {
|
||||
firstNP = \\conj => mkFirstNP np ! conj ++ nps.firstNP ! conj
|
||||
} ;
|
||||
ConjNP co nps = nps ** {
|
||||
s = \\nf => co.s1 ++ nps.firstNP ! co.c ++ nps.s ! nf ;
|
||||
n = co.n
|
||||
} ;
|
||||
|
||||
oper
|
||||
mkFirstNP : ResKor.NounPhrase -> ConjType => Str = \np ->
|
||||
\\conj => glue (np.s ! Bare) (conjTable ! NStar ! conj) ;
|
||||
|
||||
-}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -241,6 +241,15 @@ oper
|
||||
Adverb : Type = SS ;
|
||||
|
||||
------------------
|
||||
-- Conj
|
||||
|
||||
Conj : Type = {
|
||||
s1 : Str ;
|
||||
c : ConjType ; -- if it's And, Or, …
|
||||
-- Need to add conjunction already in ConsX funs.
|
||||
n : Number ;
|
||||
} ;
|
||||
------------------
|
||||
-- VP
|
||||
|
||||
Complement : Type = {
|
||||
|
||||
@@ -38,7 +38,15 @@ lin there_Adv = ss "" ;
|
||||
-------
|
||||
-- Conj
|
||||
|
||||
-- lin and_Conj = {s2 = table {x => "" ; y => ""} ; s1 = [] ; n = Pl} ;
|
||||
and_Conj = {
|
||||
s1 = [] ;
|
||||
-- no need for strings here, actual values come from ParamKor.conjTable
|
||||
-- s2 = \\phono => table {
|
||||
-- VStar => "고" ;
|
||||
-- NStar => "하고"} ;
|
||||
n = Pl ;
|
||||
c = And
|
||||
} ;
|
||||
-- lin or_Conj = {s2 = \\_ => "" ; s1 = [] ; n = Sg} ;
|
||||
-- lin if_then_Conj = mkConj
|
||||
-- lin both7and_DConj = mkConj "" "" pl ;
|
||||
|
||||
Reference in New Issue
Block a user