forked from GitHub/gf-rgl
(Kor) Add NForm as a parameter to A2
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
concrete AdjectiveKor of Adjective = CatKor **
|
||||
open ResKor, (AK=AdverbKor), Prelude in {
|
||||
open ResKor, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
@@ -18,7 +18,7 @@ concrete AdjectiveKor of Adjective = CatKor **
|
||||
|
||||
-- : A2 -> NP -> AP ; -- married to her
|
||||
ComplA2 a2 np = a2 ** {
|
||||
compar = (AK.PrepNP a2.p2 np).s ;
|
||||
compar = (prepNP a2.c2 a2.p2 np).s ;
|
||||
} ;
|
||||
|
||||
-- : A2 -> AP ; -- married to itself
|
||||
|
||||
@@ -11,11 +11,7 @@ lin
|
||||
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
||||
|
||||
-- : Prep -> NP -> Adv ;
|
||||
PrepNP prep np = {
|
||||
s = case prep.attaches of {
|
||||
True => glue (np.s ! Bare) (prep.s ! np.p) ;
|
||||
False => np.s ! Bare ++ (prep.s ! np.p)}
|
||||
} ;
|
||||
PrepNP = prepNP Bare ;
|
||||
|
||||
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
||||
|
||||
|
||||
@@ -147,8 +147,8 @@ oper
|
||||
mkA2 : Str -> Str -> A2
|
||||
= \s,p -> let adj : Adjective = mkAdj s ;
|
||||
prep : Prep = mkPrep p
|
||||
in lin A2 (adj ** {p2 = prep}) ;
|
||||
mkA2 : A -> Prep -> A2 = \a,p -> lin A2 (a ** {p2 = p}) ;
|
||||
in lin A2 (atoa2 adj ** {p2 = prep}) ;
|
||||
mkA2 : A -> Prep -> A2 = \a,p -> lin A2 (atoa2 a ** {p2 = p}) ;
|
||||
} ;
|
||||
|
||||
mkV = overload {
|
||||
|
||||
@@ -142,7 +142,7 @@ oper
|
||||
-- Adjectives
|
||||
|
||||
Adjective : Type = {s : VForm => Str} ; -- Adjectives are verbs
|
||||
Adjective2 : Type = Adjective ** {p2 : Postposition} ;
|
||||
Adjective2 : Type = Adjective ** {c2 : NForm ; p2 : Postposition} ;
|
||||
|
||||
v2a : (attrpos : Str) -> Verb -> Adjective = \attrpos,v -> {
|
||||
s = table {
|
||||
@@ -273,6 +273,11 @@ oper
|
||||
|
||||
Adverb : Type = SS ;
|
||||
|
||||
prepNP : NForm -> Postposition -> NounPhrase -> Adverb = \nf,pp,np -> {
|
||||
s = case pp.attaches of {
|
||||
True => glue (np.s ! nf) (pp.s ! np.p) ;
|
||||
False => np.s ! nf ++ (pp.s ! np.p)}
|
||||
} ;
|
||||
------------------
|
||||
-- Conj
|
||||
|
||||
|
||||
Reference in New Issue
Block a user