mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Kor) Add new VForms, replace AForm with VForm (now identical)
This commit is contained in:
@@ -69,10 +69,10 @@ lin
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
mkFirstS : ResKor.Sentence -> ConjType => Str = \s ->
|
mkFirstS : ResKor.Sentence -> ConjType => Str = \s ->
|
||||||
\\conj => glue (s.s ! Subord) (conjTable ! NStar ! conj) ;
|
\\conj => glue (s.s ! WithConj) (conjTable ! NStar ! conj) ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
[AP] = ResKor.AdjPhrase ** {firstAP : AForm => ConjType => Str} ;
|
[AP] = ResKor.AdjPhrase ** {firstAP : VForm => ConjType => Str} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
BaseAP a1 a2 = a2 ** {
|
BaseAP a1 a2 = a2 ** {
|
||||||
@@ -90,10 +90,10 @@ lin
|
|||||||
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
mkFirstAP : ResKor.AdjPhrase -> AForm => ConjType => Str = \ap ->
|
mkFirstAP : ResKor.AdjPhrase -> VForm => ConjType => Str = \ap ->
|
||||||
\\af,conj => case af of {
|
\\af,conj => case af of {
|
||||||
AAttr => glue (ap.s ! AAttr) (conjTable ! NStar ! conj) ;
|
VAttr p => glue (ap.s ! VAttr p) (conjTable ! NStar ! conj) ;
|
||||||
APred _ => glue (ap.s ! APred VStem) (conjTable ! VStar ! conj) } ;
|
_ => glue (ap.s ! VStem) (conjTable ! VStar ! conj) } ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
lincat
|
lincat
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
|||||||
-- Use3N3 n3 = lin N2 n3 ;
|
-- Use3N3 n3 = lin N2 n3 ;
|
||||||
-- : AP -> CN -> CN
|
-- : AP -> CN -> CN
|
||||||
AdjCN ap cn = cn ** {
|
AdjCN ap cn = cn ** {
|
||||||
s = \\nf => ap.s ! AAttr ++ cn.s ! nf
|
s = \\nf => ap.s ! VAttr Pos ++ cn.s ! nf
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : CN -> RS -> CN ;
|
-- : CN -> RS -> CN ;
|
||||||
|
|||||||
Binary file not shown.
@@ -131,15 +131,16 @@ oper
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Adjectives
|
-- Adjectives
|
||||||
|
|
||||||
Adjective : Type = {s : AForm => Str} ;
|
Adjective : Type = {s : VForm => Str} ; -- Adjectives are verbs
|
||||||
Adjective2 : Type = Adjective ;
|
Adjective2 : Type = Adjective ;
|
||||||
|
|
||||||
mkAdj : Str -> Adjective = \plain ->
|
mkAdj : Str -> Adjective = \plain ->
|
||||||
let stem = init plain ;
|
let stem = init plain ;
|
||||||
verb = mkVerb plain ;
|
verb = mkVerb plain ;
|
||||||
in {
|
in {
|
||||||
s = table { AAttr => add_N stem ;
|
s = table {
|
||||||
APred vf => verb.s ! vf }
|
VAttr Pos => add_N stem ; -- Positive Attr form is different in
|
||||||
|
vf => verb.s ! vf } -- adjectives, otherwise adj forms == verb forms.
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdjPhrase : Type = Adjective ** {compar : Str} ;
|
AdjPhrase : Type = Adjective ** {compar : Str} ;
|
||||||
@@ -159,9 +160,6 @@ oper
|
|||||||
|
|
||||||
mkVerb : (plain : Str) -> Verb = \plain ->
|
mkVerb : (plain : Str) -> Verb = \plain ->
|
||||||
let stem = init plain ;
|
let stem = init plain ;
|
||||||
-- plainpres = case vowFinal stem of { -- not used in grammar yet
|
|
||||||
-- True => add_N stem + "다" ;
|
|
||||||
-- False => stem + "는다" } ;
|
|
||||||
informal = add_eo stem ; -- not used in grammar yet
|
informal = add_eo stem ; -- not used in grammar yet
|
||||||
polpres = informal + "요" ;
|
polpres = informal + "요" ;
|
||||||
formalpres = case vowFinal stem of {
|
formalpres = case vowFinal stem of {
|
||||||
@@ -179,15 +177,19 @@ oper
|
|||||||
mkVerbReg : (x1,_,_,x4 : Str) -> Verb =
|
mkVerbReg : (x1,_,_,x4 : Str) -> Verb =
|
||||||
\plain,polite,formal,neg ->
|
\plain,polite,formal,neg ->
|
||||||
let stem = init plain ;
|
let stem = init plain ;
|
||||||
|
attrpos = stem + "는" ; -- TODO: ㄹ-irregulars
|
||||||
|
attrneg = neg ++ "않는" ;
|
||||||
planeg = neg ++ negForms ! Plain ;
|
planeg = neg ++ negForms ! Plain ;
|
||||||
polneg = neg ++ negForms ! Polite ;
|
polneg = neg ++ negForms ! Polite ;
|
||||||
formneg = neg ++ negForms ! Formal ;
|
formneg = neg ++ negForms ! Formal ;
|
||||||
in mkVerbFull stem plain polite formal planeg polneg formneg ;
|
in mkVerbFull stem attrpos attrneg plain polite formal planeg polneg formneg ;
|
||||||
|
|
||||||
mkVerbFull : (x1,_,_,_,_,_,x7 : Str) -> Verb =
|
mkVerbFull : (x1,_,_,_,_,_,_,_,x9 : Str) -> Verb =
|
||||||
\stem,plain,polite,formal,planeg,polneg,formneg -> {
|
\stem,attrpos,attrneg,plain,polite,formal,planeg,polneg,formneg -> {
|
||||||
s = table {
|
s = table {
|
||||||
VStem => stem ;
|
VStem => stem ;
|
||||||
|
VAttr Pos => attrpos ;
|
||||||
|
VAttr Neg => attrneg ;
|
||||||
VF Plain Pos => plain ;
|
VF Plain Pos => plain ;
|
||||||
VF Plain Neg => planeg ;
|
VF Plain Neg => planeg ;
|
||||||
VF Polite Pos => polite ;
|
VF Polite Pos => polite ;
|
||||||
@@ -200,6 +202,8 @@ oper
|
|||||||
|
|
||||||
copula : Verb = mkVerbFull
|
copula : Verb = mkVerbFull
|
||||||
"이"
|
"이"
|
||||||
|
"이는" -- TODO does this exist?
|
||||||
|
"아니는" -- TODO does this exist?
|
||||||
"이다"
|
"이다"
|
||||||
"이에요"
|
"이에요"
|
||||||
"입니다"
|
"입니다"
|
||||||
@@ -209,6 +213,7 @@ oper
|
|||||||
|
|
||||||
copulaAfterVowel : Verb = copula ** {
|
copulaAfterVowel : Verb = copula ** {
|
||||||
s = \\vf => case vf of {
|
s = \\vf => case vf of {
|
||||||
|
VAttr Pos => "는" ; -- TODO just guessing
|
||||||
VF Plain Pos => "다" ;
|
VF Plain Pos => "다" ;
|
||||||
VF Polite Pos => "예요" ;
|
VF Polite Pos => "예요" ;
|
||||||
_ => copula.s ! vf }
|
_ => copula.s ! vf }
|
||||||
@@ -216,6 +221,8 @@ oper
|
|||||||
|
|
||||||
have_V : Verb = mkVerbFull
|
have_V : Verb = mkVerbFull
|
||||||
"있"
|
"있"
|
||||||
|
"있는"
|
||||||
|
"없는"
|
||||||
"있다"
|
"있다"
|
||||||
"있어요"
|
"있어요"
|
||||||
"있습니다"
|
"있습니다"
|
||||||
@@ -309,8 +316,9 @@ oper
|
|||||||
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
|
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
|
||||||
s = \\t,a,p,cltyp =>
|
s = \\t,a,p,cltyp =>
|
||||||
let vf = case cltyp of {
|
let vf = case cltyp of {
|
||||||
Subord => VStem ;
|
Subord => VAttr p ;
|
||||||
_ => VF Polite p } -- TODO: more tenses, politeness
|
WithConj => VStem ;
|
||||||
|
_ => VF Polite p } -- TODO: more tenses, politeness
|
||||||
in np.s ! vp.sc
|
in np.s ! vp.sc
|
||||||
++ vp.nObj -- an object, not copula complement
|
++ vp.nObj -- an object, not copula complement
|
||||||
++ vp.adv
|
++ vp.adv
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ lin
|
|||||||
|
|
||||||
-- : AP -> Comp ;
|
-- : AP -> Comp ;
|
||||||
CompAP ap = emptyComp ** {
|
CompAP ap = emptyComp ** {
|
||||||
s = \\vf => ap.s ! APred vf
|
s = ap.s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : CN -> Comp ;
|
-- : CN -> Comp ;
|
||||||
|
|||||||
Reference in New Issue
Block a user