1
0
forked from GitHub/gf-rgl

(Kor) Add AForm, change VP and Comp.

This commit is contained in:
Inari Listenmaa
2020-03-11 16:54:02 +01:00
parent 30ce18e124
commit c31c00dd83
5 changed files with 28 additions and 18 deletions

View File

@@ -37,6 +37,7 @@ concrete AdjectiveKor of Adjective = CatKor ** open ResKor, Prelude in {
-- : Ord -> AP ; -- warmest -- : Ord -> AP ; -- warmest
AdjOrd ord = ord ** { AdjOrd ord = ord ** {
s = \\_ => ord.s ;
compar = [] compar = []
} ; } ;

View File

@@ -29,7 +29,7 @@ concrete LexiconKor of Lexicon = CatKor **
-- lin beer_N = mkN "" ; -- lin beer_N = mkN "" ;
-- lin beg_V2V = mkV2 "" ; -- lin beg_V2V = mkV2 "" ;
-- lin belly_N = mkN "" ; -- lin belly_N = mkN "" ;
-- lin big_A = mkA "" ; lin big_A = mkA "크다" ;
-- lin bike_N = mkN "" ; -- lin bike_N = mkN "" ;
-- lin bird_N = mkN "" ; -- lin bird_N = mkN "" ;
-- lin bite_V2 = mkV2 "" ; -- lin bite_V2 = mkV2 "" ;
@@ -325,7 +325,7 @@ lin person_N = mkN "사람" ;
-- lin skin_N = mkN "" ; -- lin skin_N = mkN "" ;
-- lin sky_N = mkN "" ; -- lin sky_N = mkN "" ;
-- lin sleep_V = mkV "" ; -- lin sleep_V = mkV "" ;
lin small_A = mkA "작아" ; lin small_A = mkA "작아" ;
-- lin smell_V = mkV "" ; -- lin smell_V = mkV "" ;
-- lin smoke_N = mkN "" ; -- lin smoke_N = mkN "" ;
-- lin smooth_A = mkA "" ; -- lin smooth_A = mkA "" ;

View File

@@ -9,7 +9,7 @@ The difference in the way these words are written has to do with the productivit
oper oper
v : pattern Str = #("아" | "이" | "어" | 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? -- maybe subpatterns for diphthongs?
-- c : pattern Str = #("m"|"n"|"p"|"b"|"t"|"d"|"k"|"g"|"f"|"v" -- c : pattern Str = #("m"|"n"|"p"|"b"|"t"|"d"|"k"|"g"|"f"|"v"
@@ -22,6 +22,8 @@ oper
-- _ => s } ; -- _ => s } ;
vowFinal : Str -> Bool = \str ->
case str of {_ + #v => True ; _ => False} ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Morphophonology -- Morphophonology
@@ -41,11 +43,11 @@ param
oper oper
allomorph : NForm -> Str -> Str = \nf,s -> allomorph : NForm -> Str -> Str = \nf,s ->
let endsInV : Bool = case s of {_ + #v => True ; _ => False} ; let finalV : Bool = vowFinal s ;
in case nf of { in case nf of {
Topic => if_then_Str endsInV "은" "는" ; Topic => if_then_Str finalV "은" "는" ;
Subject => if_then_Str endsInV "이" "가" ; Subject => if_then_Str finalV "이" "가" ;
Object => if_then_Str endsInV "을" "를" ; Object => if_then_Str finalV "을" "를" ;
Bare => [] Bare => []
} ; } ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -100,20 +100,28 @@ oper
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Adjectives -- Adjectives
Adjective : Type = SS ; -- {s : AForm => Str} ; Adjective : Type = {s : AForm => Str} ;
Adjective2 : Type = Adjective ; 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} ; AdjPhrase : Type = Adjective ** {compar : Str} ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Verbs -- Verbs
BaseVerb : Type = { BaseVerb : Type = {
s : VForm => Str ;
type : VerbType ; type : VerbType ;
} ; } ;
Verb : Type = BaseVerb ** { Verb : Type = BaseVerb ** {
s : VForm => Str ;
} ; } ;
Verb2 : Type = Verb ; -- ** {c2 : Postposition} ; Verb2 : Type = Verb ; -- ** {c2 : Postposition} ;
Verb3 : Type = Verb ; -- ** {c3 : Postposition} ; Verb3 : Type = Verb ; -- ** {c3 : Postposition} ;
@@ -143,13 +151,13 @@ oper
-- VP -- VP
Complement : Type = { Complement : Type = {
aComp : Str ; -- AForm => Str ; s : VForm => Str ;
nComp : Str ; nComp : Str ;
-- compar : Str ; -- comparative is discontinuous -- compar : Str ; -- comparative is discontinuous
} ; } ;
emptyComp : Complement = { emptyComp : Complement = {
aComp = [] ; s = \\_ => [] ;
nComp = [] ; nComp = [] ;
-- compar : Str ; -- compar : Str ;
} ; } ;
@@ -164,9 +172,8 @@ oper
VPSlash : Type = VerbPhrase ; VPSlash : Type = VerbPhrase ;
useV : Verb -> VerbPhrase = \v -> v ** { useV : Verb -> VerbPhrase = \v -> v ** {
aComp = [] ; -- \\_ => [] ; vComp,
nComp = [] ; nComp = [] ;
vComp = [] ;
} ; } ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Cl, S -- Cl, S
@@ -188,7 +195,7 @@ oper
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** { predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
s = \\t,a,p => np.s ! Topic 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 ++ vp.s ! VFin Gnomic Pos -- TODO: actual forms
} ; } ;

View File

@@ -114,12 +114,12 @@ lin
-- : AP -> Comp ; -- : AP -> Comp ;
CompAP ap = emptyComp ** { CompAP ap = emptyComp ** {
aComp = ap.s ; s = \\vf => ap.s ! APred vf ;
} ; } ;
-- : CN -> Comp ; -- : CN -> Comp ;
CompCN cn = emptyComp ** { 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 ; -- NP -> Comp ;
@@ -129,7 +129,7 @@ lin
-- : Adv -> Comp ; -- : Adv -> Comp ;
CompAdv adv = emptyComp ** { CompAdv adv = emptyComp ** {
aComp = adv.s ; nComp = adv.s ;
} ; } ;
-- : VP -- Copula alone; -- : VP -- Copula alone;