forked from GitHub/gf-rgl
(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".
|
-- An adjectival phrase can be modified by an *adadjective*, such as "very".
|
||||||
|
|
||||||
-- : AdA -> AP -> AP ;
|
-- : 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.
|
-- 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 newspaper_N = mkN "" ;
|
||||||
-- lin night_N = mkN "" ;
|
-- lin night_N = mkN "" ;
|
||||||
-- lin nose_N = mkN "" ;
|
-- lin nose_N = mkN "" ;
|
||||||
-- lin now_Adv = mkA "" ;
|
lin now_Adv = mkAdv "지금" ;
|
||||||
-- lin number_N = mkN "" ;
|
-- lin number_N = mkN "" ;
|
||||||
--
|
--
|
||||||
-- --------
|
-- --------
|
||||||
@@ -368,7 +368,7 @@ lin small_A = mkA "작다" ;
|
|||||||
-- lin think_V = mkV "" ;
|
-- lin think_V = mkV "" ;
|
||||||
-- lin throw_V2 = mkV2 "" ;
|
-- lin throw_V2 = mkV2 "" ;
|
||||||
-- lin tie_V2 = mkV2 "" ;
|
-- lin tie_V2 = mkV2 "" ;
|
||||||
-- lin today_Adv = mkA "" ;
|
lin today_Adv = mkAdv "오늘" ;
|
||||||
-- lin tongue_N = mkN "" ;
|
-- lin tongue_N = mkN "" ;
|
||||||
-- lin tooth_N = mkN "" ;
|
-- lin tooth_N = mkN "" ;
|
||||||
-- lin train_N = mkN "" ;
|
-- lin train_N = mkN "" ;
|
||||||
|
|||||||
@@ -141,8 +141,9 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
|||||||
-- : N3 -> N2 ; -- distance (to Paris)
|
-- : N3 -> N2 ; -- distance (to Paris)
|
||||||
-- Use3N3 n3 = lin N2 n3 ;
|
-- Use3N3 n3 = lin N2 n3 ;
|
||||||
-- : AP -> CN -> CN
|
-- : AP -> CN -> CN
|
||||||
-- AdjCN ap cn = cn ** {
|
AdjCN ap cn = cn ** {
|
||||||
-- } ;
|
s = \\nf => ap.s ! AAttr ++ cn.s ! nf
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : CN -> RS -> CN ;
|
-- : CN -> RS -> CN ;
|
||||||
-- RelCN cn rs = cn ** {
|
-- RelCN cn rs = cn ** {
|
||||||
|
|||||||
@@ -230,7 +230,8 @@ oper
|
|||||||
-- compar : Str ;
|
-- compar : Str ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
VerbPhrase : Type = BaseVerb ** Complement ** {
|
BaseVP : Type = {
|
||||||
|
adv,
|
||||||
nObj,
|
nObj,
|
||||||
vComp : Str
|
vComp : Str
|
||||||
-- {subjunc : Str ; -- inflected verb complement
|
-- {subjunc : Str ; -- inflected verb complement
|
||||||
@@ -238,18 +239,26 @@ oper
|
|||||||
-- subcl : Str} -- clause complement
|
-- subcl : Str} -- clause complement
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
VPSlash : Type = Verb2 ;
|
baseVP : BaseVP = {
|
||||||
|
adv,
|
||||||
useV : Verb -> VerbPhrase = \v -> v ** {
|
|
||||||
nObj,
|
nObj,
|
||||||
vComp = [] ;
|
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 ** {
|
insertComp : VPSlash -> NounPhrase -> VerbPhrase = \v2,np -> useV v2 ** {
|
||||||
nObj = np.s ! v2.c2 ++ v2.p2.s
|
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
|
-- Cl, S
|
||||||
|
|
||||||
@@ -266,11 +275,10 @@ oper
|
|||||||
|
|
||||||
Sentence : Type = {s : Str} ;
|
Sentence : Type = {s : Str} ;
|
||||||
|
|
||||||
predVPslash = predVP ; -- VP==VPSlash, Cl==ClSlash
|
|
||||||
|
|
||||||
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
|
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
|
||||||
s = \\t,a,p => np.s ! vp.sc
|
s = \\t,a,p => np.s ! vp.sc
|
||||||
++ vp.nObj -- an object, not copula complement
|
++ vp.nObj -- an object, not copula complement
|
||||||
|
++ vp.adv
|
||||||
++ vp.s ! VF Polite p -- TODO: more tenses, choose politeness
|
++ vp.s ! VF Polite p -- TODO: more tenses, choose politeness
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -3,15 +3,15 @@ concrete StructuralKor of Structural = CatKor **
|
|||||||
|
|
||||||
-------
|
-------
|
||||||
-- Ad*
|
-- 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 as_CAdv = { s = "" ; p = [] } ;
|
||||||
lin less_CAdv = { s = "" ; p = [] } ;
|
lin less_CAdv = { s = "" ; p = [] } ;
|
||||||
lin more_CAdv = { s = "" ; p = [] } ;
|
lin more_CAdv = { s = "" ; p = [] } ;
|
||||||
|
|||||||
@@ -83,13 +83,13 @@ lin
|
|||||||
|
|
||||||
-- : Comp -> VP ;
|
-- : Comp -> VP ;
|
||||||
UseComp comp = UseCopula ** comp ;
|
UseComp comp = UseCopula ** comp ;
|
||||||
{-
|
|
||||||
-- : VP -> Adv -> VP ; -- sleep here
|
-- : VP -> Adv -> VP ; -- sleep here
|
||||||
AdvVP = insertAdv ;
|
AdvVP = insertAdv ;
|
||||||
|
|
||||||
-- : VPSlash -> Adv -> VPSlash ; -- use (it) here
|
-- : VPSlash -> Adv -> VPSlash ; -- use (it) here
|
||||||
AdvVPSlash = insertAdv ;
|
AdvVPSlash = insertAdvSlash ;
|
||||||
|
|
||||||
|
{-
|
||||||
-- : VP -> Adv -> VP ; -- sleep , even though ...
|
-- : VP -> Adv -> VP ; -- sleep , even though ...
|
||||||
ExtAdvVP vp adv = ;
|
ExtAdvVP vp adv = ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user