forked from GitHub/gf-rgl
(Kor) Add comparatives and superlatives
This commit is contained in:
@@ -11,7 +11,8 @@ concrete AdjectiveKor of Adjective = CatKor ** open ResKor, Prelude in {
|
||||
|
||||
-- : A -> NP -> AP ;
|
||||
ComparA a np = a ** {
|
||||
compar = np.s ! Bare
|
||||
s = \\vf => "더" ++ a.s ! vf ;
|
||||
compar = glue (np.s ! Bare) "보다" ;
|
||||
} ;
|
||||
|
||||
-- : A2 -> NP -> AP ; -- married to her
|
||||
@@ -37,7 +38,6 @@ concrete AdjectiveKor of Adjective = CatKor ** open ResKor, Prelude in {
|
||||
|
||||
-- : Ord -> AP ; -- warmest
|
||||
AdjOrd ord = ord ** {
|
||||
s = \\_ => ord.s ;
|
||||
compar = []
|
||||
} ;
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ concrete CatKor of Cat = CommonX ** open ResKor, Prelude in {
|
||||
Quant = ResKor.Quant ;
|
||||
Num = ResKor.Num ;
|
||||
Ord = {
|
||||
s : Str ; -- AForm => Str ; -- Ord can come from AP and become AP again
|
||||
s : VForm => Str ; -- Ord can come from AP and become AP again
|
||||
n : Number -- Ord can come from Num, which has inherent number
|
||||
} ;
|
||||
DAP = ResKor.Determiner ;
|
||||
|
||||
@@ -114,10 +114,10 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
||||
-- } ;
|
||||
|
||||
-- : A -> Ord ;
|
||||
-- OrdSuperl a = {
|
||||
-- s = \\af => "제일" ++ a.s ! af ;
|
||||
-- n = Sg -- ?? is this meaningful?
|
||||
-- } ;
|
||||
OrdSuperl a = {
|
||||
s = \\vf => "가장" ++ a.s ! vf ;
|
||||
n = Sg -- ?? is this meaningful?
|
||||
} ;
|
||||
|
||||
-- One can combine a numeral and a superlative.
|
||||
|
||||
@@ -151,7 +151,7 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
||||
-- Use3N3 n3 = lin N2 n3 ;
|
||||
-- : AP -> CN -> CN
|
||||
AdjCN ap cn = cn ** {
|
||||
s = \\nf => ap.s ! VAttr Pos ++ cn.s ! nf
|
||||
s = \\nf => ap.compar ++ ap.s ! VAttr Pos ++ cn.s ! nf
|
||||
} ;
|
||||
|
||||
-- : CN -> RS -> CN ;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--# -path=.:../abstract:../common:../prelude
|
||||
|
||||
concrete SymbolKor of Symbol = CatKor **
|
||||
open Prelude, ResKor, (NK=NounKor) in {
|
||||
open Prelude, ResKor, (NK=NounKor), (VK=VerbKor) in {
|
||||
|
||||
lin
|
||||
|
||||
@@ -45,7 +45,9 @@ lin
|
||||
SymbNum sy = baseNum ** {s = \\_,_ => sy.s} ;
|
||||
|
||||
-- : Symb -> Ord ;
|
||||
SymbOrd sy = sy ** {n=Pl} ;
|
||||
SymbOrd sy =
|
||||
let comp : Comp = VK.CompAdv (lin Adv sy)
|
||||
in {s = comp.s ; n=Pl} ;
|
||||
|
||||
lincat
|
||||
Symb, [Symb] = SS ;
|
||||
|
||||
@@ -111,7 +111,7 @@ lin
|
||||
|
||||
-- : AP -> Comp ;
|
||||
CompAP ap = emptyComp ** {
|
||||
s = ap.s
|
||||
s = \\vf => ap.compar ++ ap.s ! vf
|
||||
} ;
|
||||
|
||||
-- : CN -> Comp ;
|
||||
|
||||
Reference in New Issue
Block a user