1
0
forked from GitHub/gf-rgl

(Kor) Remove neg form from A's and V's worst-case constructor

This commit is contained in:
Inari Listenmaa
2020-04-07 16:54:11 +02:00
parent ef06c0d3c0
commit e54743feaf
3 changed files with 13 additions and 16 deletions

View File

@@ -36,7 +36,7 @@ lin big_A = mkA "크다" ;
lin black_A = mkA "검다" ; lin black_A = mkA "검다" ;
-- lin blood_N = mkN "" ; -- lin blood_N = mkN "" ;
-- lin blow_V = mkV "" ; -- lin blow_V = mkV "" ;
lin blue_A = mkA "파랗다" "파래요" "파랗습니다" "파랗지" "파란" ; lin blue_A = mkA "파랗다" "파래요" "파랗습니다" "파란" ;
-- lin boat_N = mkN "" ; -- lin boat_N = mkN "" ;
-- lin bone_N = mkN "" ; -- lin bone_N = mkN "" ;
-- lin boot_N = mkN "" ; -- lin boot_N = mkN "" ;

View File

@@ -27,7 +27,7 @@ oper
mkA : overload { mkA : overload {
mkA : (adj : Str) -> A ; -- Regular adjective, given in -다 form mkA : (adj : Str) -> A ; -- Regular adjective, given in -다 form
mkA : (kiga : Str) -> (jakda : A) -> A ; -- Compound adjective, e.g. 키가 작다 'short', literally 'height (is) small'. 키가 'height' given as string, 작다 'small' given as preconstructed A. mkA : (kiga : Str) -> (jakda : A) -> A ; -- Compound adjective, e.g. 키가 작다 'short', literally 'height (is) small'. 키가 'height' given as string, 작다 'small' given as preconstructed A.
mkA : (plain,polite,formal,neg,attr : Str) -> A ; -- Worst case constructor: e.g. mkA "파랗다" "파래요" "파랗습니다" "파랗지" "파란" mkA : (plain,polite,formal,attr : Str) -> A ; -- Worst case constructor: e.g. mkA "파랗다" "파래요" "파랗습니다" "파란"
} ; } ;
mkA2 : overload { mkA2 : overload {
@@ -44,7 +44,7 @@ oper
mkV : overload { mkV : overload {
mkV : (plain : Str) -> V ; -- Predictable verb. Takes plain, uninflected -다 form, e.g. 가다 mkV : (plain : Str) -> V ; -- Predictable verb. Takes plain, uninflected -다 form, e.g. 가다
mkV : (nore : Str) -> (hada : V) -> V ; -- Add a prefix to an existing verb, e.g. 노래+하다 mkV : (nore : Str) -> (hada : V) -> V ; -- Add a prefix to an existing verb, e.g. 노래+하다
mkV : (plain,polite,formal,neg,attr : Str) -> V ; -- Worst case constructor: e.g. mkV "다르다" "달라요" "다릅니다" "다르지" "다른" mkV : (plain,polite,formal,attr : Str) -> V ; -- Worst case constructor: e.g. mkV "다르다" "달라요" "다릅니다" "다른"
} ; } ;
copula : V ; -- The copula verb '' copula : V ; -- The copula verb ''
@@ -135,8 +135,8 @@ oper
mkA : (adj : Str) -> A = \s -> lin A (mkAdj s) ; mkA : (adj : Str) -> A = \s -> lin A (mkAdj s) ;
mkA : (kiga : Str) -> (jakda : A) -> A = \kiga,jakda -> mkA : (kiga : Str) -> (jakda : A) -> A = \kiga,jakda ->
jakda ** {s = \\af => kiga ++ jakda.s ! af} ; jakda ** {s = \\af => kiga ++ jakda.s ! af} ;
mkA : (x1,_,_,_,x5 : Str) -> A mkA : (plain,polite,formal,attr : Str) -> A
= \x1,x2,x3,x4,x5 -> lin A (mkAdjReg x1 x2 x3 x4 x5) ; = \x1,x2,x3,x4 -> lin A (mkAdjReg x1 x2 x3 x4) ;
} ; } ;
mkA2 = overload { mkA2 = overload {
@@ -152,8 +152,8 @@ oper
mkV : (plain : Str) -> V = \v -> lin V (mkVerb v) ; mkV : (plain : Str) -> V = \v -> lin V (mkVerb v) ;
mkV : (nore : Str) -> (hada : V) -> V = \nore,hada -> hada ** { mkV : (nore : Str) -> (hada : V) -> V = \nore,hada -> hada ** {
s = \\vf => nore + hada.s ! vf} ; s = \\vf => nore + hada.s ! vf} ;
mkV : (plain,polite,formal,neg,attr : Str) -> V mkV : (plain,polite,formal,attr : Str) -> V
= \x1,x2,x3,x4,x5 -> lin V (mkVerbReg x1 x2 x3 x4 x5) ; = \x1,x2,x3,x4 -> lin V (mkVerbReg x1 x2 x3 x4) ;
} ; } ;
copula = ResKor.copula ; copula = ResKor.copula ;

View File

@@ -144,8 +144,6 @@ oper
Adjective : Type = {s : VForm => Str} ; -- Adjectives are verbs Adjective : Type = {s : VForm => Str} ; -- Adjectives are verbs
Adjective2 : Type = Adjective ** {p2 : Postposition} ; Adjective2 : Type = Adjective ** {p2 : Postposition} ;
v2a : (attrpos : Str) -> Verb -> Adjective = \attrpos,v -> { v2a : (attrpos : Str) -> Verb -> Adjective = \attrpos,v -> {
s = table { s = table {
VAttr Pos => attrpos ; -- Positive Attr is different in VAttr Pos => attrpos ; -- Positive Attr is different in
@@ -158,8 +156,8 @@ oper
attrpos : Str = add_N stem ; attrpos : Str = add_N stem ;
in v2a attrpos v ; in v2a attrpos v ;
mkAdjReg : (x1,_,_,_,x5 : Str) -> Adjective = \plain,polite,formal,neg,attr -> mkAdjReg : (x1,_,_,x4 : Str) -> Adjective = \plain,polite,formal,attr ->
v2a attr (mkVerbReg plain polite formal neg attr) ; v2a attr (mkVerbReg plain polite formal attr) ;
atoa2 : Adjective -> Adjective2 = \a -> a ** {c2=Bare ; p2=emptyPP} ; atoa2 : Adjective -> Adjective2 = \a -> a ** {c2=Bare ; p2=emptyPP} ;
@@ -185,9 +183,8 @@ oper
formal = case vowFinal stem of { formal = case vowFinal stem of {
True => add_B stem + "니다" ; True => add_B stem + "니다" ;
False => stem + "습니다" } ; False => stem + "습니다" } ;
neg = stem + "지" ;
attrpos = stem + "는" ; attrpos = stem + "는" ;
in mkVerbReg plain polite formal neg attrpos ; in mkVerbReg plain polite formal attrpos ;
mkVerb2 : (plain : Str) -> Verb2 = \plain -> vtov2 (mkVerb plain) ; mkVerb2 : (plain : Str) -> Verb2 = \plain -> vtov2 (mkVerb plain) ;
mkVerb3 : (plain : Str) -> Verb3 = \plain -> v2tov3 (mkVerb2 plain) ; mkVerb3 : (plain : Str) -> Verb3 = \plain -> v2tov3 (mkVerb2 plain) ;
@@ -196,9 +193,10 @@ oper
v2tov3 : Verb2 -> Verb3 = \v -> v ** {c3 = Bare ; p3 = datPP} ; v2tov3 : Verb2 -> Verb3 = \v -> v ** {c3 = Bare ; p3 = datPP} ;
-- ㄹ-irregulars, ㅎ-irregular -- ㄹ-irregulars, ㅎ-irregular
mkVerbReg : (x1,_,_,_,x5 : Str) -> Verb = mkVerbReg : (x1,_,_,x4 : Str) -> Verb =
\plain,polite,formal,neg,attrpos -> \plain,polite,formal,attrpos ->
let stem = init plain ; let stem = init plain ;
neg = stem + "지" ;
attrneg = neg ++ "않는" ; attrneg = neg ++ "않는" ;
planeg = neg ++ negForms ! Plain ; planeg = neg ++ negForms ! Plain ;
polneg = neg ++ negForms ! Polite ; polneg = neg ++ negForms ! Polite ;
@@ -255,7 +253,6 @@ oper
"하다" "하다"
"해요" "해요"
"합니다" "합니다"
"하지"
"한" ; "한" ;
negForms : Style => Str = negForms : Style => Str =