monosyllable prefix

This commit is contained in:
Meowyam
2022-01-12 15:20:26 +08:00
parent 664164e8c1
commit 9d56ac6fee
8 changed files with 34 additions and 11 deletions

View File

@@ -6,7 +6,7 @@ concrete AdjectiveMay of Adjective = CatMay ** open ResMay, Prelude in {
-- : A -> AP ;
PositA a = a ** {
compar = [] ;
compar = a.s ;
} ;
-- : A -> NP -> AP ;

View File

@@ -33,7 +33,7 @@ lin beautiful_A = mkA "cantik" ;
-- lin bike_N = mkN "" ;
-- lin bird_N = mkN "" ;
-- lin bite_V2 = mkV2 "" ;
-- lin black_A = mkA "" ;
lin black_A = mkA "hitam" ;
-- lin blood_N = mkN "" ;
-- lin blow_V = mkV "" ;
-- lin blue_A = mkA "" ;
@@ -230,7 +230,7 @@ lin man_N = mkN "lelaki" ;
-- lin meat_N = mkN "" ;
lin milk_N = mkN "susu" ;
-- lin moon_N = mkN "" ;
-- lin mother_N2 = mkN2 "" ;
lin mother_N2 = mkN2 "ibu" ;
-- lin mountain_N = mkN "" ;
-- lin mouth_N = mkN "" ;
-- lin music_N = mkN "" ;
@@ -256,7 +256,7 @@ lin now_Adv = mkAdv "sekarang" ;
-- lin oil_N = mkN "" ;
lin old_A = mkA "tua" ;
-- lin open_V2 = mkV2 "" ;
-- lin paint_V2A = mkV2A "" ;
lin paint_V2A = mkV2 "cat" ;
-- lin paper_N = mkN "" ;
-- lin paris_PN = mkPN "Paris" ;
-- lin peace_N = mkN "" ;

View File

@@ -31,6 +31,8 @@ oper
} ;
prefixMeng : Str -> Str = \makan -> case makan of {
? + ? + c => "menge" + makan ;
(#v|"g"|"h") + _
=> "meng" + makan ; -- prefix meng: e.g. meng+atur
"k" + enal
@@ -49,6 +51,8 @@ oper
"s" + alak
=> "meny" + alak ; -- replace s with meny
("r"|"l"|"w"|"y"|"m"|"n"|"ny"|"ng") + _
=> "me" + makan ; -- prefix me

View File

@@ -54,8 +54,8 @@ lin
True => iadv.s ++ cls.subj ; False => cls.subj
} ;
pred = \\vf,pol => case iadv.isPre of {
True => cls.pred ! Root ! pol ;
False => cls.pred ! Root ! pol ++ iadv.s
True => cls.pred ! iadv.vf ! pol ;
False => cls.pred ! iadv.vf ! pol ++ iadv.s
} ;
} ;

View File

@@ -67,6 +67,7 @@ oper
sp = \\_ => str ;
} ;
--------------------------------------------------------------------------------
-- Det, Quant, Card, Ord
@@ -235,6 +236,7 @@ oper
IAdv : Type = Adverb ** {
isPre : Bool ;
vf : VForm ;
} ;
------------------
@@ -256,6 +258,7 @@ oper
s = \\vf,pol => nounneg pol ++ s ;
} ;
verbneg : Polarity -> Str = \pol -> case pol of {
Neg => "tidak" ; -- or "tak"?
Pos => []

View File

@@ -15,13 +15,13 @@ lin very_AdA = mkAdA "" ;
lin as_CAdv = { s = "" ; p = [] } ;
lin less_CAdv = { s = "" ; p = [] } ;
lin more_CAdv = { s = "" ; p = [] } ;
lin how_IAdv = ss "" :
lin how8much_IAdv = ss "" ;
lin when_IAdv = ss "" ;
-}
lin where_IAdv = { s = "mana"; isPre = False } ;
lin why_IAdv = {s = "mengapa"; isPre = True } ;
lin how_IAdv = { s = "bagaimana"; isPre = True ; vf = Active } ;
lin where_IAdv = { s = "mana"; isPre = False ; vf = Root } ;
lin why_IAdv = {s = "mengapa"; isPre = True ; vf = Root } ;
{-

View File

@@ -55,6 +55,15 @@ lin
c2 = v3.c2 -- Now the VPSlash is missing only the direct object
} ;
-- insertObjc : (Agr => Str) -> SlashVP -> SlashVP = \obj,vp ->
-- insertObj obj vp ** {c2 = vp.c2 ; gapInMiddle = vp.gapInMiddle ; missingAdv = vp.missingAdv } ;
SlashV2A v2 adj = useV {
s = \\vf => v2.s ! vf ++ adj.s;
} ** {
c2 = v2.c2
} ;
{-
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
SlashV2S v2s s =
@@ -70,7 +79,10 @@ lin
-}
-- : VPSlash -> NP -> VP
ComplSlash vps np = vps ** {
s = \\vf,pol => vps.s ! vf ! pol ++ applyPrep vps.c2 np
s = \\vf,pol =>
vps.s ! vf ! pol
++ applyPrep vps.c2 np
-- s = \\vf,pol => vps.s ! vf ! pol ++ applyPrep vps.c2 np
} ;
-- : VV -> VPSlash -> VPSlash ;

View File

@@ -53,4 +53,8 @@ LangMay: siapa mahu pergi
Lang: UseQCl (TTAnt TPres ASimul) PPos (QuestIComp (CompIP whoSg_IP) (DetCN (DetQuant DefArt NumSg) (UseN cat_N)))
LangEng: who is the cat
LangMay: siapa kucing
LangMay: siapa kucing
Lang: UseQCl (TTAnt TPres ASimul) PPos (QuestIAdv how_IAdv (PredVP (DetCN (DetQuant (PossPron youSg_Pron) NumSg) (UseN2 mother_N2)) (ComplSlash (SlashV2A paint_V2A (PositA black_A)) (DetCN (DetQuant DefArt NumSg) (UseN house_N)))))
LangEng: how does your mother paint the house black
LangMay: bagaimana ibu awak mengecat rumah hitam