(Kor) Add present tense in 3 politeness forms, subj+obj cases in V*

This commit is contained in:
Inari Listenmaa
2020-03-24 13:40:21 +01:00
parent 779c8d7609
commit ebd250e063
4 changed files with 60 additions and 38 deletions

View File

@@ -102,7 +102,7 @@ oper
} ; } ;
mkV = overload { mkV = overload {
mkV : (inf : Str) -> V = \v -> lin V (mkVerb v) ; mkV : (inf : Str) -> V = \v -> lin V (mkVerb v Active) ;
} ; } ;
copula = ResKor.copula ; copula = ResKor.copula ;
@@ -111,7 +111,7 @@ oper
-- } ; -- } ;
mkV2 = overload { mkV2 = overload {
mkV2 : (inf : Str) -> V2 = \v2 -> lin V2 (mkVerb v2) ; mkV2 : (inf : Str) -> V2 = \v2 -> lin V2 (mkVerb2 v2) ;
} ; } ;
-- --
-- mkV3 = overload { -- mkV3 = overload {

Binary file not shown.

View File

@@ -105,14 +105,12 @@ oper
Adjective : Type = {s : AForm => Str} ; Adjective : Type = {s : AForm => Str} ;
Adjective2 : Type = Adjective ; Adjective2 : Type = Adjective ;
mkAdj : Str -> Adjective = \inf -> let stem = init inf in { mkAdj : Str -> Adjective = \plain ->
s = table { let stem = init plain ;
AAttr => add_N stem ; verb = mkVerb stem Stative ;
APred VInf => inf ; in {
APred (VFin Gnomic Pos) => add_B stem + "니다" ; s = table { AAttr => add_N stem ;
APred (VFin Gnomic Neg) => "안" ++ add_B stem + "니다" ; -- TODO check APred vf => verb.s ! vf }
APred _ => stem ++ "TODO: proper adjective inflection"
}
} ; } ;
AdjPhrase : Type = Adjective ** {compar : Str} ; AdjPhrase : Type = Adjective ** {compar : Str} ;
@@ -121,29 +119,54 @@ oper
BaseVerb : Type = { BaseVerb : Type = {
type : VerbType ; type : VerbType ;
sc : NForm ; -- subject case
} ; } ;
Verb : Type = BaseVerb ** { Verb : Type = BaseVerb ** {
s : VForm => Str ; s : VForm => Str ;
} ; } ;
Verb2 : Type = Verb ; -- ** {c2 : Postposition} ; Verb2 : Type = Verb ** {c2 : NForm ; p2 : Postposition} ;
Verb3 : Type = Verb ; -- ** {c3 : Postposition} ; Verb3 : Type = Verb2 ** {c3 : NForm ; p3 : Postposition} ;
-- VV : Type = Verb ** {vvtype : VVForm} ; -- VV : Type = Verb ** {vvtype : VVForm} ;
copula : Verb = { mkVerb : (plain : Str) -> VerbType -> Verb = \plain,vt ->
mkVerbFull plain plain plain plain plain plain vt ; -- TODO proper forms
mkVerb2 : (plain : Str) -> Verb2 = \plain ->
let v = mkVerb plain Active
in v ** {c2 = Object ; p2 = mkPrep []} ;
mkVerbFull : (x1,_,_,_,_,x6 : Str) -> VerbType -> Verb =
\plain,polite,formal,planeg,polneg,formneg,vt -> {
s = table { s = table {
VInf => "이다" ; VF Plain Pos => plain ;
VFin Gnomic Pos => "입니다" ; VF Plain Neg => planeg ;
VFin Gnomic Neg => "아닙니다" ; VF Polite Pos => polite ;
_ => "TODO:copula" } ; VF Polite Neg => polneg ;
type = Copula ; VF Formal Pos => formal ;
VF Formal Neg => formneg
} ;
type = vt ;
sc = Subject
} ; } ;
mkVerb : Str -> Verb = \str -> { copula : Verb = mkVerbFull
s = \\_ => str ; "이다"
type = Active "이에요" -- or "이세요" ?
"입니다"
"아니다"
"아니에요"
"아닙니다"
Copula ;
copulaAfterConsonant : Verb = copula ** {
s = \\vf => case vf of {
VF Plain Pos => "다" ;
VF Polite Pos => "예요" ;
_ => copula.s ! vf }
} ; } ;
------------------ ------------------
-- Adv -- Adv
@@ -154,13 +177,11 @@ oper
Complement : Type = { Complement : Type = {
s : VForm => Str ; s : VForm => Str ;
nComp : Str ;
-- compar : Str ; -- comparative is discontinuous -- compar : Str ; -- comparative is discontinuous
} ; } ;
emptyComp : Complement = { emptyComp : Complement = {
s = \\_ => [] ; s = \\_ => [] ;
nComp = [] ;
-- compar : Str ; -- compar : Str ;
} ; } ;
@@ -177,6 +198,7 @@ oper
vComp, vComp,
nComp = [] ; nComp = [] ;
} ; } ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Cl, S -- Cl, S
@@ -196,9 +218,8 @@ oper
predVPslash = predVP ; -- VP==VPSlash, Cl==ClSlash predVPslash = predVP ; -- VP==VPSlash, Cl==ClSlash
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 ! vp.sc
++ vp.nComp -- TODO: embed copula into complement ++ vp.s ! VF Polite p -- TODO: more tenses
++ vp.s ! VFin Gnomic Pos -- TODO: actual forms
} ; } ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -114,22 +114,23 @@ lin
-- : AP -> Comp ; -- : AP -> Comp ;
CompAP ap = emptyComp ** { CompAP ap = emptyComp ** {
s = \\vf => ap.s ! APred vf ; s = \\vf => ap.s ! APred vf
} ; } ;
-- : CN -> Comp ; -- : CN -> Comp ;
CompCN cn = emptyComp ** { -- : NP -> Comp ;
nComp = cn.s ! Bare ; -- TODO: num. I am [a house that sleeps here] vs. we are [houses that sleep here] CompCN,
} ; CompNP = \n -> emptyComp ** {
s = \\vf =>
-- NP -> Comp ; let cop = case n.p of {
CompNP np = emptyComp ** { Vowel => copula.s ;
nComp = np.s ! Bare ; Consonant => copulaAfterConsonant.s }
in glue (n.s ! Bare) (cop ! vf)
} ; } ;
-- : Adv -> Comp ; -- : Adv -> Comp ;
CompAdv adv = emptyComp ** { CompAdv adv = emptyComp ** {
nComp = adv.s ; s = \\vf => adv.s ++ copula.s ! vf ;
} ; } ;
-- : VP -- Copula alone; -- : VP -- Copula alone;