forked from GitHub/gf-rgl
Merge pull request #421 from GrammaticalFramework/maryam-malay
more Malay
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
abstract ParseEngAbs =
|
abstract ParseEngAbs =
|
||||||
Tense,
|
Tense,
|
||||||
Cat,
|
Cat,
|
||||||
Noun - [PPartNP],
|
Noun - [PPartNP],
|
||||||
@@ -51,11 +51,11 @@ fun CompoundSgCN : CN -> CN -> CN ;
|
|||||||
SlashVPIV2V : V2V -> Pol -> VPI -> VPSlash ;
|
SlashVPIV2V : V2V -> Pol -> VPI -> VPSlash ;
|
||||||
|
|
||||||
SlashSlashV2V : V2V -> Ant -> Pol -> VPSlash -> VPSlash ;
|
SlashSlashV2V : V2V -> Ant -> Pol -> VPSlash -> VPSlash ;
|
||||||
|
|
||||||
ComplVV : VV -> Ant -> Pol -> VP -> VP ;
|
ComplVV : VV -> Ant -> Pol -> VP -> VP ;
|
||||||
|
|
||||||
PredVPosv,PredVPovs : NP -> VP -> Cl ;
|
PredVPosv,PredVPovs : NP -> VP -> Cl ;
|
||||||
|
|
||||||
that_RP : RP ;
|
that_RP : RP ;
|
||||||
who_RP : RP ;
|
who_RP : RP ;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ concrete AdjectiveMay of Adjective = CatMay ** open ResMay, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : A2 -> NP -> AP ; -- married to her
|
-- : A2 -> NP -> AP ; -- married to her
|
||||||
-- ComplA2 a2 np = a2 ** { } ;
|
ComplA2 a2 np = a2 ** {
|
||||||
|
compl = np.s
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : A2 -> AP ; -- married to itself
|
-- : A2 -> AP ; -- married to itself
|
||||||
-- ReflA2 a2 = a2 ** { } ;
|
-- ReflA2 a2 = a2 ** { } ;
|
||||||
|
|||||||
@@ -122,10 +122,10 @@ concrete CatMay of Cat = CommonX - [IAdv] ** open ResMay, Prelude in {
|
|||||||
PN = ResMay.PNoun ;
|
PN = ResMay.PNoun ;
|
||||||
|
|
||||||
linref
|
linref
|
||||||
CN = \cn -> cn.s ! NF Sg Bare ++ cn.heavyMod;
|
CN = linCN ;
|
||||||
ClSlash = \cl -> cl.subj ++ cl.pred ! Root ! Pos ++ cl.c2.s;
|
ClSlash = linClSlash ;
|
||||||
RCl = \cl -> cl.subj ++ cl.pred ! P1 ! Pos;
|
RCl = linRCl ;
|
||||||
Cl = \cl -> cl.subj ++ cl.pred ! Active ! Pos;
|
Cl = linCl ;
|
||||||
Det = linDet ;
|
Det = linDet ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,14 +6,31 @@ concrete ConjunctionMay of Conjunction =
|
|||||||
lincat
|
lincat
|
||||||
[Adv],[AdV] = {s1,s2 : Str} ;
|
[Adv],[AdV] = {s1,s2 : Str} ;
|
||||||
[S] = {s1,s2 : Str} ;
|
[S] = {s1,s2 : Str} ;
|
||||||
|
[AP] = {s1,s2 : Str} ;
|
||||||
|
[NP] = {s1,s2 : Possession => Str} ;
|
||||||
|
[CN] = {s1,s2 : NForm => Str ; heavyMod : Str} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
BaseAdv, BaseAdV = twoSS ;
|
BaseAdv, BaseAdV = twoSS ;
|
||||||
ConsAdv, ConsAdV = consrSS comma ;
|
ConsAdv, ConsAdV = consrSS comma ;
|
||||||
ConjAdv, ConjAdV = conjunctDistrSS ;
|
ConjAdv, ConjAdV = conjunctDistrSS ;
|
||||||
|
|
||||||
BaseS = twoSS ;
|
BaseS = twoSS ;
|
||||||
ConsS = consrSS comma ;
|
ConsS = consrSS comma ;
|
||||||
ConjS = conjunctDistrSS ;
|
ConjS = conjunctDistrSS ;
|
||||||
|
|
||||||
|
BaseAP = twoSS ;
|
||||||
|
ConsAP = consrSS comma ;
|
||||||
|
ConjAP = conjunctDistrSS ;
|
||||||
|
|
||||||
|
BaseNP = twoTable Possession ;
|
||||||
|
ConsNP = consrTable Possession comma ;
|
||||||
|
ConjNP co nps = emptyNP ** conjunctDistrTable Possession co nps ;
|
||||||
|
|
||||||
|
BaseCN x y = y ** twoTable NForm (mergeCN x) y ;
|
||||||
|
ConsCN x xs = xs ** consrTable NForm comma (mergeCN x) xs ;
|
||||||
|
ConjCN conj ss = ss ** conjunctDistrTable NForm conj ss ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
mergeCN : CNoun -> CNoun = \cn -> cn ** {s = \\nf => linCN cn} ; -- put postmod in s field
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,21 +4,19 @@ concrete ExtendMay of Extend = CatMay
|
|||||||
** ExtendFunctor - [
|
** ExtendFunctor - [
|
||||||
VPS -- finite VP's with tense and polarity
|
VPS -- finite VP's with tense and polarity
|
||||||
, ListVPS
|
, ListVPS
|
||||||
, VPI
|
, VPI, MkVPI, ComplVPIVV
|
||||||
, ListVPI -- infinitive VP's (TODO: with anteriority and polarity)
|
, ListVPI -- infinitive VP's (TODO: with anteriority and polarity)
|
||||||
, MkVPS
|
, MkVPS
|
||||||
, PredVPS
|
, PredVPS, RelVPS, QuestVPS, SQuestVPS
|
||||||
|
|
||||||
-- excluded because RGL funs needed for them not implemented yet
|
-- excluded because RGL funs needed for them not implemented yet
|
||||||
, SlashBareV2S
|
|
||||||
, PredAPVP
|
, PredAPVP
|
||||||
, ComplBareVS
|
|
||||||
|
|
||||||
|
|
||||||
,PresPartAP, PastPartAP
|
,PresPartAP, PastPartAP
|
||||||
,GenModNP, GenNP, GenRP
|
,GenModNP, GenNP, GenRP
|
||||||
,CompoundN
|
,CompoundN
|
||||||
,GerundNP
|
,GerundNP, GerundAdv
|
||||||
|
|
||||||
|
|
||||||
-- VPS2 ; -- have loved (binary version of VPS)
|
-- VPS2 ; -- have loved (binary version of VPS)
|
||||||
@@ -49,9 +47,13 @@ concrete ExtendMay of Extend = CatMay
|
|||||||
s = np.s ! Bare ++ vps.s ;
|
s = np.s ! Bare ++ vps.s ;
|
||||||
} ;
|
} ;
|
||||||
-- SQuestVPS : NP -> VPS -> QS ; -- has she walked
|
-- SQuestVPS : NP -> VPS -> QS ; -- has she walked
|
||||||
SQuestVPS np vps = {s = np.s ++ vps.s} ;
|
SQuestVPS np vps = {s = "adakah" ++ np.s ! Bare ++ vps.s} ;
|
||||||
|
|
||||||
-- QuestVPS : IP -> VPS -> QS ; -- who has walked
|
-- QuestVPS : IP -> VPS -> QS ; -- who has walked
|
||||||
|
QuestVPS ip vps = {s = ip.s ! Bare ++ vps.s} ;
|
||||||
|
|
||||||
-- RelVPS : RP -> VPS -> RS ; -- which won't sleep
|
-- RelVPS : RP -> VPS -> RS ; -- which won't sleep
|
||||||
|
RelVPS rp vps = {s = \\person => rp.s ++ vps.s} ;
|
||||||
|
|
||||||
-- MkVPI : VP -> VPI ; -- to sleep (TODO: Ant and Pol)
|
-- MkVPI : VP -> VPI ; -- to sleep (TODO: Ant and Pol)
|
||||||
MkVPI vp = {s = linVP vp} ;
|
MkVPI vp = {s = linVP vp} ;
|
||||||
@@ -93,6 +95,8 @@ concrete ExtendMay of Extend = CatMay
|
|||||||
s = \\_ => linVP vp
|
s = \\_ => linVP vp
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
GerundAdv vp = ss (linVP vp) ;
|
||||||
|
|
||||||
|
|
||||||
-- MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
|
-- MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
|
||||||
-- ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates
|
-- ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ lin airplane_N = mkN "kapal terbang" ;
|
|||||||
-- lin alas_Interj = mkInterj "" ;
|
-- lin alas_Interj = mkInterj "" ;
|
||||||
lin already_Adv = mkA "sudah" ;
|
lin already_Adv = mkA "sudah" ;
|
||||||
lin animal_N = mkN "haiwan" ;
|
lin animal_N = mkN "haiwan" ;
|
||||||
-- lin answer_V2S = mkV2S "jawab" ;
|
lin answer_V2S = mkV2S "jawab" ;
|
||||||
lin apartment_N = mkN "pangsapuri" ;
|
lin apartment_N = mkN "pangsapuri" ;
|
||||||
lin apple_N = mkN "epal" ;
|
lin apple_N = mkN "epal" ;
|
||||||
lin art_N = mkN "seni" ;
|
lin art_N = mkN "seni" ;
|
||||||
@@ -407,7 +407,7 @@ lin walk_V = mkV "jalan" ;
|
|||||||
-- lin warm_A = mkA "" ;
|
-- lin warm_A = mkA "" ;
|
||||||
-- lin wash_V2 = mkV2 "" ;
|
-- lin wash_V2 = mkV2 "" ;
|
||||||
-- lin watch_V2 = mkV2 "" ;
|
-- lin watch_V2 = mkV2 "" ;
|
||||||
-- lin water_N = mkNoun "" ;
|
lin water_N = mkN "air" ;
|
||||||
-- lin wet_A = mkA "" ;
|
-- lin wet_A = mkA "" ;
|
||||||
-- lin white_A = mkA "" ;
|
-- lin white_A = mkA "" ;
|
||||||
-- lin wide_A = mkA "" ;
|
-- lin wide_A = mkA "" ;
|
||||||
|
|||||||
@@ -16,14 +16,8 @@ oper AdvQVP : VP -> IAdv -> QVP = notYet "AdvQVP" ;
|
|||||||
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
||||||
oper AdvVPSlash : VPSlash -> Adv -> VPSlash = notYet "AdvVPSlash" ;
|
oper AdvVPSlash : VPSlash -> Adv -> VPSlash = notYet "AdvVPSlash" ;
|
||||||
oper ApposCN : CN -> NP -> CN = notYet "ApposCN" ;
|
oper ApposCN : CN -> NP -> CN = notYet "ApposCN" ;
|
||||||
oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ;
|
|
||||||
oper BaseAdV : AdV -> AdV -> ListAdV = notYet "BaseAdV" ;
|
|
||||||
oper BaseAdv : Adv -> Adv -> ListAdv = notYet "BaseAdv" ;
|
|
||||||
oper BaseCN : CN -> CN -> ListCN = notYet "BaseCN" ;
|
|
||||||
oper BaseIAdv : IAdv -> IAdv -> ListIAdv = notYet "BaseIAdv" ;
|
oper BaseIAdv : IAdv -> IAdv -> ListIAdv = notYet "BaseIAdv" ;
|
||||||
oper BaseNP : NP -> NP -> ListNP = notYet "BaseNP" ;
|
|
||||||
oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ;
|
oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ;
|
||||||
oper BaseS : S -> S -> ListS = notYet "BaseS" ;
|
|
||||||
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" ;
|
||||||
@@ -31,29 +25,16 @@ 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 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" ;
|
||||||
oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ;
|
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 ConjAP : Conj -> ListAP -> AP = notYet "ConjAP" ;
|
|
||||||
oper ConjAdV : Conj -> ListAdV -> AdV = notYet "ConjAdV" ;
|
|
||||||
oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ;
|
|
||||||
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 ConjNP : Conj -> ListNP -> NP = notYet "ConjNP" ;
|
|
||||||
oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ;
|
oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ;
|
||||||
oper ConjS : Conj -> ListS -> S = notYet "ConjS" ;
|
|
||||||
oper ConsAP : AP -> ListAP -> ListAP = notYet "ConsAP" ;
|
|
||||||
oper ConsAdV : AdV -> ListAdV -> ListAdV = notYet "ConsAdV" ;
|
|
||||||
oper ConsAdv : Adv -> ListAdv -> ListAdv = notYet "ConsAdv" ;
|
|
||||||
oper ConsCN : CN -> ListCN -> ListCN = notYet "ConsCN" ;
|
|
||||||
oper ConsIAdv : IAdv -> ListIAdv -> ListIAdv = notYet "ConsIAdv" ;
|
oper ConsIAdv : IAdv -> ListIAdv -> ListIAdv = notYet "ConsIAdv" ;
|
||||||
oper ConsNP : NP -> ListNP -> ListNP = notYet "ConsNP" ;
|
|
||||||
oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ;
|
oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ;
|
||||||
oper ConsS : S -> ListS -> ListS = notYet "ConsS" ;
|
|
||||||
oper CountNP : Det -> NP -> NP = notYet "CountNP" ;
|
oper CountNP : Det -> NP -> NP = notYet "CountNP" ;
|
||||||
oper DetDAP : Det -> DAP = notYet "DetDAP" ;
|
oper DetDAP : Det -> DAP = notYet "DetDAP" ;
|
||||||
oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ;
|
oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ;
|
||||||
@@ -102,10 +83,7 @@ oper SelfAdvVP : VP -> VP = notYet "SelfAdvVP" ;
|
|||||||
oper SelfNP : NP -> NP = notYet "SelfNP" ;
|
oper SelfNP : NP -> NP = notYet "SelfNP" ;
|
||||||
oper SentAP : AP -> SC -> AP = notYet "SentAP" ;
|
oper SentAP : AP -> SC -> AP = notYet "SentAP" ;
|
||||||
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
||||||
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
|
|
||||||
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
|
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
|
||||||
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
|
|
||||||
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
|
|
||||||
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
||||||
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
||||||
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
|
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
|
||||||
|
|||||||
@@ -66,6 +66,12 @@ oper
|
|||||||
mkV2V : Str -> V2V ;
|
mkV2V : Str -> V2V ;
|
||||||
mkV2V : V -> Prep -> Prep -> V2V ;
|
mkV2V : V -> Prep -> Prep -> V2V ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkV2S : overload {
|
||||||
|
mkV2S : Str -> V2S ;
|
||||||
|
mkV2S : V -> Prep -> V2S ;
|
||||||
|
} ;
|
||||||
|
|
||||||
-- mkVQ : Str -> VQ
|
-- mkVQ : Str -> VQ
|
||||||
-- = \s -> lin VQ (regV s) ;
|
-- = \s -> lin VQ (regV s) ;
|
||||||
|
|
||||||
@@ -73,8 +79,6 @@ oper
|
|||||||
--
|
--
|
||||||
-- mkV2A : Str -> V2A
|
-- mkV2A : Str -> V2A
|
||||||
-- = \s -> lin V2A (regV s ** {c2 = noPrep}) ;
|
-- = \s -> lin V2A (regV s ** {c2 = noPrep}) ;
|
||||||
-- mkV2V : Str -> V2V
|
|
||||||
-- = \s -> lin V2V (regV s ** {c2 = noPrep}) ;
|
|
||||||
-- mkV2Q : Str -> V2Q
|
-- mkV2Q : Str -> V2Q
|
||||||
-- = \s -> lin V2Q (regV s ** {c2 = noPrep}) ;
|
-- = \s -> lin V2Q (regV s ** {c2 = noPrep}) ;
|
||||||
|
|
||||||
@@ -129,14 +133,14 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkA2 = overload {
|
mkA2 = overload {
|
||||||
mkA2 : (adj : Str) -> A = \s -> lin A2 (mkAdj s) ;
|
mkA2 : (adj : Str) -> A2 = \s -> lin A2 ((mkAdj s) ** {c2 = emptyPrep}) ;
|
||||||
mkA2 : A -> A2 = \a -> lin A2 (a ** {c2 = emptyPrep}) ;
|
mkA2 : A -> A2 = \a -> lin A2 (a ** {c2 = emptyPrep}) ;
|
||||||
mkA2 : A -> Prep -> A = \a,p -> lin A2 (a) ;
|
mkA2 : A -> Prep -> A2 = \a,p -> lin A2 (a ** {c2 = p}) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV = overload {
|
mkV = overload {
|
||||||
mkV : Str -> V = \v -> lin V (mkVerb v Ber) ;
|
mkV : Str -> V = \v -> lin V (regVerb v Ber) ;
|
||||||
mkV : Str -> Prefix -> V = \v,p -> lin V (mkVerb v p)
|
mkV : Str -> Prefix -> V = \v,p -> lin V (regVerb v p)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
prefixV : V -> V = \v -> v ** {
|
prefixV : V -> V = \v -> v ** {
|
||||||
@@ -147,7 +151,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV2 = overload {
|
mkV2 = overload {
|
||||||
mkV2 : Str -> V2 = \v2 -> lin V2 (mkVerb2 (mkVerb v2 Meng) dirPrep) ;
|
mkV2 : Str -> V2 = \v2 -> lin V2 (mkVerb2 (regVerb v2 Meng) dirPrep) ;
|
||||||
mkV2 : V -> Prep -> V2 = \v,p -> lin V2 (mkVerb2 v p)
|
mkV2 : V -> Prep -> V2 = \v,p -> lin V2 (mkVerb2 v p)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -160,7 +164,7 @@ oper
|
|||||||
|
|
||||||
mkV4 = overload {
|
mkV4 = overload {
|
||||||
mkV4 : Str -> Str -> V2 = \v2,str ->
|
mkV4 : Str -> Str -> V2 = \v2,str ->
|
||||||
lin V2 (mkVerb4 (mkVerb v2 Meng) dirPrep str) ;
|
lin V2 (mkVerb4 (regVerb v2 Meng) dirPrep str) ;
|
||||||
mkV4 : V -> Prep -> Str -> V2 = \v,p,str -> lin V2 (mkVerb4 v p str)
|
mkV4 : V -> Prep -> Str -> V2 = \v,p,str -> lin V2 (mkVerb4 v p str)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -177,12 +181,17 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV2V = overload {
|
mkV2V = overload {
|
||||||
mkV2V : Str -> V2V = \v -> lin V2V (mkVerb2 (mkVerb v Meng) dirPrep) ;
|
mkV2V : Str -> V2V = \v -> lin V2V (mkVerb2 (regVerb v Meng) dirPrep) ;
|
||||||
mkV2V : V -> Prep -> Prep -> V2V = \v,p1,p2 -> lin V2V (mkVerb3 v p1 p2)
|
mkV2V : V -> Prep -> Prep -> V2V = \v,p1,p2 -> lin V2V (mkVerb3 v p1 p2)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkV2S = overload {
|
||||||
|
mkV2S : Str -> V2S = \v -> lin V2S (mkVerb2 (regVerb v Meng) dirPrep) ;
|
||||||
|
mkV2S : V -> Prep -> V2S = \v,p -> lin V22 (mkVerb2 v p)
|
||||||
|
} ;
|
||||||
|
|
||||||
-- lin like_V2 = let like' : V2 = mkV2 "suka" in like' ** {
|
-- lin like_V2 = let like' : V2 = mkV2 "suka" in like' ** {
|
||||||
-- s = \\_ => "suka" ;
|
-- s = table {Passive => "disukai" ; _ => "suka"} ;
|
||||||
-- passive = "disukai" ;
|
|
||||||
-- } ;
|
-- } ;
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ param
|
|||||||
VForm =
|
VForm =
|
||||||
Root -- infinitive, imperative, …
|
Root -- infinitive, imperative, …
|
||||||
| Active
|
| Active
|
||||||
|
| Passive
|
||||||
| Imperative
|
| Imperative
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ oper
|
|||||||
CNoun : Type = Noun ** {
|
CNoun : Type = Noun ** {
|
||||||
heavyMod : Str ; -- heavy stuff like relative clauses after determiner
|
heavyMod : Str ; -- heavy stuff like relative clauses after determiner
|
||||||
} ;
|
} ;
|
||||||
|
linCN : CNoun -> Str = \cn -> cn.s ! NF Sg Bare ++ cn.heavyMod ;
|
||||||
|
|
||||||
PNoun : Type = Noun ;
|
PNoun : Type = Noun ;
|
||||||
|
|
||||||
@@ -214,7 +215,6 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
Verb2 : Type = Verb ** {
|
Verb2 : Type = Verb ** {
|
||||||
c2 : Preposition ;
|
c2 : Preposition ;
|
||||||
passive : Str
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Verb3 : Type = Verb2 ** {
|
Verb3 : Type = Verb2 ** {
|
||||||
@@ -223,22 +223,24 @@ oper
|
|||||||
|
|
||||||
Verb4 : Type = Verb ** {
|
Verb4 : Type = Verb ** {
|
||||||
c2 : Preposition ;
|
c2 : Preposition ;
|
||||||
passive : Str
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- VV : Type = Verb ** {vvtype : VVForm} ;
|
-- VV : Type = Verb ** {vvtype : VVForm} ;
|
||||||
|
|
||||||
mkVerb : Str -> Prefix -> Verb = \str,p -> {
|
regVerb : Str -> Prefix -> Verb = \str,p ->
|
||||||
|
mkVerb str (prefix p str) ("di" + str) (str + "kan") ;
|
||||||
|
|
||||||
|
mkVerb : (makan, memakan, dimakan, makankan : Str) -> Verb = \rt,act,pass,imp -> {
|
||||||
s = table {
|
s = table {
|
||||||
Root => str ;
|
Root => rt ;
|
||||||
Active => prefix p str ;
|
Active => act ;
|
||||||
Imperative => str ++ BIND ++ "kan"
|
Passive => pass ;
|
||||||
|
Imperative => imp
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkVerb2 : Verb -> Preposition -> Verb2 = \v,pr -> v ** {
|
mkVerb2 : Verb -> Preposition -> Verb2 = \v,pr -> v ** {
|
||||||
c2 = pr ;
|
c2 = pr ;
|
||||||
passive = "di" ++ BIND ++ v.s ! Root
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkVerb3 : Verb -> (p,q : Preposition) -> Verb3 = \v,p,q ->
|
mkVerb3 : Verb -> (p,q : Preposition) -> Verb3 = \v,p,q ->
|
||||||
@@ -319,14 +321,19 @@ oper
|
|||||||
pred : VForm => Polarity => Str -- Cl may become relative clause, need to keep open VForm
|
pred : VForm => Polarity => Str -- Cl may become relative clause, need to keep open VForm
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
linCl : Clause -> Str = \cl -> cl.subj ++ cl.pred ! Active ! Pos ;
|
||||||
|
|
||||||
RClause : Type = {
|
RClause : Type = {
|
||||||
subj : Str ;
|
subj : Str ;
|
||||||
pred : Person => Polarity => Str
|
pred : Person => Polarity => Str
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
linRCl : RClause -> Str = \cl -> cl.subj ++ cl.pred ! P1 ! Pos ;
|
||||||
|
|
||||||
RS : Type = {s : Person => Str} ;
|
RS : Type = {s : Person => Str} ;
|
||||||
|
|
||||||
ClSlash : Type = Clause ** {c2 : Preposition} ;
|
ClSlash : Type = Clause ** {c2 : Preposition} ;
|
||||||
|
linClSlash : ClSlash -> Str = \cl -> cl.subj ++ cl.pred ! Root ! Pos ++ cl.c2.s ;
|
||||||
|
|
||||||
Sentence : Type = {s : Str} ;
|
Sentence : Type = {s : Str} ;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ lin
|
|||||||
UseV = ResMay.useV ;
|
UseV = ResMay.useV ;
|
||||||
|
|
||||||
-- : V2 -> VP ; -- be loved
|
-- : V2 -> VP ; -- be loved
|
||||||
PassV2 v2 = useV {s = \\_ => v2.passive} ;
|
PassV2 v2 = useV {s = \\_ => v2.s ! Passive} ;
|
||||||
|
|
||||||
-- : VPSlash -> VP ;
|
-- : VPSlash -> VP ;
|
||||||
-- ReflVP = ResMay.insertRefl ;
|
-- ReflVP = ResMay.insertRefl ;
|
||||||
@@ -64,7 +64,6 @@ lin
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SlashV2A v2 adj = useV {
|
SlashV2A v2 adj = useV {
|
||||||
s = \\vf => v2.s ! vf;
|
s = \\vf => v2.s ! vf;
|
||||||
} ** {
|
} ** {
|
||||||
@@ -72,16 +71,20 @@ lin
|
|||||||
adjCompl = adj.s
|
adjCompl = adj.s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
|
|
||||||
-- SlashV2S v2 s = useV {
|
|
||||||
-- s = \\vf => v2.s ! vf;
|
|
||||||
-- } ** {
|
|
||||||
-- c2 = v2.c2;
|
|
||||||
-- sCompl = s.s
|
|
||||||
-- } ;
|
|
||||||
|
|
||||||
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
||||||
-- SlashV2V v2v vp = ;
|
SlashV2V v2 vp = vp ** useV {
|
||||||
|
s = \\vf => v2.s ! vf ++ (linVP vp);
|
||||||
|
} ** {
|
||||||
|
c2 = v2.c2;
|
||||||
|
adjCompl = [] ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
|
||||||
|
SlashV2S v2 s = useV v2 ** {
|
||||||
|
c2 = v2.c2;
|
||||||
|
adjCompl = "yang" ++ s.s ; -- TODO check /Inari
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
{-
|
{-
|
||||||
@@ -108,17 +111,9 @@ lin
|
|||||||
-- : VV -> VPSlash -> VPSlash ;
|
-- : VV -> VPSlash -> VPSlash ;
|
||||||
SlashVV vv vps = ComplVV vv vps ** {
|
SlashVV vv vps = ComplVV vv vps ** {
|
||||||
c2 = vps.c2 ; -- like ComplVV except missing object
|
c2 = vps.c2 ; -- like ComplVV except missing object
|
||||||
passive = vv.s ++ vps.passive;
|
|
||||||
adjCompl = vps.adjCompl ;
|
adjCompl = vps.adjCompl ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- SlashVV vv vp = vp ** useV {
|
|
||||||
-- s = \\vf => vv.s ++ linVP vp ;
|
|
||||||
-- c2 = vp.c2 ;
|
|
||||||
-- passive = vv.s ++ vp.passive;
|
|
||||||
-- adjCompl = vp.adjCompl ;
|
|
||||||
-- } ;
|
|
||||||
|
|
||||||
-- : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
|
-- : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
|
||||||
-- SlashV2VNP v2v np vps =
|
-- SlashV2VNP v2v np vps =
|
||||||
|
|
||||||
|
|||||||
@@ -4,3 +4,10 @@ LangMay: dia memberi kucing kepadaku
|
|||||||
|
|
||||||
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ComplSlash (Slash3V3 give_V3 (UsePron i_Pron)) (MassNP (UseN cat_N)))))
|
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ComplSlash (Slash3V3 give_V3 (UsePron i_Pron)) (MassNP (UseN cat_N)))))
|
||||||
LangMay: dia memberi aku kucing
|
LangMay: dia memberi aku kucing
|
||||||
|
|
||||||
|
-- Sentence complements
|
||||||
|
|
||||||
|
-- added by Inari, TODO check
|
||||||
|
Lang: PredVP (UsePron she_Pron) (ComplSlash (SlashV2S answer_V2S (UseCl (TTAnt TPres ASimul) PPos (PredVP (MassNP (UseN dog_N)) (ComplSlash (SlashV2a eat_V2) (MassNP (UseN cat_N)))))) (UsePron i_Pron))
|
||||||
|
LangMay: dia menjawab aku yang anjing makan kucing
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user