forked from GitHub/gf-rgl
(Kor) Make Prep's s field dependent on Phono parameter of NP
This commit is contained in:
@@ -13,8 +13,8 @@ lin
|
|||||||
-- : Prep -> NP -> Adv ;
|
-- : Prep -> NP -> Adv ;
|
||||||
PrepNP prep np = {
|
PrepNP prep np = {
|
||||||
s = case prep.attaches of {
|
s = case prep.attaches of {
|
||||||
True => glue (np.s ! Bare) prep.s ;
|
True => glue (np.s ! Bare) (prep.s ! np.p) ;
|
||||||
False => np.s ! Bare ++ prep.s }
|
False => np.s ! Bare ++ (prep.s ! np.p)}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
||||||
|
|||||||
@@ -77,7 +77,8 @@ oper
|
|||||||
--2 Structural categories
|
--2 Structural categories
|
||||||
|
|
||||||
mkPrep : overload {
|
mkPrep : overload {
|
||||||
mkPrep : (e : Str) -> Prep ; -- Particle like 에, attaches to the NP.
|
mkPrep : (e : Str) -> Prep ; -- Particle/postposition like 에: same form after vowel and consonant, attaches to the NP. Despite the name Prep, these are always postpositions.
|
||||||
|
mkPrep : (ro,euro : Str) -> Prep ; -- Particle like 로/으로: first argument is the form after vowel, second argument after consonant. Attaches to the NP.
|
||||||
mkPrep : (dwie : Str) -> (attaches : Bool) -> Prep ; -- `mkPrep "뒤에" False` for a postposition that doesn't attach to the NP.
|
mkPrep : (dwie : Str) -> (attaches : Bool) -> Prep ; -- `mkPrep "뒤에" False` for a postposition that doesn't attach to the NP.
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -160,6 +161,8 @@ oper
|
|||||||
mkPrep = overload {
|
mkPrep = overload {
|
||||||
mkPrep : (e : Str) -> Prep -- Particle like 에, attaches to the NP.
|
mkPrep : (e : Str) -> Prep -- Particle like 에, attaches to the NP.
|
||||||
= \e -> lin Prep (ResKor.mkPrep e) ;
|
= \e -> lin Prep (ResKor.mkPrep e) ;
|
||||||
|
mkPrep : (ro,euro : Str) -> Prep
|
||||||
|
= \ro,euro -> lin Prep (ResKor.mkPrep2 ro euro) ;
|
||||||
mkPrep : (dwie : Str) -> (attaches : Bool) -> Prep -- `mkPrep "뒤에" False` for a postposition that doesn't attach to the NP.
|
mkPrep : (dwie : Str) -> (attaches : Bool) -> Prep -- `mkPrep "뒤에" False` for a postposition that doesn't attach to the NP.
|
||||||
= \dwie,f -> lin Prep (ResKor.mkPrep dwie ** {attaches = f}) ;
|
= \dwie,f -> lin Prep (ResKor.mkPrep dwie ** {attaches = f}) ;
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -123,9 +123,13 @@ oper
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Postpositions
|
-- Postpositions
|
||||||
|
|
||||||
Postposition : Type = {s : Str ; attaches : Bool} ;
|
Postposition : Type = {s : Phono => Str ; attaches : Bool} ;
|
||||||
|
|
||||||
mkPrep : Str -> Postposition = \str -> {s=str ; attaches=True} ;
|
mkPrep : Str -> Postposition = \str -> {s=\\_ => str ; attaches=True} ;
|
||||||
|
mkPrep2 : (ro,euro : Str) -> Postposition = \ro,euro -> {
|
||||||
|
s = table {Vowel => ro ; Consonant => euro} ;
|
||||||
|
attaches = True
|
||||||
|
} ;
|
||||||
|
|
||||||
emptyPP : Postposition = mkPrep [] ** {attaches=False} ;
|
emptyPP : Postposition = mkPrep [] ** {attaches=False} ;
|
||||||
datPP : Postposition = mkPrep "에게" ;
|
datPP : Postposition = mkPrep "에게" ;
|
||||||
@@ -296,7 +300,7 @@ oper
|
|||||||
useVc : Verb2 -> VPSlash = \v2 -> baseVP ** v2 ;
|
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 ! np.p
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertAdv : VerbPhrase -> SS -> VerbPhrase = \vp,adv -> vp ** {adv = adv.s} ;
|
insertAdv : VerbPhrase -> SS -> VerbPhrase = \vp,adv -> vp ** {adv = adv.s} ;
|
||||||
|
|||||||
Reference in New Issue
Block a user