mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -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
|
--2 Structural words
|
||||||
|
|
||||||
-- Constructed in StructuralKor.
|
-- Constructed in StructuralKor.
|
||||||
Conj = {s2 : Bool => Str ; s1 : Str ; n : Number } ;
|
Conj = ResKor.Conj ;
|
||||||
Subj = SS ;
|
Subj = SS ;
|
||||||
Prep = ResKor.Postposition ;
|
Prep = ResKor.Postposition ;
|
||||||
|
|
||||||
|
|||||||
@@ -58,15 +58,32 @@ lin
|
|||||||
ConsS x xs =
|
ConsS x xs =
|
||||||
xs ** { } ;
|
xs ** { } ;
|
||||||
ConjS co xs = {} ;
|
ConjS co xs = {} ;
|
||||||
|
-}
|
||||||
lincat
|
lincat
|
||||||
[AP] = {} ;
|
[AP] = ResKor.AdjPhrase ** {firstAP : AForm => ConjType => Str} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
BaseAP x y = twoTable … x y ** y ; --choose all the other fields from second argument
|
BaseAP a1 a2 = a2 ** {
|
||||||
ConsAP as a = consrTable … comma as a ** as ;
|
firstAP = mkFirstAP a1 ;
|
||||||
ConjAP co as = conjunctDistrTable … co as ** as ;
|
} ;
|
||||||
|
|
||||||
|
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
|
lincat
|
||||||
[CN] = { } ;
|
[CN] = { } ;
|
||||||
|
|
||||||
@@ -83,15 +100,23 @@ lin
|
|||||||
ConsDAP xs x = xs **
|
ConsDAP xs x = xs **
|
||||||
ConjDet conj xs = xs **
|
ConjDet conj xs = xs **
|
||||||
|
|
||||||
|
-}
|
||||||
-- Noun phrases
|
-- Noun phrases
|
||||||
lincat
|
lincat
|
||||||
[NP] =
|
[NP] = ResKor.NounPhrase ** {firstNP : ConjType => Str} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
BaseNP x y =
|
BaseNP np1 np2 = np2 ** {firstNP = mkFirstNP np1} ;
|
||||||
ConsNP x xs =
|
ConsNP np nps = nps ** {
|
||||||
ConjNP conj xs =
|
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 ;
|
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
|
-- VP
|
||||||
|
|
||||||
Complement : Type = {
|
Complement : Type = {
|
||||||
|
|||||||
@@ -38,7 +38,15 @@ lin there_Adv = ss "" ;
|
|||||||
-------
|
-------
|
||||||
-- Conj
|
-- 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 or_Conj = {s2 = \\_ => "" ; s1 = [] ; n = Sg} ;
|
||||||
-- lin if_then_Conj = mkConj
|
-- lin if_then_Conj = mkConj
|
||||||
-- lin both7and_DConj = mkConj "" "" pl ;
|
-- lin both7and_DConj = mkConj "" "" pl ;
|
||||||
|
|||||||
Reference in New Issue
Block a user