forked from GitHub/gf-rgl
(Kor) Add AForm, change VP and Comp.
This commit is contained in:
@@ -37,6 +37,7 @@ concrete AdjectiveKor of Adjective = CatKor ** open ResKor, Prelude in {
|
||||
|
||||
-- : Ord -> AP ; -- warmest
|
||||
AdjOrd ord = ord ** {
|
||||
s = \\_ => ord.s ;
|
||||
compar = []
|
||||
} ;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ concrete LexiconKor of Lexicon = CatKor **
|
||||
-- lin beer_N = mkN "" ;
|
||||
-- lin beg_V2V = mkV2 "" ;
|
||||
-- lin belly_N = mkN "" ;
|
||||
-- lin big_A = mkA "" ;
|
||||
lin big_A = mkA "크다" ;
|
||||
-- lin bike_N = mkN "" ;
|
||||
-- lin bird_N = mkN "" ;
|
||||
-- lin bite_V2 = mkV2 "" ;
|
||||
@@ -325,7 +325,7 @@ lin person_N = mkN "사람" ;
|
||||
-- lin skin_N = mkN "" ;
|
||||
-- lin sky_N = mkN "" ;
|
||||
-- lin sleep_V = mkV "" ;
|
||||
lin small_A = mkA "작아" ;
|
||||
lin small_A = mkA "작아다" ;
|
||||
-- lin smell_V = mkV "" ;
|
||||
-- lin smoke_N = mkN "" ;
|
||||
-- lin smooth_A = mkA "" ;
|
||||
|
||||
@@ -9,7 +9,7 @@ The difference in the way these words are written has to do with the productivit
|
||||
|
||||
oper
|
||||
v : pattern Str = #("아" | "이" | "어" |
|
||||
"가" | "개" | "갸" | "걔" | "거" | "게" | "겨" | "계" | "고" | "과" | "괘" | "괴" | "교" | "구" | "궈" | "궤" | "귀" | "규" | "그" | "긔" | "기") ; -- TODO: figure out if this is a smart way to do it; if no better way, then complete the table.
|
||||
"가" | "개" | "갸" | "걔" | "거" | "게" | "겨" | "계" | "고" | "과" | "괘" | "괴" | "교" | "구" | "궈" | "궤" | "귀" | "규" | "그" | "긔" | "기" | "크") ; -- TODO: figure out if this is a smart way to do it; if no better way, then complete the table.
|
||||
-- maybe subpatterns for diphthongs?
|
||||
|
||||
-- c : pattern Str = #("m"|"n"|"p"|"b"|"t"|"d"|"k"|"g"|"f"|"v"
|
||||
@@ -22,6 +22,8 @@ oper
|
||||
-- _ => s } ;
|
||||
|
||||
|
||||
vowFinal : Str -> Bool = \str ->
|
||||
case str of {_ + #v => True ; _ => False} ;
|
||||
--------------------------------------------------------------------------------
|
||||
-- Morphophonology
|
||||
|
||||
@@ -41,11 +43,11 @@ param
|
||||
oper
|
||||
|
||||
allomorph : NForm -> Str -> Str = \nf,s ->
|
||||
let endsInV : Bool = case s of {_ + #v => True ; _ => False} ;
|
||||
let finalV : Bool = vowFinal s ;
|
||||
in case nf of {
|
||||
Topic => if_then_Str endsInV "은" "는" ;
|
||||
Subject => if_then_Str endsInV "이" "가" ;
|
||||
Object => if_then_Str endsInV "을" "를" ;
|
||||
Topic => if_then_Str finalV "은" "는" ;
|
||||
Subject => if_then_Str finalV "이" "가" ;
|
||||
Object => if_then_Str finalV "을" "를" ;
|
||||
Bare => []
|
||||
} ;
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@@ -100,20 +100,28 @@ oper
|
||||
--------------------------------------------------------------------------------
|
||||
-- Adjectives
|
||||
|
||||
Adjective : Type = SS ; -- {s : AForm => Str} ;
|
||||
Adjective : Type = {s : AForm => Str} ;
|
||||
Adjective2 : Type = Adjective ;
|
||||
|
||||
mkAdj : Str -> Adjective = \str -> {s = str} ;
|
||||
mkAdj : Str -> Adjective = \inf -> let stem = init inf in {
|
||||
s = table {
|
||||
AAttr => stem + if_then_Str (vowFinal stem) "ᆫ" "은" ;
|
||||
APred VInf => inf ;
|
||||
APred (VFin Gnomic Pos) => stem + "ᆸ니다" ;
|
||||
APred (VFin Gnomic Pos) => "안" ++ stem + "ᆸ니다" ; -- TODO check
|
||||
APred _ => stem ++ "TODO: proper adjective inflection"
|
||||
}
|
||||
} ;
|
||||
|
||||
AdjPhrase : Type = Adjective ** {compar : Str} ;
|
||||
--------------------------------------------------------------------------------
|
||||
-- Verbs
|
||||
|
||||
BaseVerb : Type = {
|
||||
s : VForm => Str ;
|
||||
type : VerbType ;
|
||||
} ;
|
||||
Verb : Type = BaseVerb ** {
|
||||
s : VForm => Str ;
|
||||
} ;
|
||||
Verb2 : Type = Verb ; -- ** {c2 : Postposition} ;
|
||||
Verb3 : Type = Verb ; -- ** {c3 : Postposition} ;
|
||||
@@ -143,13 +151,13 @@ oper
|
||||
-- VP
|
||||
|
||||
Complement : Type = {
|
||||
aComp : Str ; -- AForm => Str ;
|
||||
s : VForm => Str ;
|
||||
nComp : Str ;
|
||||
-- compar : Str ; -- comparative is discontinuous
|
||||
} ;
|
||||
|
||||
emptyComp : Complement = {
|
||||
aComp = [] ;
|
||||
s = \\_ => [] ;
|
||||
nComp = [] ;
|
||||
-- compar : Str ;
|
||||
} ;
|
||||
@@ -164,9 +172,8 @@ oper
|
||||
VPSlash : Type = VerbPhrase ;
|
||||
|
||||
useV : Verb -> VerbPhrase = \v -> v ** {
|
||||
aComp = [] ; -- \\_ => [] ;
|
||||
vComp,
|
||||
nComp = [] ;
|
||||
vComp = [] ;
|
||||
} ;
|
||||
--------------------------------------------------------------------------------
|
||||
-- Cl, S
|
||||
@@ -188,7 +195,7 @@ oper
|
||||
|
||||
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
|
||||
s = \\t,a,p => np.s ! Topic
|
||||
++ vp.aComp ++ vp.nComp -- TODO: embed copula into complement
|
||||
++ vp.nComp -- TODO: embed copula into complement
|
||||
++ vp.s ! VFin Gnomic Pos -- TODO: actual forms
|
||||
} ;
|
||||
|
||||
|
||||
@@ -114,12 +114,12 @@ lin
|
||||
|
||||
-- : AP -> Comp ;
|
||||
CompAP ap = emptyComp ** {
|
||||
aComp = ap.s ;
|
||||
s = \\vf => ap.s ! APred vf ;
|
||||
} ;
|
||||
|
||||
-- : CN -> Comp ;
|
||||
CompCN cn = emptyComp ** {
|
||||
aComp = cn.s ! Bare ; -- TODO: num. I am [a house that sleeps here] vs. we are [houses that sleep here]
|
||||
nComp = cn.s ! Bare ; -- TODO: num. I am [a house that sleeps here] vs. we are [houses that sleep here]
|
||||
} ;
|
||||
|
||||
-- NP -> Comp ;
|
||||
@@ -129,7 +129,7 @@ lin
|
||||
|
||||
-- : Adv -> Comp ;
|
||||
CompAdv adv = emptyComp ** {
|
||||
aComp = adv.s ;
|
||||
nComp = adv.s ;
|
||||
} ;
|
||||
|
||||
-- : VP -- Copula alone;
|
||||
|
||||
Reference in New Issue
Block a user