1
0
forked from GitHub/gf-rgl

(Kor) Add A2, ComplA2, mkA2

This commit is contained in:
Inari Listenmaa
2020-04-03 19:35:59 +02:00
parent 44abd1a8da
commit 844e606429
3 changed files with 17 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
concrete AdjectiveKor of Adjective = CatKor ** open ResKor, Prelude in {
concrete AdjectiveKor of Adjective = CatKor **
open ResKor, (AK=AdverbKor), Prelude in {
flags optimize=all_subs ;
@@ -16,7 +17,9 @@ concrete AdjectiveKor of Adjective = CatKor ** open ResKor, Prelude in {
} ;
-- : A2 -> NP -> AP ; -- married to her
-- ComplA2 a2 np = a2 ** { } ;
ComplA2 a2 np = a2 ** {
compar = (AK.PrepNP a2.p2 np).s ;
} ;
-- : A2 -> AP ; -- married to itself
-- ReflA2 a2 = a2 ** { } ;

View File

@@ -28,7 +28,10 @@ oper
mkA : (kiga : Str) -> (jakda : A) -> A ; -- Compound adjective, e.g. 키가 작다 'short', literally 'height (is) small'. 키가 'height' given as string, 작다 'small' given as preconstructed A.
} ;
-- mkA2 : Str -> Prep -> A2 ;
mkA2 : overload {
mkA2 : Str -> A2 ; -- Regular adjective, given in -다 form, no postposition for complement.
mkA2 : A -> Prep -> A2 ; -- Preconstructed adjective and postposition for complement.
} ;
mkPN : Str -> PN
= \s -> lin PN (mkNoun s) ;
@@ -124,6 +127,11 @@ oper
jakda ** {s = \\af => kiga ++ jakda.s ! af} ;
} ;
mkA2 = overload {
mkA2 : Str -> A2 = \s -> lin A2 (atoa2 (mkAdj s)) ;
mkA2 : A -> Prep -> A2 = \a,p -> lin A2 (a ** {p2 = p}) ;
} ;
mkV = overload {
mkV : (plain : Str) -> V = \v -> lin V (mkVerb v) ;
mkV : (nore : Str) -> (hada : V) -> V = \nore,hada -> hada ** {

View File

@@ -134,7 +134,7 @@ oper
-- Adjectives
Adjective : Type = {s : VForm => Str} ; -- Adjectives are verbs
Adjective2 : Type = Adjective ;
Adjective2 : Type = Adjective ** {p2 : Postposition} ;
mkAdj : Str -> Adjective = \plain ->
let stem = init plain ;
@@ -145,6 +145,8 @@ oper
vf => verb.s ! vf } -- adjectives, otherwise adj forms == verb forms.
} ;
atoa2 : Adjective -> Adjective2 = \a -> a ** {c2=Bare ; p2=emptyPP} ;
AdjPhrase : Type = Adjective ** {compar : Str} ;
--------------------------------------------------------------------------------
-- Verbs