forked from GitHub/gf-rgl
(Kor) Add unit tests about verb inflection
This commit is contained in:
@@ -74,7 +74,7 @@ lin cat_N = mkN "고양이" ;
|
|||||||
-- lin cloud_N = mkN "" ;
|
-- lin cloud_N = mkN "" ;
|
||||||
-- lin coat_N = mkN "" ;
|
-- lin coat_N = mkN "" ;
|
||||||
-- lin cold_A = mkA "" ;
|
-- lin cold_A = mkA "" ;
|
||||||
-- lin come_V = mkV "" ;
|
lin come_V = mkV "오다" ;
|
||||||
-- lin computer_N = mkN "" ;
|
-- lin computer_N = mkN "" ;
|
||||||
-- lin correct_A = mkA "" ;
|
-- lin correct_A = mkA "" ;
|
||||||
-- lin count_V2 = mkV2 "" ;
|
-- lin count_V2 = mkV2 "" ;
|
||||||
@@ -105,7 +105,7 @@ lin cat_N = mkN "고양이" ;
|
|||||||
|
|
||||||
-- lin ear_N = mkN "" ;
|
-- lin ear_N = mkN "" ;
|
||||||
-- lin earth_N = mkN "" ;
|
-- lin earth_N = mkN "" ;
|
||||||
-- lin eat_V2 = mkV2 "" ;
|
lin eat_V2 = mkV2 "먹다" ;
|
||||||
-- lin egg_N = mkN "" ;
|
-- lin egg_N = mkN "" ;
|
||||||
-- lin empty_A = mkA "" ;
|
-- lin empty_A = mkA "" ;
|
||||||
-- lin enemy_N = mkN "" ;
|
-- lin enemy_N = mkN "" ;
|
||||||
@@ -148,11 +148,11 @@ lin cat_N = mkN "고양이" ;
|
|||||||
|
|
||||||
-- lin garden_N = mkN "" ;
|
-- lin garden_N = mkN "" ;
|
||||||
lin girl_N = mkN "여자아이" ;
|
lin girl_N = mkN "여자아이" ;
|
||||||
-- lin give_V3 = mkV3 "" ;
|
lin give_V3 = mkV3 "주다" ;
|
||||||
-- lin glove_N = mkN "" ;
|
-- lin glove_N = mkN "" ;
|
||||||
-- lin go_V = mkV "" ;
|
lin go_V = mkV "가다" ;
|
||||||
-- lin gold_N = mkN "" ;
|
-- lin gold_N = mkN "" ;
|
||||||
-- lin good_A = mkA "" ;
|
lin good_A = mkA "좋다" ;
|
||||||
-- lin grammar_N = mkN "" ;
|
-- lin grammar_N = mkN "" ;
|
||||||
-- lin grass_N = mkN "" ;
|
-- lin grass_N = mkN "" ;
|
||||||
-- lin green_A = mkA "" ;
|
-- lin green_A = mkA "" ;
|
||||||
@@ -202,7 +202,7 @@ lin house_N = mkN "집" ;
|
|||||||
-- lin lake_N = mkN "" ;
|
-- lin lake_N = mkN "" ;
|
||||||
-- lin lamp_N = mkN "" ;
|
-- lin lamp_N = mkN "" ;
|
||||||
-- lin language_N = mkN "" ;
|
-- lin language_N = mkN "" ;
|
||||||
-- lin laugh_V = mkV "" ;
|
lin laugh_V = mkV "웃다" ;
|
||||||
-- lin leaf_N = mkN "" ;
|
-- lin leaf_N = mkN "" ;
|
||||||
-- lin learn_V2 = mkV2 "" ;
|
-- lin learn_V2 = mkV2 "" ;
|
||||||
-- lin leather_N = mkN "" ;
|
-- lin leather_N = mkN "" ;
|
||||||
@@ -305,7 +305,7 @@ lin person_N = mkN "사람" ;
|
|||||||
-- lin science_N = mkN "" ;
|
-- lin science_N = mkN "" ;
|
||||||
-- lin scratch_V2 = mkV2 "" ;
|
-- lin scratch_V2 = mkV2 "" ;
|
||||||
-- lin sea_N = mkN "" ;
|
-- lin sea_N = mkN "" ;
|
||||||
-- lin see_V2 = mkV2 "" ;
|
lin see_V2 = mkV2 "보다" ;
|
||||||
-- lin seed_N = mkN "" ;
|
-- lin seed_N = mkN "" ;
|
||||||
-- lin seek_V2 = mkV2 "" ;
|
-- lin seek_V2 = mkV2 "" ;
|
||||||
-- lin sell_V3 = mkV3 "" ;
|
-- lin sell_V3 = mkV3 "" ;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ oper
|
|||||||
-- To abstract over number, valency and (some) case names,
|
-- To abstract over number, valency and (some) case names,
|
||||||
-- we define the following identifiers. The application programmer
|
-- we define the following identifiers. The application programmer
|
||||||
-- should always use these constants instead of the constructors
|
-- should always use these constants instead of the constructors
|
||||||
-- defined in $ResSom$.
|
-- defined in $ResKor$.
|
||||||
|
|
||||||
|
|
||||||
--2 Nouns
|
--2 Nouns
|
||||||
@@ -28,14 +28,14 @@ oper
|
|||||||
|
|
||||||
-- Verbs
|
-- Verbs
|
||||||
mkV : overload {
|
mkV : overload {
|
||||||
mkV : (inf : Str) -> V ; -- Predictable verb: infinitive form as argument
|
mkV : (plain : Str) -> V ; -- Predictable verb: plaininitive form as argument
|
||||||
-- mkV : Str -> V -> V -- Add a prefix to an existing verb, e.g. u baahan+ahay
|
-- mkV : Str -> V -> V -- Add a prefix to an existing verb, e.g. u baahan+ahay
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
copula : V ; -- The copula verb ''
|
copula : V ; -- The copula verb ''
|
||||||
|
|
||||||
mkV2 : overload {
|
mkV2 : overload {
|
||||||
mkV2 : (inf : Str) -> V2 ;
|
mkV2 : (plain : Str) -> V2 ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- mkV3 : overload {
|
-- mkV3 : overload {
|
||||||
@@ -102,7 +102,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV = overload {
|
mkV = overload {
|
||||||
mkV : (inf : Str) -> V = \v -> lin V (mkVerb v Active) ;
|
mkV : (plain : Str) -> V = \v -> lin V (mkVerb v Active) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
copula = ResKor.copula ;
|
copula = ResKor.copula ;
|
||||||
@@ -111,11 +111,12 @@ oper
|
|||||||
-- } ;
|
-- } ;
|
||||||
|
|
||||||
mkV2 = overload {
|
mkV2 = overload {
|
||||||
mkV2 : (inf : Str) -> V2 = \v2 -> lin V2 (mkVerb2 v2) ;
|
mkV2 : (plain : Str) -> V2 = \v2 -> lin V2 (mkVerb2 v2) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkV3 = overload {
|
||||||
|
mkV3 : (plain : Str) -> V3 = \v3 -> lin V3 (mkVerb3 v3) ;
|
||||||
} ;
|
} ;
|
||||||
--
|
|
||||||
-- mkV3 = overload {
|
|
||||||
-- } ;
|
|
||||||
--
|
--
|
||||||
-- mkVV = overload {
|
-- mkVV = overload {
|
||||||
-- } ;
|
-- } ;
|
||||||
|
|||||||
@@ -152,6 +152,10 @@ oper
|
|||||||
let v = mkVerb plain Active
|
let v = mkVerb plain Active
|
||||||
in v ** {c2 = Object ; p2 = emptyPP} ;
|
in v ** {c2 = Object ; p2 = emptyPP} ;
|
||||||
|
|
||||||
|
mkVerb3 : (plain : Str) -> Verb3 = \plain ->
|
||||||
|
let v = mkVerb2 plain
|
||||||
|
in v ** {c3 = Bare ; p3 = emptyPP} ;
|
||||||
|
|
||||||
mkVerbFull : (x1,_,_,_,_,x6 : Str) -> VerbType -> Verb =
|
mkVerbFull : (x1,_,_,_,_,x6 : Str) -> VerbType -> Verb =
|
||||||
\plain,polite,formal,planeg,polneg,formneg,vt -> {
|
\plain,polite,formal,planeg,polneg,formneg,vt -> {
|
||||||
s = table {
|
s = table {
|
||||||
|
|||||||
31
src/korean/unittest/inflection.gftest
Normal file
31
src/korean/unittest/inflection.gftest
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
-----------------------
|
||||||
|
-- Verb inflection --
|
||||||
|
-- (Polite informal) --
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
-- Regular
|
||||||
|
Lang: eat_V2
|
||||||
|
LangKor: 먹어요
|
||||||
|
|
||||||
|
Lang: UseComp (CompAP (PositA good_A))
|
||||||
|
LangKor: 좋어요
|
||||||
|
|
||||||
|
-- Final ㅏ or ㅓ does not repeat itself
|
||||||
|
Lang: go_V
|
||||||
|
LangKor: 가요
|
||||||
|
|
||||||
|
-- Monosyllabic 으-final is dropped
|
||||||
|
Lang: UseComp (CompAP (PositA big_A))
|
||||||
|
LangKor: 커요
|
||||||
|
|
||||||
|
-- Final ㅗ + -아요 becomes ㅘ요
|
||||||
|
Lang: see_V2
|
||||||
|
LangKor: 봐요
|
||||||
|
|
||||||
|
Lang: come_V
|
||||||
|
LangKor: 와요
|
||||||
|
|
||||||
|
-- Final ㅜ + -어요 becomes ㅝ요
|
||||||
|
Lang: give_V3
|
||||||
|
LangKor: 줘요
|
||||||
Reference in New Issue
Block a user