mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
(Kor) Fixes in adverbs + related unit tests
This commit is contained in:
@@ -11,7 +11,11 @@ lin
|
||||
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
||||
|
||||
-- : Prep -> NP -> Adv ;
|
||||
PrepNP prep np = {s = glue (np.s ! Bare) prep.s} ;
|
||||
PrepNP prep np = {
|
||||
s = case prep.attaches of {
|
||||
True => glue (np.s ! Bare) prep.s ;
|
||||
False => np.s ! Bare ++ prep.s }
|
||||
} ;
|
||||
|
||||
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
||||
|
||||
|
||||
@@ -65,8 +65,10 @@ oper
|
||||
|
||||
--2 Structural categories
|
||||
|
||||
-- mkPrep = overload {
|
||||
-- } ;
|
||||
mkPrep : overload {
|
||||
mkPrep : (e : Str) -> Prep ; -- Particle like 에, attaches to the NP.
|
||||
mkPrep : (dwie : Str) -> (attaches : Bool) -> Prep ; -- `mkPrep "뒤에" False` for a postposition that doesn't attach to the NP.
|
||||
} ;
|
||||
|
||||
-- mkConj : (_,_ : Str) -> Number -> Conj = \s1,s2,num ->
|
||||
-- lin Conj { s = s1 ; s2 = s2 } ;
|
||||
@@ -128,6 +130,12 @@ oper
|
||||
-- mkVV = overload {
|
||||
-- } ;
|
||||
|
||||
mkPrep = overload {
|
||||
mkPrep : (e : Str) -> Prep -- Particle like 에, attaches to the NP.
|
||||
= \e -> lin Prep (ResKor.mkPrep e) ;
|
||||
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}) ;
|
||||
} ;
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
}
|
||||
|
||||
@@ -121,11 +121,11 @@ oper
|
||||
--------------------------------------------------------------------------------
|
||||
-- Postpositions
|
||||
|
||||
Postposition : Type = SS ;
|
||||
Postposition : Type = {s : Str ; attaches : Bool} ;
|
||||
|
||||
mkPrep : Str -> Postposition = \str -> ss str ;
|
||||
mkPrep : Str -> Postposition = \str -> {s=str ; attaches=True} ;
|
||||
|
||||
emptyPP : Postposition = mkPrep [] ;
|
||||
emptyPP : Postposition = mkPrep [] ** {attaches=False} ;
|
||||
datPP : Postposition = mkPrep "에게" ;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@@ -96,7 +96,7 @@ oper
|
||||
-- lin above_Prep = mkPrep ""
|
||||
-- lin after_Prep = mkPrep ""
|
||||
-- lin before_Prep = mkPrep "" ;
|
||||
-- lin behind_Prep = mkPrep "" ;
|
||||
lin behind_Prep = mkPrep "뒤에" False ;
|
||||
-- lin between_Prep = = mkPrep "" ;
|
||||
-- lin by8agent_Prep = mkPrep ;
|
||||
-- lin by8means_Prep = mkPrep ;
|
||||
|
||||
@@ -130,7 +130,7 @@ lin
|
||||
|
||||
-- : Adv -> Comp ;
|
||||
CompAdv adv = emptyComp ** {
|
||||
s = \\vf => adv.s ++ copula.s ! vf ;
|
||||
s = \\vf => adv.s ++ have_V.s ! vf ;
|
||||
} ;
|
||||
|
||||
-- : VP -- Copula alone;
|
||||
|
||||
7
src/korean/unittest/adverb.gftest
Normal file
7
src/korean/unittest/adverb.gftest
Normal file
@@ -0,0 +1,7 @@
|
||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseComp (CompAdv (PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN house_N)))))))) NoVoc
|
||||
LangEng: the cat is in the house
|
||||
LangKor: 고양이가 집 BIND 에서 있어요
|
||||
|
||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseComp (CompAdv (PrepNP behind_Prep (DetCN (DetQuant DefArt NumSg) (UseN house_N)))))))) NoVoc
|
||||
LangEng: the cat is behind the house
|
||||
LangKor: 고양이가 집 뒤에 있어요
|
||||
Reference in New Issue
Block a user