mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 09:28:54 -06:00
(Kor) Adv, AdA and AP related functions
This commit is contained in:
@@ -52,7 +52,7 @@ concrete AdjectiveKor of Adjective = CatKor ** open ResKor, Prelude in {
|
||||
-- An adjectival phrase can be modified by an *adadjective*, such as "very".
|
||||
|
||||
-- : AdA -> AP -> AP ;
|
||||
-- AdAP ada ap = ap ** { } ;
|
||||
AdAP ada ap = ap ** {s = \\af => ada.s ++ ap.s ! af} ;
|
||||
|
||||
|
||||
-- It can also be postmodified by an adverb, typically a prepositional phrase.
|
||||
|
||||
@@ -243,7 +243,7 @@ lin name_N = mkN "성함" ;
|
||||
-- lin newspaper_N = mkN "" ;
|
||||
-- lin night_N = mkN "" ;
|
||||
-- lin nose_N = mkN "" ;
|
||||
-- lin now_Adv = mkA "" ;
|
||||
lin now_Adv = mkAdv "지금" ;
|
||||
-- lin number_N = mkN "" ;
|
||||
--
|
||||
-- --------
|
||||
@@ -368,7 +368,7 @@ lin small_A = mkA "작다" ;
|
||||
-- lin think_V = mkV "" ;
|
||||
-- lin throw_V2 = mkV2 "" ;
|
||||
-- lin tie_V2 = mkV2 "" ;
|
||||
-- lin today_Adv = mkA "" ;
|
||||
lin today_Adv = mkAdv "오늘" ;
|
||||
-- lin tongue_N = mkN "" ;
|
||||
-- lin tooth_N = mkN "" ;
|
||||
-- lin train_N = mkN "" ;
|
||||
|
||||
@@ -141,8 +141,9 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
||||
-- : N3 -> N2 ; -- distance (to Paris)
|
||||
-- Use3N3 n3 = lin N2 n3 ;
|
||||
-- : AP -> CN -> CN
|
||||
-- AdjCN ap cn = cn ** {
|
||||
-- } ;
|
||||
AdjCN ap cn = cn ** {
|
||||
s = \\nf => ap.s ! AAttr ++ cn.s ! nf
|
||||
} ;
|
||||
|
||||
-- : CN -> RS -> CN ;
|
||||
-- RelCN cn rs = cn ** {
|
||||
|
||||
@@ -230,7 +230,8 @@ oper
|
||||
-- compar : Str ;
|
||||
} ;
|
||||
|
||||
VerbPhrase : Type = BaseVerb ** Complement ** {
|
||||
BaseVP : Type = {
|
||||
adv,
|
||||
nObj,
|
||||
vComp : Str
|
||||
-- {subjunc : Str ; -- inflected verb complement
|
||||
@@ -238,18 +239,26 @@ oper
|
||||
-- subcl : Str} -- clause complement
|
||||
} ;
|
||||
|
||||
VPSlash : Type = Verb2 ;
|
||||
|
||||
useV : Verb -> VerbPhrase = \v -> v ** {
|
||||
baseVP : BaseVP = {
|
||||
adv,
|
||||
nObj,
|
||||
vComp = [] ;
|
||||
} ;
|
||||
|
||||
useVc : Verb2 -> VPSlash = \v2 -> v2 ;
|
||||
VerbPhrase : Type = BaseVerb ** Complement ** BaseVP ;
|
||||
|
||||
VPSlash : Type = Verb2 ** BaseVP ;
|
||||
|
||||
useV : Verb -> VerbPhrase = \v -> baseVP ** v ;
|
||||
|
||||
useVc : Verb2 -> VPSlash = \v2 -> baseVP ** v2 ;
|
||||
|
||||
insertComp : VPSlash -> NounPhrase -> VerbPhrase = \v2,np -> useV v2 ** {
|
||||
nObj = np.s ! v2.c2 ++ v2.p2.s
|
||||
} ;
|
||||
|
||||
insertAdv : VerbPhrase -> SS -> VerbPhrase = \vp,adv -> vp ** {adv = adv.s} ;
|
||||
insertAdvSlash : VPSlash -> SS -> VPSlash = \v,a -> v ** insertAdv v a ;
|
||||
--------------------------------------------------------------------------------
|
||||
-- Cl, S
|
||||
|
||||
@@ -266,11 +275,10 @@ oper
|
||||
|
||||
Sentence : Type = {s : Str} ;
|
||||
|
||||
predVPslash = predVP ; -- VP==VPSlash, Cl==ClSlash
|
||||
|
||||
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
|
||||
s = \\t,a,p => np.s ! vp.sc
|
||||
++ vp.nObj -- an object, not copula complement
|
||||
++ vp.adv
|
||||
++ vp.s ! VF Polite p -- TODO: more tenses, choose politeness
|
||||
} ;
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@ concrete StructuralKor of Structural = CatKor **
|
||||
|
||||
-------
|
||||
-- Ad*
|
||||
{-
|
||||
lin almost_AdA = mkAdA "" ;
|
||||
lin almost_AdN = ss "" ;
|
||||
lin at_least_AdN = ss "" ;
|
||||
lin at_most_AdN = ss "" ;
|
||||
lin so_AdA = ss "" ;
|
||||
lin too_AdA = ss "" ;
|
||||
lin very_AdA = mkAdA "" ;
|
||||
|
||||
-- lin almost_AdA = mkAdA "" ;
|
||||
-- lin almost_AdN = ss "" ;
|
||||
-- lin at_least_AdN = ss "" ;
|
||||
-- lin at_most_AdN = ss "" ;
|
||||
-- lin so_AdA = ss "" ;
|
||||
-- lin too_AdA = ss "" ;
|
||||
lin very_AdA = mkAdA "매우" ;
|
||||
{-
|
||||
lin as_CAdv = { s = "" ; p = [] } ;
|
||||
lin less_CAdv = { s = "" ; p = [] } ;
|
||||
lin more_CAdv = { s = "" ; p = [] } ;
|
||||
|
||||
@@ -83,13 +83,13 @@ lin
|
||||
|
||||
-- : Comp -> VP ;
|
||||
UseComp comp = UseCopula ** comp ;
|
||||
{-
|
||||
-- : VP -> Adv -> VP ; -- sleep here
|
||||
AdvVP = insertAdv ;
|
||||
|
||||
-- : VPSlash -> Adv -> VPSlash ; -- use (it) here
|
||||
AdvVPSlash = insertAdv ;
|
||||
AdvVPSlash = insertAdvSlash ;
|
||||
|
||||
{-
|
||||
-- : VP -> Adv -> VP ; -- sleep , even though ...
|
||||
ExtAdvVP vp adv = ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user