mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:alltenses:prelude:src/korean
|
--# -path=.:alltenses:prelude:../korean
|
||||||
|
|
||||||
resource CombinatorsKor = Combinators with
|
resource CombinatorsKor = Combinators with
|
||||||
(Cat = CatKor),
|
(Cat = CatKor),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
--# -path=.:alltenses:prelude
|
--# -path=.:alltenses:prelude:../korean
|
||||||
|
|
||||||
instance SyntaxKor of Syntax =
|
instance SyntaxKor of Syntax =
|
||||||
ConstructorsKor, CatKor, StructuralKor, CombinatorsKor ;
|
ConstructorsKor, CatKor, StructuralKor, CombinatorsKor **
|
||||||
|
open MissingKor in {} ;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
concrete AdjectiveKor of Adjective = CatKor ** open ResKor, Prelude in {
|
concrete AdjectiveKor of Adjective = CatKor **
|
||||||
|
open ResKor, (AK=AdverbKor), Prelude in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
@@ -11,11 +12,14 @@ concrete AdjectiveKor of Adjective = CatKor ** open ResKor, Prelude in {
|
|||||||
|
|
||||||
-- : A -> NP -> AP ;
|
-- : A -> NP -> AP ;
|
||||||
ComparA a np = a ** {
|
ComparA a np = a ** {
|
||||||
compar = np.s ! Bare
|
s = \\vf => "더" ++ a.s ! vf ;
|
||||||
|
compar = glue (np.s ! Bare) "보다" ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : A2 -> NP -> AP ; -- married to her
|
-- : A2 -> NP -> AP ; -- married to her
|
||||||
-- ComplA2 a2 np = a2 ** { } ;
|
ComplA2 a2 np = a2 ** {
|
||||||
|
compar = (AK.PrepNP a2.p2 np).s ;
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : A2 -> AP ; -- married to itself
|
-- : A2 -> AP ; -- married to itself
|
||||||
-- ReflA2 a2 = a2 ** { } ;
|
-- ReflA2 a2 = a2 ** { } ;
|
||||||
@@ -24,10 +28,10 @@ concrete AdjectiveKor of Adjective = CatKor ** open ResKor, Prelude in {
|
|||||||
UseA2 = PositA ;
|
UseA2 = PositA ;
|
||||||
|
|
||||||
-- : A -> AP ; -- warmer
|
-- : A -> AP ; -- warmer
|
||||||
-- UseComparA a = a ** {
|
UseComparA a = a ** {
|
||||||
-- s = \\af => "???" ++ a.s ! af ;
|
s = \\af => "더" ++ a.s ! af ;
|
||||||
-- compar = []
|
compar = [] ;
|
||||||
-- } ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- : CAdv -> AP -> NP -> AP ; -- as cool as John
|
-- : CAdv -> AP -> NP -> AP ; -- as cool as John
|
||||||
@@ -37,7 +41,6 @@ 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 = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ concrete CatKor of Cat = CommonX ** open ResKor, Prelude in {
|
|||||||
Quant = ResKor.Quant ;
|
Quant = ResKor.Quant ;
|
||||||
Num = ResKor.Num ;
|
Num = ResKor.Num ;
|
||||||
Ord = {
|
Ord = {
|
||||||
s : Str ; -- AForm => Str ; -- Ord can come from AP and become AP again
|
s : VForm => Str ; -- Ord can come from AP and become AP again
|
||||||
n : Number -- Ord can come from Num, which has inherent number
|
n : Number -- Ord can come from Num, which has inherent number
|
||||||
} ;
|
} ;
|
||||||
DAP = ResKor.Determiner ;
|
DAP = ResKor.Determiner ;
|
||||||
@@ -116,7 +116,7 @@ concrete CatKor of Cat = CommonX ** open ResKor, Prelude in {
|
|||||||
N = ResKor.Noun ;
|
N = ResKor.Noun ;
|
||||||
N2 = ResKor.Noun2 ;
|
N2 = ResKor.Noun2 ;
|
||||||
N3 = ResKor.Noun3 ;
|
N3 = ResKor.Noun3 ;
|
||||||
PN = ResKor.PNoun ;
|
PN = ResKor.NounPhrase ;
|
||||||
|
|
||||||
linref
|
linref
|
||||||
V, V2, V3, VP = linVerb ;
|
V, V2, V3, VP = linVerb ;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
concrete ConjunctionKor of Conjunction =
|
concrete ConjunctionKor of Conjunction =
|
||||||
CatKor ** open ResKor, Coordination, Prelude in {
|
CatKor ** open ResKor, Prelude in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
@@ -25,31 +25,37 @@ concrete ConjunctionKor of Conjunction =
|
|||||||
ConsAdv = consrSS comma ;
|
ConsAdv = consrSS comma ;
|
||||||
ConjAdv = conjunctSS ;
|
ConjAdv = conjunctSS ;
|
||||||
|
|
||||||
--}
|
|
||||||
|
|
||||||
|
|
||||||
-- Adverb and other simple {s : Str} types.
|
|
||||||
lincat
|
|
||||||
[Adv],[AdV],[IAdv] = {s1,s2 : Str} ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
BaseAdv, BaseAdV, BaseIAdv = twoSS ;
|
|
||||||
ConsAdv, ConsAdV, ConsIAdv = consrSS comma ;
|
|
||||||
ConjAdv, ConjAdV, ConjIAdv = conjunctDistrSS ;
|
|
||||||
|
|
||||||
|
|
||||||
{-
|
|
||||||
-- RS depends on X, Y and Z, otherwise exactly like previous.
|
|
||||||
-- RS can modify CNs, which are open for …, and have inherent …
|
|
||||||
lincat
|
|
||||||
[RS] = {s1,s2 : … => Str} ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
BaseRS = twoTable3 … ;
|
|
||||||
ConsRS = consrTable3 … comma ;
|
|
||||||
ConjRS = conjunctRSTable ;
|
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
|
||||||
|
lincat
|
||||||
|
[Adv],[AdV],[IAdv],[RS] = ConjSS ;
|
||||||
|
lin
|
||||||
|
BaseAdv, BaseAdV, BaseIAdv, BaseRS = baseSS ;
|
||||||
|
ConsAdv, ConsAdV, ConsIAdv, ConsRS = consSS ;
|
||||||
|
ConjAdv, ConjAdV, ConjIAdv, ConjRS = conjSS ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
ConjSS : Type = SS ** {firstSS : ConjType => Str} ;
|
||||||
|
|
||||||
|
baseSS : SS -> SS -> ConjSS = \s1,s2 -> s2 ** {
|
||||||
|
firstSS = mkFirstSS s1 ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
consSS : SS -> ConjSS -> ConjSS = \s,ss -> ss ** {
|
||||||
|
firstSS = \\conj =>
|
||||||
|
mkFirstSS s ! conj ++ ss.firstSS ! conj ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
conjSS : Conj -> ConjSS -> SS = \co,ss -> {
|
||||||
|
s = co.s1 ++ ss.firstSS ! co.c ++ ss.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
mkFirstSS : SS -> ConjType => Str = \s ->
|
||||||
|
\\conj => glue s.s (conjTable ! NStar ! conj) ;
|
||||||
|
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
[S] = ResKor.Sentence ** {firstS : ConjType => Str} ;
|
[S] = ResKor.Sentence ** {firstS : ConjType => Str} ;
|
||||||
|
|
||||||
@@ -69,10 +75,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 +96,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
|
||||||
@@ -131,4 +137,5 @@ oper
|
|||||||
mkFirstNP : ResKor.NounPhrase -> ConjType => Str = \np ->
|
mkFirstNP : ResKor.NounPhrase -> ConjType => Str = \np ->
|
||||||
\\conj => glue (np.s ! Bare) (conjTable ! NStar ! conj) ;
|
\\conj => glue (np.s ! Bare) (conjTable ! NStar ! conj) ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ 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 "" ;
|
||||||
-- 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 "푸르다" ;
|
||||||
@@ -72,7 +72,7 @@ lin cat_N = mkN "고양이" ;
|
|||||||
-- lin clever_A = mkA "" ;
|
-- lin clever_A = mkA "" ;
|
||||||
-- lin close_V2 = mkV2 "" ;
|
-- lin close_V2 = mkV2 "" ;
|
||||||
-- lin cloud_N = mkN "" ;
|
-- lin cloud_N = mkN "" ;
|
||||||
-- lin coat_N = mkN "" ;
|
lin coat_N = mkN "코트" ;
|
||||||
-- lin cold_A = mkA "" ;
|
-- lin cold_A = mkA "" ;
|
||||||
lin come_V = mkV "오다" ;
|
lin come_V = mkV "오다" ;
|
||||||
-- lin computer_N = mkN "" ;
|
-- lin computer_N = mkN "" ;
|
||||||
@@ -209,7 +209,7 @@ lin laugh_V = mkV "웃다" ;
|
|||||||
-- lin leave_V2 = mkV2 "" ;
|
-- lin leave_V2 = mkV2 "" ;
|
||||||
-- lin leg_N = mkN "" ;
|
-- lin leg_N = mkN "" ;
|
||||||
-- lin lie_V = mkV "" ;
|
-- lin lie_V = mkV "" ;
|
||||||
-- lin like_V2 = mkV2 "" ;
|
lin like_V2 = mkV2 (mkV "좋다") topic subject ;
|
||||||
-- lin listen_V2 = mkV2 "" ;
|
-- lin listen_V2 = mkV2 "" ;
|
||||||
-- lin live_V = mkV "";
|
-- lin live_V = mkV "";
|
||||||
-- lin liver_N = mkN "" ;
|
-- lin liver_N = mkN "" ;
|
||||||
@@ -279,7 +279,7 @@ lin person_N = mkN "사람" ;
|
|||||||
-- lin read_V2 = mkV2 "" ;
|
-- lin read_V2 = mkV2 "" ;
|
||||||
-- lin ready_A = mkA "" ;
|
-- lin ready_A = mkA "" ;
|
||||||
-- lin reason_N = mkN "" ;
|
-- lin reason_N = mkN "" ;
|
||||||
-- lin red_A = mkA "" ;
|
lin red_A = mkA "빨갛다" ;
|
||||||
-- lin religion_N = mkN "" ;
|
-- lin religion_N = mkN "" ;
|
||||||
-- lin restaurant_N = mkN "" ;
|
-- lin restaurant_N = mkN "" ;
|
||||||
-- lin river_N = mkN "" ;
|
-- lin river_N = mkN "" ;
|
||||||
@@ -314,7 +314,7 @@ lin see_V2 = mkV2 "보다" ;
|
|||||||
-- lin sharp_A = mkA "" ;
|
-- lin sharp_A = mkA "" ;
|
||||||
-- lin sheep_N = mkN "" fem ;
|
-- lin sheep_N = mkN "" fem ;
|
||||||
-- lin ship_N = mkN "" ;
|
-- lin ship_N = mkN "" ;
|
||||||
-- lin shirt_N = mkN "" ;
|
lin shirt_N = mkN "셔츠" ;
|
||||||
-- lin shoe_N = mkN "" ;
|
-- lin shoe_N = mkN "" ;
|
||||||
-- lin shop_N = mkN "" ;
|
-- lin shop_N = mkN "" ;
|
||||||
lin short_A = mkA "키가" small_A ; -- "height is small"
|
lin short_A = mkA "키가" small_A ; -- "height is small"
|
||||||
|
|||||||
@@ -9,18 +9,12 @@ oper AddAdvQVP : QVP -> IAdv -> QVP = notYet "AddAdvQVP" ;
|
|||||||
oper AdjDAP : DAP -> AP -> DAP = notYet "AdjDAP" ;
|
oper AdjDAP : DAP -> AP -> DAP = notYet "AdjDAP" ;
|
||||||
oper AdnCAdv : CAdv -> AdN = notYet "AdnCAdv" ;
|
oper AdnCAdv : CAdv -> AdN = notYet "AdnCAdv" ;
|
||||||
oper AdvAP : AP -> Adv -> AP = notYet "AdvAP" ;
|
oper AdvAP : AP -> Adv -> AP = notYet "AdvAP" ;
|
||||||
oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ;
|
|
||||||
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
|
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
|
||||||
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
|
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
|
||||||
oper AdvNP : NP -> Adv -> NP = notYet "AdvNP" ;
|
oper AdvNP : NP -> Adv -> NP = notYet "AdvNP" ;
|
||||||
oper AdvQVP : VP -> IAdv -> QVP = notYet "AdvQVP" ;
|
oper AdvQVP : VP -> IAdv -> QVP = notYet "AdvQVP" ;
|
||||||
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
||||||
oper ApposCN : CN -> NP -> CN = notYet "ApposCN" ;
|
|
||||||
oper BaseAdV : AdV -> AdV -> ListAdV = notYet "BaseAdV" ;
|
|
||||||
oper BaseAdv : Adv -> Adv -> ListAdv = notYet "BaseAdv" ;
|
|
||||||
oper BaseCN : CN -> CN -> ListCN = notYet "BaseCN" ;
|
oper BaseCN : CN -> CN -> ListCN = notYet "BaseCN" ;
|
||||||
oper BaseIAdv : IAdv -> IAdv -> ListIAdv = notYet "BaseIAdv" ;
|
|
||||||
oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ;
|
|
||||||
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
|
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
|
||||||
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
|
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
|
||||||
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
|
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
|
||||||
@@ -28,7 +22,6 @@ oper CompIAdv : IAdv -> IComp = notYet "CompIAdv" ;
|
|||||||
oper CompIP : IP -> IComp = notYet "CompIP" ;
|
oper CompIP : IP -> IComp = notYet "CompIP" ;
|
||||||
oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
|
oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
|
||||||
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
|
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
|
||||||
oper ComplA2 : A2 -> NP -> AP = notYet "ComplA2" ;
|
|
||||||
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
|
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
|
||||||
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
||||||
oper ComplSlashIP : VPSlash -> IP -> QVP = notYet "ComplSlashIP" ;
|
oper ComplSlashIP : VPSlash -> IP -> QVP = notYet "ComplSlashIP" ;
|
||||||
@@ -36,17 +29,11 @@ oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ;
|
|||||||
oper ComplVQ : VQ -> QS -> VP = notYet "ComplVQ" ;
|
oper ComplVQ : VQ -> QS -> VP = notYet "ComplVQ" ;
|
||||||
oper ComplVS : VS -> S -> VP = notYet "ComplVS" ;
|
oper ComplVS : VS -> S -> VP = notYet "ComplVS" ;
|
||||||
oper ComplVV : VV -> VP -> VP = notYet "ComplVV" ;
|
oper ComplVV : VV -> VP -> VP = notYet "ComplVV" ;
|
||||||
oper ConjAdV : Conj -> ListAdV -> AdV = notYet "ConjAdV" ;
|
|
||||||
oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ;
|
|
||||||
oper ConjCN : Conj -> ListCN -> CN = notYet "ConjCN" ;
|
oper ConjCN : Conj -> ListCN -> CN = notYet "ConjCN" ;
|
||||||
oper ConjDet : Conj -> ListDAP -> Det = notYet "ConjDet" ;
|
oper ConjDet : Conj -> ListDAP -> Det = notYet "ConjDet" ;
|
||||||
oper ConjIAdv : Conj -> ListIAdv -> IAdv = notYet "ConjIAdv" ;
|
oper ConjIAdv : Conj -> ListIAdv -> IAdv = notYet "ConjIAdv" ;
|
||||||
oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ;
|
|
||||||
oper ConsAdV : AdV -> ListAdV -> ListAdV = notYet "ConsAdV" ;
|
|
||||||
oper ConsAdv : Adv -> ListAdv -> ListAdv = notYet "ConsAdv" ;
|
|
||||||
oper ConsCN : CN -> ListCN -> ListCN = notYet "ConsCN" ;
|
oper ConsCN : CN -> ListCN -> ListCN = notYet "ConsCN" ;
|
||||||
oper ConsIAdv : IAdv -> ListIAdv -> ListIAdv = notYet "ConsIAdv" ;
|
oper ConsIAdv : IAdv -> ListIAdv -> ListIAdv = notYet "ConsIAdv" ;
|
||||||
oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ;
|
|
||||||
oper CountNP : Det -> NP -> NP = notYet "CountNP" ;
|
oper CountNP : Det -> NP -> NP = notYet "CountNP" ;
|
||||||
oper D_0, D_1, D_2, D_3, D_4, D_5, D_6, D_7, D_8, D_9 : Dig = notYet "D_9" ;
|
oper D_0, D_1, D_2, D_3, D_4, D_5, D_6, D_7, D_8, D_9 : Dig = notYet "D_9" ;
|
||||||
oper DetDAP : Det -> DAP = notYet "DetDAP" ;
|
oper DetDAP : Det -> DAP = notYet "DetDAP" ;
|
||||||
@@ -85,7 +72,6 @@ oper PositAdAAdj : A -> AdA = notYet "PositAdAAdj" ;
|
|||||||
oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ;
|
oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ;
|
||||||
oper PossNP : CN -> NP -> CN = notYet "PossNP" ;
|
oper PossNP : CN -> NP -> CN = notYet "PossNP" ;
|
||||||
oper PossPron : Pron -> Quant = notYet "PossPron" ;
|
oper PossPron : Pron -> Quant = notYet "PossPron" ;
|
||||||
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
|
||||||
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
|
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
|
||||||
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
|
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
|
||||||
oper QuestCl : Cl -> QCl = notYet "QuestCl" ;
|
oper QuestCl : Cl -> QCl = notYet "QuestCl" ;
|
||||||
@@ -96,12 +82,8 @@ oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
|
|||||||
oper QuestVP : IP -> VP -> QCl = notYet "QuestVP" ;
|
oper QuestVP : IP -> VP -> QCl = notYet "QuestVP" ;
|
||||||
oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
|
oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
|
||||||
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
||||||
oper RelCN : CN -> RS -> CN = notYet "RelCN" ;
|
|
||||||
oper RelCl : Cl -> RCl = notYet "RelCl" ;
|
|
||||||
oper RelNP : NP -> RS -> NP = notYet "RelNP" ;
|
oper RelNP : NP -> RS -> NP = notYet "RelNP" ;
|
||||||
oper RelS : S -> RS -> S = notYet "RelS" ;
|
oper RelS : S -> RS -> S = notYet "RelS" ;
|
||||||
oper RelSlash : RP -> ClSlash -> RCl = notYet "RelSlash" ;
|
|
||||||
oper RelVP : RP -> VP -> RCl = notYet "RelVP" ;
|
|
||||||
oper SSubjS : S -> Subj -> S -> S = notYet "SSubjS" ;
|
oper SSubjS : S -> Subj -> S -> S = notYet "SSubjS" ;
|
||||||
oper SelfAdVVP : VP -> VP = notYet "SelfAdVVP" ;
|
oper SelfAdVVP : VP -> VP = notYet "SelfAdVVP" ;
|
||||||
oper SelfAdvVP : VP -> VP = notYet "SelfAdvVP" ;
|
oper SelfAdvVP : VP -> VP = notYet "SelfAdvVP" ;
|
||||||
@@ -122,22 +104,10 @@ oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
|||||||
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
|
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
|
||||||
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
|
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
|
||||||
oper Use3N3 : N3 -> N2 = notYet "Use3N3" ;
|
oper Use3N3 : N3 -> N2 = notYet "Use3N3" ;
|
||||||
oper UseComparA : A -> AP = notYet "UseComparA" ;
|
|
||||||
oper UsePN : PN -> NP = notYet "UsePN" ;
|
|
||||||
oper UsePron : Pron -> NP = notYet "UsePron" ;
|
|
||||||
oper UseRCl : Temp -> Pol -> RCl -> RS = notYet "UseRCl" ;
|
|
||||||
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
|
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
|
||||||
oper UttAP : AP -> Utt = notYet "UttAP" ;
|
|
||||||
oper UttAdv : Adv -> Utt = notYet "UttAdv" ;
|
|
||||||
oper UttCN : CN -> Utt = notYet "UttCN" ;
|
|
||||||
oper UttCard : Card -> Utt = notYet "UttCard" ;
|
|
||||||
oper UttIP : IP -> Utt = notYet "UttIP" ;
|
|
||||||
oper UttImpPl : Pol -> Imp -> Utt = notYet "UttImpPl" ;
|
oper UttImpPl : Pol -> Imp -> Utt = notYet "UttImpPl" ;
|
||||||
oper UttImpPol : Pol -> Imp -> Utt = notYet "UttImpPol" ;
|
oper UttImpPol : Pol -> Imp -> Utt = notYet "UttImpPol" ;
|
||||||
oper UttImpSg : Pol -> Imp -> Utt = notYet "UttImpSg" ;
|
oper UttImpSg : Pol -> Imp -> Utt = notYet "UttImpSg" ;
|
||||||
oper UttInterj : Interj -> Utt = notYet "UttInterj" ;
|
|
||||||
oper UttNP : NP -> Utt = notYet "UttNP" ;
|
|
||||||
oper UttVP : VP -> Utt = notYet "UttVP" ;
|
|
||||||
oper VPSlashPrep : VP -> Prep -> VPSlash = notYet "VPSlashPrep" ;
|
oper VPSlashPrep : VP -> Prep -> VPSlash = notYet "VPSlashPrep" ;
|
||||||
oper VocNP : NP -> Voc = notYet "VocNP" ;
|
oper VocNP : NP -> Voc = notYet "VocNP" ;
|
||||||
oper above_Prep : Prep = notYet "above_Prep" ;
|
oper above_Prep : Prep = notYet "above_Prep" ;
|
||||||
|
|||||||
@@ -18,16 +18,15 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
|||||||
IsDig => glue dets cn.c.s ;
|
IsDig => glue dets cn.c.s ;
|
||||||
NoNum => dets } ;
|
NoNum => dets } ;
|
||||||
in case isNum det of {
|
in case isNum det of {
|
||||||
True => cns ++ detnum ;
|
True => cn.rs ++ cns ++ detnum ;
|
||||||
False => detnum ++ cns }
|
False => cn.rs ++ detnum ++ cns }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : PN -> NP ;
|
-- : PN -> NP ;
|
||||||
-- UsePN pn = pn ** {
|
UsePN pn = pn ;
|
||||||
-- } ;
|
|
||||||
|
|
||||||
-- : Pron -> NP ;
|
-- : Pron -> NP ;
|
||||||
-- UsePron pron = pron ;
|
UsePron pron = pron ** {empty = []};
|
||||||
|
|
||||||
-- : Predet -> NP -> NP ; -- only the man
|
-- : Predet -> NP -> NP ; -- only the man
|
||||||
PredetNP predet np = np ** {s =
|
PredetNP predet np = np ** {s =
|
||||||
@@ -48,8 +47,13 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
|||||||
-- PPartNP np v2 = np ** {
|
-- PPartNP np v2 = np ** {
|
||||||
-- s = \\c => v2.s ! ??? ++ np.s ! c } ; ----
|
-- s = \\c => v2.s ! ??? ++ np.s ! c } ; ----
|
||||||
|
|
||||||
-- : NP -> Adv -> NP ; -- Paris today ; boys, such as ..
|
-- : NP -> Adv -> NP ; -- Paris today
|
||||||
--AdvNP,ExtAdvNP = \np,adv -> np ** {} ;
|
AdvNP np adv = np ** {
|
||||||
|
s = \\nf => adv.s ++ np.s ! nf
|
||||||
|
} ; -- TODO test
|
||||||
|
|
||||||
|
-- : NP -> Adv -> NP ; -- boys, such as ..
|
||||||
|
-- ExtAdvNP np adv = np ** {} ;
|
||||||
|
|
||||||
-- : NP -> RS -> NP ; -- Paris, which is here
|
-- : NP -> RS -> NP ; -- Paris, which is here
|
||||||
-- RelNP np rs = np ** {
|
-- RelNP np rs = np ** {
|
||||||
@@ -64,9 +68,9 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- MassNP : CN -> NP ;
|
-- MassNP : CN -> NP ;
|
||||||
-- MassNP cn = useN cn ** {
|
MassNP cn = cn ** {
|
||||||
-- } ;
|
s = \\nf => cn.rs ++ cn.s ! nf
|
||||||
|
} ;
|
||||||
|
|
||||||
--2 Determiners
|
--2 Determiners
|
||||||
|
|
||||||
@@ -97,7 +101,11 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
|||||||
NumCard card = card ;
|
NumCard card = card ;
|
||||||
|
|
||||||
-- : Digits -> Card ;
|
-- : Digits -> Card ;
|
||||||
-- NumDigits dig =
|
NumDigits dig = baseNum ** {
|
||||||
|
s = \\_,_ => dig.s ! NCard ;
|
||||||
|
n = dig.n ;
|
||||||
|
numtype = IsDig
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : Numeral -> Card ;
|
-- : Numeral -> Card ;
|
||||||
NumNumeral num = num ;
|
NumNumeral num = num ;
|
||||||
@@ -115,10 +123,10 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
|||||||
-- } ;
|
-- } ;
|
||||||
|
|
||||||
-- : A -> Ord ;
|
-- : A -> Ord ;
|
||||||
-- OrdSuperl a = {
|
OrdSuperl a = {
|
||||||
-- s = \\af => "제일" ++ a.s ! af ;
|
s = \\vf => "가장" ++ a.s ! vf ;
|
||||||
-- n = Sg -- ?? is this meaningful?
|
n = Sg -- ?? is this meaningful?
|
||||||
-- } ;
|
} ;
|
||||||
|
|
||||||
-- One can combine a numeral and a superlative.
|
-- One can combine a numeral and a superlative.
|
||||||
|
|
||||||
@@ -130,10 +138,7 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
|||||||
IndefArt = mkQuant [] [] ;
|
IndefArt = mkQuant [] [] ;
|
||||||
|
|
||||||
-- : Pron -> Quant
|
-- : Pron -> Quant
|
||||||
-- PossPron pron =
|
PossPron pron = pron.poss ;
|
||||||
-- let p = pron.poss ;
|
|
||||||
-- in DefArt ** {
|
|
||||||
-- } ;
|
|
||||||
|
|
||||||
--2 Common nouns
|
--2 Common nouns
|
||||||
|
|
||||||
@@ -155,23 +160,28 @@ 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.compar ++ ap.s ! VAttr Pos ++ cn.s ! nf
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : CN -> RS -> CN ;
|
-- : CN -> RS -> CN ;
|
||||||
-- RelCN cn rs = cn ** {
|
RelCN cn rs = cn ** {
|
||||||
-- } ;
|
rs = cn.rs ++ rs.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
{-
|
|
||||||
-- : CN -> Adv -> CN ;
|
-- : CN -> Adv -> CN ;
|
||||||
AdvCN cn adv = cn ** { } ;
|
AdvCN cn adv = cn ** {
|
||||||
|
rs = cn.rs ++ adv.s
|
||||||
|
} ;
|
||||||
|
|
||||||
-- Nouns can also be modified by embedded sentences and questions.
|
-- Nouns can also be modified by embedded sentences and questions.
|
||||||
-- For some nouns this makes little sense, but we leave this for applications
|
-- For some nouns this makes little sense, but we leave this for applications
|
||||||
-- to decide. Sentential complements are defined in VerbKor.
|
-- to decide. Sentential complements are defined in VerbKor.
|
||||||
|
|
||||||
-- : CN -> SC -> CN ; -- question where she sleeps
|
-- : CN -> SC -> CN ; -- question where she sleeps
|
||||||
SentCN cn sc = cn ** { } ;
|
SentCN cn sc = cn ** {
|
||||||
|
rs = cn.rs ++ sc.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
--2 Apposition
|
--2 Apposition
|
||||||
@@ -179,8 +189,9 @@ concrete NounKor of Noun = CatKor ** open ResKor, Prelude in {
|
|||||||
-- This is certainly overgenerating.
|
-- This is certainly overgenerating.
|
||||||
|
|
||||||
-- : CN -> NP -> CN ; -- city Paris (, numbers x and y)
|
-- : CN -> NP -> CN ; -- city Paris (, numbers x and y)
|
||||||
ApposCN cn np = cn ** { s = } ;
|
ApposCN cn np = cn ** {
|
||||||
-}
|
s = \\nf => np.s ! Bare ++ cn.s ! nf -- TODO which form of NP?
|
||||||
|
} ;
|
||||||
|
|
||||||
--2 Possessive and partitive constructs
|
--2 Possessive and partitive constructs
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ lin
|
|||||||
-- : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n
|
-- : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n
|
||||||
pot3plus m n = TODO ;
|
pot3plus m n = TODO ;
|
||||||
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
LinDigit : Type = ResKor.Numeral ** {isTwo : Bool ; ten : Str} ;
|
LinDigit : Type = ResKor.Numeral ** {isTwo : Bool ; ten : Str} ;
|
||||||
|
|
||||||
@@ -123,4 +122,45 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
TODO : ResKor.Numeral = mkNum2 "TODO" "TODO" ;
|
TODO : ResKor.Numeral = mkNum2 "TODO" "TODO" ;
|
||||||
|
|
||||||
|
|
||||||
|
-- numerals as sequences of digits
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Dig = TDigit ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
-- : Dig -> Digits ; -- 8
|
||||||
|
IDig d = d ;
|
||||||
|
|
||||||
|
-- : Dig -> Digits -> Digits ; -- 876
|
||||||
|
IIDig d i = {
|
||||||
|
s = \\o => d.s ! NCard ++ BIND ++ i.s ! o ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
|
||||||
|
D_0 = mkDig "0" ;
|
||||||
|
D_1 = mk3Dig "1" "1번째" ResKor.Sg ;
|
||||||
|
D_2 = mkDig "2" ;
|
||||||
|
D_3 = mkDig "3" ;
|
||||||
|
D_4 = mkDig "4" ;
|
||||||
|
D_5 = mkDig "5" ;
|
||||||
|
D_6 = mkDig "6" ;
|
||||||
|
D_7 = mkDig "7" ;
|
||||||
|
D_8 = mkDig "8" ;
|
||||||
|
D_9 = mkDig "9" ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o ResKor.Pl ;
|
||||||
|
mkDig : Str -> TDigit = \c -> mk2Dig c (c + "번째") ;
|
||||||
|
|
||||||
|
mk3Dig : Str -> Str -> ResKor.Number -> TDigit = \c,o,n -> {
|
||||||
|
s = table {NCard => c ; NOrd => o} ;
|
||||||
|
n = n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
TDigit = {
|
||||||
|
n : ResKor.Number ;
|
||||||
|
s : CardOrd => Str
|
||||||
|
} ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,16 @@ oper
|
|||||||
|
|
||||||
--2 Parameters
|
--2 Parameters
|
||||||
--
|
--
|
||||||
-- To abstract over number, valency and (some) case names,
|
-- To abstract over number, valency and (some) CaseParticle names,
|
||||||
-- we define the following identifiers. The application programmer
|
-- we define the following identifiers. The application programmer
|
||||||
-- should always use these constants instead of the constructors
|
-- should always use these constants instead of the constructors
|
||||||
-- defined in $ResKor$.
|
-- defined in $ResKor$.
|
||||||
|
|
||||||
|
CaseParticle : Type ; -- Arguments to give to V2, V3
|
||||||
|
topic : CaseParticle ; -- 은 or 는
|
||||||
|
subject : CaseParticle ; -- 이 or 가
|
||||||
|
object : CaseParticle ; -- 을 or 를
|
||||||
|
noCase : CaseParticle ; -- No case particle
|
||||||
|
|
||||||
--2 Nouns
|
--2 Nouns
|
||||||
|
|
||||||
@@ -23,8 +28,13 @@ oper
|
|||||||
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.
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- mkA2 : Str -> Prep -> A2 ;
|
mkA2 : overload {
|
||||||
|
mkA2 : Str -> A2 ; -- Regular adjective, given in -다 form, no postposition for complement.
|
||||||
|
mkA2 : A -> Prep -> A2 ; -- Preconstructed adjective and postposition for complement.
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkPN : Str -> PN
|
||||||
|
= \s -> lin PN (mkNoun s) ;
|
||||||
--2 Verbs
|
--2 Verbs
|
||||||
|
|
||||||
-- Verbs
|
-- Verbs
|
||||||
@@ -36,8 +46,9 @@ oper
|
|||||||
copula : V ; -- The copula verb ''
|
copula : V ; -- The copula verb ''
|
||||||
|
|
||||||
mkV2 : overload {
|
mkV2 : overload {
|
||||||
mkV2 : (plain : Str) -> V2 ; -- Regular verb. Takes plain, uninflected -다 form, object particle is 를.
|
mkV2 : (plain : Str) -> V2 ; -- Regular verb. Takes plain, uninflected -다 form, subject particle is 가/이 and object particle is 를/을.
|
||||||
mkV2 : V -> V2 ; -- Takes preconstructed V, object particle is 를.
|
mkV2 : V -> V2 ; -- Takes preconstructed V, subject particle is 가/이 and object particle is 를/을.
|
||||||
|
mkV2 : V -> (subj,obj : CaseParticle) -> V2 ; -- Takes preconstructed V, and subject and object particles. E.g. `mkV2 좋다_V topic subject` for "as for <SUBJ>는, <OBJ>가 is good".
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- mkV3 : overload {
|
-- mkV3 : overload {
|
||||||
@@ -91,6 +102,12 @@ oper
|
|||||||
-- The definitions should not bother the user of the API. So they are
|
-- The definitions should not bother the user of the API. So they are
|
||||||
-- hidden from the document.
|
-- hidden from the document.
|
||||||
|
|
||||||
|
CaseParticle : Type = ResKor.NForm ;
|
||||||
|
topic = Topic ;
|
||||||
|
subject = Subject ;
|
||||||
|
object = Object ;
|
||||||
|
noCase = Bare ;
|
||||||
|
|
||||||
mkN = overload {
|
mkN = overload {
|
||||||
mkN : Str -> N = \s -> lin N (mkNoun s) ;
|
mkN : Str -> N = \s -> lin N (mkNoun s) ;
|
||||||
} ;
|
} ;
|
||||||
@@ -110,6 +127,11 @@ oper
|
|||||||
jakda ** {s = \\af => kiga ++ jakda.s ! af} ;
|
jakda ** {s = \\af => kiga ++ jakda.s ! af} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkA2 = overload {
|
||||||
|
mkA2 : Str -> A2 = \s -> lin A2 (atoa2 (mkAdj s)) ;
|
||||||
|
mkA2 : A -> Prep -> A2 = \a,p -> lin A2 (a ** {p2 = p}) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
mkV = overload {
|
mkV = overload {
|
||||||
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 ** {
|
||||||
@@ -124,6 +146,8 @@ oper
|
|||||||
mkV2 = overload {
|
mkV2 = overload {
|
||||||
mkV2 : (plain : Str) -> V2 = \v2 -> lin V2 (mkVerb2 v2) ;
|
mkV2 : (plain : Str) -> V2 = \v2 -> lin V2 (mkVerb2 v2) ;
|
||||||
mkV2 : V -> V2 = vtov2 ;
|
mkV2 : V -> V2 = vtov2 ;
|
||||||
|
mkV2 : V -> (subj,obj : CaseParticle) -> V2 = \v,sc,c2 ->
|
||||||
|
vtov2 v ** {sc = sc ; c2 = c2} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV3 = overload {
|
mkV3 = overload {
|
||||||
|
|||||||
Binary file not shown.
@@ -6,20 +6,21 @@ concrete PhraseKor of Phrase = CatKor ** open Prelude, ResKor in {
|
|||||||
UttS s = {s = s.s ! Statement} ;
|
UttS s = {s = s.s ! Statement} ;
|
||||||
UttQS qs = qs ;
|
UttQS qs = qs ;
|
||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
|
UttAdv adv = adv ;
|
||||||
|
UttInterj i = i ;
|
||||||
{-
|
{-
|
||||||
UttImpSg pol imp =
|
UttImpSg pol imp =
|
||||||
UttImpPl pol imp =
|
UttImpPl pol imp =
|
||||||
UttImpPol = UttImpSg ;
|
UttImpPol = UttImpSg ;
|
||||||
|
|
||||||
UttIP ip = {s = ip.s ! } ;
|
|
||||||
UttNP np = {s = np.s ! } ;
|
|
||||||
UttVP vp = {s = } ;
|
|
||||||
UttAdv adv = {s = } ;
|
|
||||||
UttCN n = {s = } ;
|
|
||||||
UttCard n = {s = } ;
|
|
||||||
UttAP ap = { s = ap.s ! } ;
|
|
||||||
UttInterj i = i ;
|
|
||||||
-}
|
-}
|
||||||
|
UttIP ip = {s = ip.s ! Bare} ;
|
||||||
|
|
||||||
|
UttNP np = {s = np.s ! Bare} ;
|
||||||
|
UttVP vp = {s = linVP vp} ;
|
||||||
|
UttCN cn = {s = cn.rs ++ cn.s ! Bare} ;
|
||||||
|
UttCard n = {s = n.s ! NK ! Indep} ;
|
||||||
|
UttAP ap = { s = ap.s ! VF Plain Pos} ;
|
||||||
|
|
||||||
NoPConj = {s = []} ;
|
NoPConj = {s = []} ;
|
||||||
-- PConjConj conj = {s = conj.s1 ++ conj.s2 ! …} ;
|
-- PConjConj conj = {s = conj.s1 ++ conj.s2 ! …} ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,26 @@
|
|||||||
concrete RelativeKor of Relative = CatKor ** open
|
concrete RelativeKor of Relative = CatKor ** open
|
||||||
ResKor, Prelude, (NS=NounKor), (SS=StructuralKor) in {
|
ResKor, Prelude, (NS=NounKor), (SS=StructuralKor) in {
|
||||||
|
|
||||||
{-
|
|
||||||
lin
|
lin
|
||||||
-- : Cl -> RCl ; -- such that John loves her
|
-- : Cl -> RCl ; -- such that John loves her
|
||||||
-- RelCl cl = ;
|
RelCl cl = {s = \\t,a,p => cl.s ! t ! a ! p ! Subord} ;
|
||||||
|
|
||||||
-- : RP -> VP -> RCl ;
|
-- : RP -> VP -> RCl ;
|
||||||
RelVP rp vp =
|
RelVP rp vp = {
|
||||||
|
s = \\t,a,p => vp.s ! VAttr p -- TODO no tenses yet in the grammar
|
||||||
|
++ rp.s ;
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : RP -> ClSlash -> RCl ; -- whom John loves
|
-- : RP -> ClSlash -> RCl ; -- whom John loves
|
||||||
RelSlash rp cls =
|
RelSlash rp cls = {
|
||||||
|
s = \\t,a,p => cls.s ! t ! a ! p ! Subord
|
||||||
|
++ rp.s ;
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : RP ;
|
-- : RP ;
|
||||||
IdRP = {s = ""} ;
|
IdRP = {s = ""} ;
|
||||||
|
|
||||||
-- : Prep -> NP -> RP -> RP ; -- the mother of whom
|
-- : Prep -> NP -> RP -> RP ; -- the mother of whom
|
||||||
--FunRP prep np rp = {} ;
|
--FunRP prep np rp = {} ;
|
||||||
-}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,76 +13,70 @@ oper
|
|||||||
origin = NK
|
origin = NK
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Noun : Type = {
|
BaseNoun : Type = {
|
||||||
s : NForm => Str ;
|
s : NForm => Str ;
|
||||||
p : Phono ;
|
p : Phono ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Noun : Type = BaseNoun ** {
|
||||||
c : Counter ;
|
c : Counter ;
|
||||||
} ;
|
} ;
|
||||||
Noun2 : Type = Noun ; -- TODO eventually more parameters?
|
Noun2 : Type = Noun ; -- TODO eventually more parameters?
|
||||||
Noun3 : Type = Noun ;
|
Noun3 : Type = Noun ;
|
||||||
|
|
||||||
CNoun : Type = Noun ** {
|
CNoun : Type = Noun ** {
|
||||||
|
rs : Str ; -- Relative clause comes before determiner
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PNoun : Type = Noun ;
|
|
||||||
|
|
||||||
mkNoun : Str -> Noun = \str -> {
|
mkNoun : Str -> Noun = \str -> {
|
||||||
s = \\cas => str + allomorph cas str ;
|
s = \\cas => str + allomorph cas str ;
|
||||||
p = if_then_else Phono (vowFinal str) Vowel Consonant ;
|
p = if_then_else Phono (vowFinal str) Vowel Consonant ;
|
||||||
c = baseCounter
|
c = baseCounter
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
useN : Noun -> CNoun = \n -> n ;
|
useN : Noun -> CNoun = \n -> n ** {
|
||||||
|
rs = []
|
||||||
|
} ;
|
||||||
|
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
-- NP
|
-- NP
|
||||||
|
|
||||||
-- BaseNP : Type = {
|
NounPhrase = BaseNoun ** {
|
||||||
-- a : Agreement ;
|
|
||||||
-- isPron : Bool ;
|
|
||||||
-- empty : Str ; -- standard trick for pro-drop
|
-- empty : Str ; -- standard trick for pro-drop
|
||||||
-- } ;
|
} ;
|
||||||
--
|
|
||||||
-- emptyNP : NounPhrase = {
|
|
||||||
-- s = \\_ => [] ;
|
|
||||||
-- a = Sg3 Masc ;
|
|
||||||
-- isPron = False ;
|
|
||||||
-- empty = [] ;
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- indeclNP : Str -> NounPhrase = \s -> emptyNP ** {s = \\c => s} ;
|
|
||||||
|
|
||||||
--NounPhrase : Type = BaseNP ** {s : NForm => Str} ;
|
|
||||||
NounPhrase = Noun ;
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Pronouns
|
-- Pronouns
|
||||||
|
|
||||||
Pronoun : Type = NounPhrase ** {
|
Pronoun : Type = BaseNoun ** {
|
||||||
-- poss : { -- for PossPron : Pron -> Quant
|
poss : Quant ;
|
||||||
-- } ;
|
|
||||||
sp : NForm => Str ;
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkPron = overload {
|
||||||
|
mkPron : (stem,poss : Str) -> Pronoun = \s,poss -> mkNoun s ** {
|
||||||
|
poss = mkQuant poss (poss ++ "것") ;
|
||||||
|
} ;
|
||||||
|
mkPron : (stem : Str) -> Pronoun = \s -> mkNoun s ** {
|
||||||
|
poss = mkQuant (s + "의") (s + "의" ++ "것") ;
|
||||||
|
}
|
||||||
|
} ;
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Det, Quant, Card, Ord
|
-- Det, Quant, Card, Ord
|
||||||
|
|
||||||
BaseQuant : Type = {
|
BaseQuant : Type = {
|
||||||
|
sp : NForm => Str ;
|
||||||
isPoss : Bool ;
|
isPoss : Bool ;
|
||||||
p : Phono
|
p : Phono
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Determiner : Type = BaseQuant ** {
|
Determiner : Type = BaseQuant ** {
|
||||||
s : NumOrigin => Str ; -- Chosen by the counter of CN
|
s : NumOrigin => Str ; -- Chosen by the counter of CN
|
||||||
sp : NForm => Str ;
|
|
||||||
n : Number ;
|
n : Number ;
|
||||||
numtype : NumType ; -- Whether its Num component is digit, numeral or Sg/Pl
|
numtype : NumType ; -- Whether its Num component is digit, numeral or Sg/Pl
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Quant : Type = BaseQuant ** {
|
Quant : Type = BaseQuant ** {
|
||||||
s : Str ;
|
s : Str ;
|
||||||
sp : NForm => Str ;
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Num : Type = {
|
Num : Type = {
|
||||||
@@ -104,6 +98,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
baseQuant : BaseQuant = {
|
baseQuant : BaseQuant = {
|
||||||
|
sp = \\_ => [] ;
|
||||||
isPoss = False ;
|
isPoss = False ;
|
||||||
p = Vowel ;
|
p = Vowel ;
|
||||||
} ;
|
} ;
|
||||||
@@ -114,6 +109,13 @@ oper
|
|||||||
p = (mkNoun sp).p ;
|
p = (mkNoun sp).p ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkDet : Str -> Number -> Determiner = \s,num -> baseQuant ** {
|
||||||
|
s = \\_ => (mkNoun s).s ! Bare ; -- NumOrigin irrelevant for non-numbers
|
||||||
|
sp = (mkNoun s).s ;
|
||||||
|
n = num ;
|
||||||
|
numtype = NoNum ;
|
||||||
|
} ;
|
||||||
|
|
||||||
plural : NForm => Str = table {
|
plural : NForm => Str = table {
|
||||||
Bare => "들" ;
|
Bare => "들" ;
|
||||||
nf => "들" + allomorph nf "들"
|
nf => "들" + allomorph nf "들"
|
||||||
@@ -131,17 +133,20 @@ oper
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Adjectives
|
-- Adjectives
|
||||||
|
|
||||||
Adjective : Type = {s : AForm => Str} ;
|
Adjective : Type = {s : VForm => Str} ; -- Adjectives are verbs
|
||||||
Adjective2 : Type = Adjective ;
|
Adjective2 : Type = Adjective ** {p2 : Postposition} ;
|
||||||
|
|
||||||
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.
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
atoa2 : Adjective -> Adjective2 = \a -> a ** {c2=Bare ; p2=emptyPP} ;
|
||||||
|
|
||||||
AdjPhrase : Type = Adjective ** {compar : Str} ;
|
AdjPhrase : Type = Adjective ** {compar : Str} ;
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Verbs
|
-- Verbs
|
||||||
@@ -159,9 +164,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 +181,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 +206,8 @@ oper
|
|||||||
|
|
||||||
copula : Verb = mkVerbFull
|
copula : Verb = mkVerbFull
|
||||||
"이"
|
"이"
|
||||||
|
"이는" -- TODO does this exist?
|
||||||
|
"아니는" -- TODO does this exist?
|
||||||
"이다"
|
"이다"
|
||||||
"이에요"
|
"이에요"
|
||||||
"입니다"
|
"입니다"
|
||||||
@@ -209,6 +217,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 +225,8 @@ oper
|
|||||||
|
|
||||||
have_V : Verb = mkVerbFull
|
have_V : Verb = mkVerbFull
|
||||||
"있"
|
"있"
|
||||||
|
"있는"
|
||||||
|
"없는"
|
||||||
"있다"
|
"있다"
|
||||||
"있어요"
|
"있어요"
|
||||||
"있습니다"
|
"있습니다"
|
||||||
@@ -302,16 +313,20 @@ oper
|
|||||||
|
|
||||||
QClause : Type = Clause ;
|
QClause : Type = Clause ;
|
||||||
|
|
||||||
RClause : Type = {s : NForm => Tense => Anteriority => Polarity => Str} ;
|
RClause : Type = {s : Tense => Anteriority => Polarity => Str} ;
|
||||||
|
|
||||||
Sentence : Type = {s : ClType => Str} ;
|
Sentence : Type = {s : ClType => Str} ;
|
||||||
|
|
||||||
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
|
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp ->
|
||||||
|
let npstr : Str = np.s ! vp.sc in predVP' npstr vp ;
|
||||||
|
|
||||||
|
predVP' : (np : Str) -> 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 ;
|
||||||
|
WithConj => VStem ;
|
||||||
_ => VF Polite p } -- TODO: more tenses, politeness
|
_ => VF Polite p } -- TODO: more tenses, politeness
|
||||||
in np.s ! vp.sc
|
in np
|
||||||
++ vp.nObj -- an object, not copula complement
|
++ vp.nObj -- an object, not copula complement
|
||||||
++ vp.adv
|
++ vp.adv
|
||||||
++ vp.s ! vf
|
++ vp.s ! vf
|
||||||
@@ -321,5 +336,6 @@ oper
|
|||||||
-- linrefs
|
-- linrefs
|
||||||
|
|
||||||
linVerb : Verb -> Str = \v -> v.s ! linVF ;
|
linVerb : Verb -> Str = \v -> v.s ! linVF ;
|
||||||
|
linVP : VerbPhrase -> Str = \vp -> vp.nObj ++ vp.adv ++ vp.s ! linVF ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ lin
|
|||||||
PredVP = predVP ;
|
PredVP = predVP ;
|
||||||
|
|
||||||
-- : SC -> VP -> Cl ; -- that she goes is good (Saeed p. 94)
|
-- : SC -> VP -> Cl ; -- that she goes is good (Saeed p. 94)
|
||||||
--PredSCVP sc vp = ;
|
PredSCVP sc vp = predVP' sc.s vp ;
|
||||||
|
|
||||||
--2 Clauses missing object noun phrases
|
--2 Clauses missing object noun phrases
|
||||||
-- : NP -> VPSlash -> ClSlash ;
|
-- : NP -> VPSlash -> ClSlash ;
|
||||||
@@ -35,16 +35,16 @@ lin
|
|||||||
ImpVP vp = {s = \\num,pol => linVP (VImp num pol) Statement vp} ;
|
ImpVP vp = {s = \\num,pol => linVP (VImp num pol) Statement vp} ;
|
||||||
|
|
||||||
--2 Embedded sentences
|
--2 Embedded sentences
|
||||||
|
-}
|
||||||
-- : S -> SC ;
|
-- : S -> SC ;
|
||||||
EmbedS s = {s = s.s ! True} ; -- choose subordinate
|
EmbedS s = {s = s.s ! Subord ++ "것이"} ; -- TODO check subject case
|
||||||
|
|
||||||
-- : QS -> SC ;
|
-- : QS -> SC ;
|
||||||
-- EmbedQS qs = { } ;
|
-- EmbedQS qs = { } ;
|
||||||
|
|
||||||
-- : VP -> SC ;
|
-- : VP -> SC ;
|
||||||
EmbedVP vp = {s = infVP vp} ;
|
EmbedVP vp = {s = vp.s ! VAttr Pos ++ "것이"} ;
|
||||||
-}
|
|
||||||
--2 Sentences
|
--2 Sentences
|
||||||
|
|
||||||
-- : Temp -> Pol -> Cl -> S ;
|
-- : Temp -> Pol -> Cl -> S ;
|
||||||
@@ -56,7 +56,7 @@ lin
|
|||||||
UseQCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! Statement} ;
|
UseQCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! Statement} ;
|
||||||
|
|
||||||
-- : Temp -> Pol -> RCl -> RS ;
|
-- : Temp -> Pol -> RCl -> RS ;
|
||||||
-- UseRCl t p cl = {s = } ;
|
UseRCl t p rcl = {s = t.s ++ p.s ++ rcl.s ! t.t ! t.a ! p.p} ;
|
||||||
|
|
||||||
-- AdvS : Adv -> S -> S ; -- then I will go home
|
-- AdvS : Adv -> S -> S ; -- then I will go home
|
||||||
AdvS = advS "" ;
|
AdvS = advS "" ;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ lin there_Adv = ss "" ;
|
|||||||
-------
|
-------
|
||||||
-- Conj
|
-- Conj
|
||||||
|
|
||||||
and_Conj = {
|
lin and_Conj = {
|
||||||
s1 = [] ;
|
s1 = [] ;
|
||||||
-- no need for strings here, actual values come from ParamKor.conjTable
|
-- no need for strings here, actual values come from ParamKor.conjTable
|
||||||
-- s2 = \\phono => table {
|
-- s2 = \\phono => table {
|
||||||
@@ -47,7 +47,7 @@ lin there_Adv = ss "" ;
|
|||||||
n = Pl ;
|
n = Pl ;
|
||||||
c = And
|
c = And
|
||||||
} ;
|
} ;
|
||||||
-- lin or_Conj = {s2 = \\_ => "" ; s1 = [] ; n = Sg} ;
|
lin or_Conj = {s1 = [] ; n = Sg ; c = Or} ;
|
||||||
-- lin if_then_Conj = mkConj
|
-- lin if_then_Conj = mkConj
|
||||||
-- lin both7and_DConj = mkConj "" "" pl ;
|
-- lin both7and_DConj = mkConj "" "" pl ;
|
||||||
-- lin either7or_DConj = {s2 = \\_ => "" ; s1 = "" ; n = Sg} ;
|
-- lin either7or_DConj = {s2 = \\_ => "" ; s1 = "" ; n = Sg} ;
|
||||||
@@ -68,17 +68,16 @@ lin all_Predet = {s = \\_ => "마다" ; p = Vowel} ;
|
|||||||
lin only_Predet = {s = \\_ => "만" ; p = Consonant} ;
|
lin only_Predet = {s = \\_ => "만" ; p = Consonant} ;
|
||||||
--lin most_Predet = {s = ""} ;
|
--lin most_Predet = {s = ""} ;
|
||||||
|
|
||||||
{-
|
|
||||||
lin every_Det = R.defDet [] pl **
|
|
||||||
{ s = mkVow } ;
|
|
||||||
lin few_Det = R.indefDet "" pl ;
|
|
||||||
lin many_Det = R.indefDet "" pl ;
|
|
||||||
lin much_Det = R.indefDet "" sg ;
|
|
||||||
|
|
||||||
lin somePl_Det =
|
--lin every_Det = ;
|
||||||
lin someSg_Det =
|
lin few_Det = mkDet "조금" Pl ;
|
||||||
lin no_Quant =
|
lin many_Det = mkDet "많은" Pl ;
|
||||||
-}
|
-- lin much_Det = ;
|
||||||
|
|
||||||
|
lin somePl_Det = mkDet "어떤" Pl ;
|
||||||
|
lin someSg_Det = mkDet "어떤" Sg ;
|
||||||
|
--lin no_Quant =
|
||||||
|
|
||||||
lin that_Quant = mkQuant "그" "그것" ;
|
lin that_Quant = mkQuant "그" "그것" ;
|
||||||
lin this_Quant = mkQuant "이" "이것" ;
|
lin this_Quant = mkQuant "이" "이것" ;
|
||||||
{-lin which_IQuant =
|
{-lin which_IQuant =
|
||||||
@@ -92,11 +91,8 @@ lin everything_NP = defNP "" N.NumSg ;
|
|||||||
lin nobody_NP = mkVerb; ""
|
lin nobody_NP = mkVerb; ""
|
||||||
lin nothing_NP = defNP "" N.NumSg ;
|
lin nothing_NP = defNP "" N.NumSg ;
|
||||||
lin somebody_NP = defNP "" N.NumSg ;
|
lin somebody_NP = defNP "" N.NumSg ;
|
||||||
lin something_NP = defNP "" N.NumSg ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
defNP : Str -> Num -> NP = {} ;
|
|
||||||
-}
|
-}
|
||||||
|
lin something_NP = mkNoun "무엇" ;
|
||||||
|
|
||||||
-------
|
-------
|
||||||
-- Prep
|
-- Prep
|
||||||
@@ -115,7 +111,7 @@ lin for_Prep = mkPrep "에게" ;
|
|||||||
-- lin in8front_Prep = mkPrep "" ;
|
-- lin in8front_Prep = mkPrep "" ;
|
||||||
lin in_Prep = mkPrep "에서" ;
|
lin in_Prep = mkPrep "에서" ;
|
||||||
-- lin on_Prep = mkPrep "에서" ;
|
-- lin on_Prep = mkPrep "에서" ;
|
||||||
-- lin part_Prep = mkPrep ;
|
lin part_Prep = mkPrep "의" ;
|
||||||
lin possess_Prep = mkPrep "의" ;
|
lin possess_Prep = mkPrep "의" ;
|
||||||
-- lin through_Prep = mkPrep ;
|
-- lin through_Prep = mkPrep ;
|
||||||
lin to_Prep = mkPrep "에";
|
lin to_Prep = mkPrep "에";
|
||||||
@@ -129,13 +125,15 @@ lin to_Prep = mkPrep "에";
|
|||||||
|
|
||||||
-- Pronouns are closed class, no constructor in ParadigmsKor.
|
-- Pronouns are closed class, no constructor in ParadigmsKor.
|
||||||
-- it_Pron =
|
-- it_Pron =
|
||||||
-- i_Pron =
|
i_Pron = let iReg : Pronoun = mkPron "저" "제" in
|
||||||
-- youPol_Pron,
|
iReg ** {s = table {Subject => "제가"; nf => iReg.s ! nf}
|
||||||
-- youSg_Pron =
|
} ;
|
||||||
-- he_Pron =
|
youPol_Pron = mkPron "당신" ;
|
||||||
-- she_Pron =
|
youSg_Pron = mkPron "너" ; -- NB. this is very informal, best not used
|
||||||
|
he_Pron = mkPron "그" ;
|
||||||
|
she_Pron = mkPron "그녀" ;
|
||||||
-- we_Pron =
|
-- we_Pron =
|
||||||
-- youPl_Pron =
|
youPl_Pron = mkPron "너희" ;
|
||||||
-- they_Pron =
|
-- they_Pron =
|
||||||
|
|
||||||
--lin whatPl_IP = ;
|
--lin whatPl_IP = ;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude
|
--# -path=.:../abstract:../common:../prelude
|
||||||
|
|
||||||
concrete SymbolKor of Symbol = CatKor **
|
concrete SymbolKor of Symbol = CatKor **
|
||||||
open Prelude, ParadigmsKor, ResKor, (NS=NounKor) in {
|
open Prelude, ResKor, (NK=NounKor), (VK=VerbKor) in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
@@ -15,28 +15,40 @@ lin
|
|||||||
FloatPN i = mkPN i.s ;
|
FloatPN i = mkPN i.s ;
|
||||||
|
|
||||||
-- : Card -> PN ; -- twelve [as proper name]
|
-- : Card -> PN ; -- twelve [as proper name]
|
||||||
NumPN i = mkPN i.s ;
|
NumPN i = mkPN (i.s ! NK ! Indep) ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
|
||||||
|
mkPN : Str -> NounPhrase = \s -> {
|
||||||
|
s = \\_ => s ;
|
||||||
|
p = Consonant ; -- ??
|
||||||
|
} ;
|
||||||
|
|
||||||
{-
|
|
||||||
lin
|
lin
|
||||||
-- CNIntNP cn i = {} ;
|
-- : CN -> Int -> NP
|
||||||
|
CNIntNP cn i = NK.MassNP (cn ** {
|
||||||
|
s = \\nf => cn.s ! nf ++ i.s}) ;
|
||||||
|
|
||||||
-- : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and y
|
-- : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and y
|
||||||
CNSymbNP det cn xs =
|
CNSymbNP det cn xs =
|
||||||
let cnSymb = cn ** { comp = cn.comp ++ xs.s }
|
let cnSymb : CN = cn ** {s = \\nf => cn.s ! nf ++ xs.s}
|
||||||
in NS.DetCN det cnSymb ;
|
in NK.DetCN det cnSymb ;
|
||||||
|
|
||||||
-- : CN -> Card -> NP ; -- level five ; level 5
|
-- : CN -> Card -> NP ; -- level five ; level 5
|
||||||
CNNumNP cn i = NS.MassNP (cn ** { comp = cn.comp ++ i.s }) ;
|
CNNumNP cn i = NK.MassNP (cn ** {
|
||||||
|
s = \\nf => cn.s ! nf ++ i.s ! cn.c.origin ! Indep}) ;
|
||||||
|
|
||||||
-- : Symb -> S ;
|
-- : Symb -> S ;
|
||||||
SymbS sy = {s = } ;
|
SymbS sy = {s = \\_ => sy.s} ;
|
||||||
|
|
||||||
-- : Symb -> Card ;
|
-- : Symb -> Card ;
|
||||||
SymbNum sy = { s = sy.s ; n = Pl } ;
|
SymbNum sy = baseNum ** {s = \\_,_ => sy.s} ;
|
||||||
|
|
||||||
-- : Symb -> Ord ;
|
-- : Symb -> Ord ;
|
||||||
SymbOrd sy = { s =} ;
|
SymbOrd sy =
|
||||||
-}
|
let comp : Comp = VK.CompAdv (lin Adv sy)
|
||||||
|
in {s = comp.s ; n=Pl} ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Symb, [Symb] = SS ;
|
Symb, [Symb] = SS ;
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ lin
|
|||||||
|
|
||||||
-- : AP -> Comp ;
|
-- : AP -> Comp ;
|
||||||
CompAP ap = emptyComp ** {
|
CompAP ap = emptyComp ** {
|
||||||
s = \\vf => ap.s ! APred vf
|
s = \\vf => ap.compar ++ ap.s ! vf
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : CN -> Comp ;
|
-- : CN -> Comp ;
|
||||||
|
|||||||
9
src/korean/unittest/adjective.gftest
Normal file
9
src/korean/unittest/adjective.gftest
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
-- Comparatives
|
||||||
|
|
||||||
|
-- LangEng: I am smaller than a cat
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (UseComp (CompAP (ComparA small_A (DetCN (DetQuant IndefArt NumSg) (UseN cat_N)))))))) NoVoc
|
||||||
|
LangKor: 제가 고양이 &+ 보다 더 작아요
|
||||||
|
|
||||||
|
-- LangEng: I am a woman smaller than a cat
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (UseComp (CompCN (AdjCN (ComparA small_A (DetCN (DetQuant IndefArt NumSg) (UseN cat_N))) (UseN woman_N))))))) NoVoc
|
||||||
|
LangKor: 제가 고양이 &+ 보다 더 작은 여자 &+ 예요
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseComp (CompAdv (PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN house_N)))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseComp (CompAdv (PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN house_N)))))))) NoVoc
|
||||||
LangEng: the cat is in the house
|
LangEng: the cat is in the house
|
||||||
LangKor: 고양이가 집 BIND 에서 있어요
|
LangKor: 고양이가 집 &+ 에서 있어요
|
||||||
|
|
||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseComp (CompAdv (PrepNP behind_Prep (DetCN (DetQuant DefArt NumSg) (UseN house_N)))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseComp (CompAdv (PrepNP behind_Prep (DetCN (DetQuant DefArt NumSg) (UseN house_N)))))))) NoVoc
|
||||||
LangEng: the cat is behind the house
|
LangEng: the cat is behind the house
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Lang: eat_V2
|
|||||||
LangKor: 먹어요
|
LangKor: 먹어요
|
||||||
|
|
||||||
Lang: UseComp (CompAP (PositA good_A))
|
Lang: UseComp (CompAP (PositA good_A))
|
||||||
LangKor: 좋어요
|
LangKor: 좋아요
|
||||||
|
|
||||||
-- Final ㅏ or ㅓ does not repeat itself
|
-- Final ㅏ or ㅓ does not repeat itself
|
||||||
Lang: go_V
|
Lang: go_V
|
||||||
|
|||||||
20
src/korean/unittest/subjcases.gftest
Normal file
20
src/korean/unittest/subjcases.gftest
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
-- Subject as subject case
|
||||||
|
|
||||||
|
-- LangEng: I see a cat
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant IndefArt NumSg) (UseN cat_N)))))) NoVoc
|
||||||
|
LangKor: 제가 고양이를 봐요
|
||||||
|
|
||||||
|
-- Double subject case
|
||||||
|
-- LangEng: the cat is short
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseComp (CompAP (PositA short_A)))))) NoVoc
|
||||||
|
LangKor: 고양이가 키가 작아요
|
||||||
|
|
||||||
|
-- Topic as subject case
|
||||||
|
|
||||||
|
-- LangEng: I have a cat
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a have_V2) (DetCN (DetQuant IndefArt NumSg) (UseN cat_N)))))) NoVoc
|
||||||
|
LangKor: 저는 고양이가 있어요
|
||||||
|
|
||||||
|
-- LangEng: I like cats
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a like_V2) (DetCN (DetQuant IndefArt NumPl) (UseN cat_N)))))) NoVoc
|
||||||
|
LangKor: 저는 고양이가 좋아요
|
||||||
Reference in New Issue
Block a user