forked from GitHub/gf-rgl
Merge pull request #29 from inariksit/arabic
Arabic: verb paradigms + article assimilation
This commit is contained in:
@@ -195,6 +195,8 @@ resource ParadigmsAra = open
|
|||||||
|
|
||||||
v8 : Str -> V ;
|
v8 : Str -> V ;
|
||||||
|
|
||||||
|
v10 : Str -> V ;
|
||||||
|
|
||||||
--3 Two-place verbs
|
--3 Two-place verbs
|
||||||
|
|
||||||
-- Two-place verbs need a preposition, except the special case with direct object.
|
-- Two-place verbs need a preposition, except the special case with direct object.
|
||||||
@@ -283,10 +285,12 @@ resource ParadigmsAra = open
|
|||||||
let { root = mkRoot3 rootStr ;
|
let { root = mkRoot3 rootStr ;
|
||||||
l = dp 2 rootStr } in --last rootStr
|
l = dp 2 rootStr } in --last rootStr
|
||||||
case <l, root.c> of {
|
case <l, root.c> of {
|
||||||
<"ّ",_> => v1geminate rootStr vPerf vImpf ;
|
<"ّ",_> => v1geminate rootStr vPerf vImpf ;
|
||||||
<"و"|"ي",_> => v1defective root vPerf vImpf ;
|
<"و"|"ي",_> => case vPerf of {
|
||||||
|
i => v1defective_i root vImpf ;
|
||||||
|
_ => v1defective_a root vImpf } ;
|
||||||
<_,"و"|"ي"> => v1hollow root vImpf ;
|
<_,"و"|"ي"> => v1hollow root vImpf ;
|
||||||
_ => v1sound root vPerf vImpf
|
_ => v1sound root vPerf vImpf
|
||||||
};
|
};
|
||||||
|
|
||||||
v2 =
|
v2 =
|
||||||
@@ -358,9 +362,18 @@ resource ParadigmsAra = open
|
|||||||
let {
|
let {
|
||||||
rbT = mkRoot3 rootStr ;
|
rbT = mkRoot3 rootStr ;
|
||||||
v8fun = case rbT.f of {
|
v8fun = case rbT.f of {
|
||||||
("و"|"ي"|"ّ") => v8assimilated ;
|
("و"|"ي"|"ّ") => v8assimilated ;
|
||||||
_ => v8sound }
|
_ => v8sound }
|
||||||
} in lin V (v8fun rbT) ;
|
} in lin V (v8fun rbT) ;
|
||||||
|
|
||||||
|
v10 =
|
||||||
|
\rootStr ->
|
||||||
|
let {
|
||||||
|
rbT = mkRoot3 rootStr ;
|
||||||
|
v10fun = case rbT.c of {
|
||||||
|
("و"|"ي") => v10hollow ;
|
||||||
|
_ => v10sound }
|
||||||
|
} in lin V (v10fun rbT) ;
|
||||||
|
|
||||||
Preposition = Str ;
|
Preposition = Str ;
|
||||||
|
|
||||||
@@ -562,10 +575,11 @@ formV : (root : Str) -> VerbForm -> V = \s,f -> case f of {
|
|||||||
FormV => v5 s ;
|
FormV => v5 s ;
|
||||||
FormVI => v6 s ;
|
FormVI => v6 s ;
|
||||||
--- FormVII => v7 s ;
|
--- FormVII => v7 s ;
|
||||||
FormVIII => v8 s
|
FormVIII => v8 s ;
|
||||||
|
FormX => v10 s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
param VerbForm =
|
param VerbForm =
|
||||||
FormI | FormII | FormIII | FormIV | FormV | FormVI | FormVIII ;
|
FormI | FormII | FormIII | FormIV | FormV | FormVI | FormVIII | FormX ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ flags coding=utf8 ;
|
|||||||
eiftacal = { h = "إِ"; m1 = "ْتَ" ; m2 = "َ" ; t = "" } ;
|
eiftacal = { h = "إِ"; m1 = "ْتَ" ; m2 = "َ" ; t = "" } ;
|
||||||
eufcil = { h = "أُ"; m1 = "ْ" ; m2 = "ِ" ; t = "" } ;
|
eufcil = { h = "أُ"; m1 = "ْ" ; m2 = "ِ" ; t = "" } ;
|
||||||
euftucil = { h = "أُ"; m1 = "ْتُ" ; m2 = "ِ" ; t = "" } ;
|
euftucil = { h = "أُ"; m1 = "ْتُ" ; m2 = "ِ" ; t = "" } ;
|
||||||
euttucil = euftucil ** { h = "تُّأُ" ; m1 = "" } ; ---- IL assimilated VIII
|
euttucil = euftucil ** { h = "اُتُّ" ; m1 = "ِ" } ; ---- IL assimilated VIII
|
||||||
afcul = { h = "َ" ; m1 = "ْ" ; m2 = "ُ" ; t = "" } ;
|
afcul = { h = "َ" ; m1 = "ْ" ; m2 = "ُ" ; t = "" } ;
|
||||||
faccalo = { h = "" ; m1 = "َ" ; m2 = "َّ" ; t = "ْ" } ;
|
faccalo = { h = "" ; m1 = "َ" ; m2 = "َّ" ; t = "ْ" } ;
|
||||||
facal = { h = "" ; m1 = "َ" ; m2 = "َ" ; t = "" } ;
|
facal = { h = "" ; m1 = "َ" ; m2 = "َ" ; t = "" } ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:../abstract:../common:../../prelude
|
--# -path=.:../abstract:../common:../../prelude
|
||||||
--
|
--
|
||||||
----1 Arabic auxiliary operations.
|
----1 Arabic auxiliary operations.
|
||||||
--
|
--
|
||||||
@@ -65,13 +65,13 @@ resource ResAra = PatternsAra ** open Prelude, Predef, ParamX in {
|
|||||||
mkStrong : Pattern -> Root3 -> Str = \p,fcl ->
|
mkStrong : Pattern -> Root3 -> Str = \p,fcl ->
|
||||||
p.h + fcl.f + p.m1 + fcl.c + p.m2 + fcl.l + p.t;
|
p.h + fcl.f + p.m1 + fcl.c + p.m2 + fcl.l + p.t;
|
||||||
|
|
||||||
mkDefective: Pattern -> Root3 -> Str = \p,fcl ->
|
mkDefective : Pattern -> Root3 -> Str = \p,fcl ->
|
||||||
p.h + fcl.f + p.m1 + fcl.c + p.t;
|
p.h + fcl.f + p.m1 + fcl.c + p.t;
|
||||||
|
|
||||||
mkHollow: Pattern -> Root3 -> Str = \p,fcl ->
|
mkHollow : Pattern -> Root3 -> Str = \p,fcl ->
|
||||||
p.h + fcl.f + p.m1 + fcl.l + p.t;
|
p.h + fcl.f + p.m1 + fcl.l + p.t;
|
||||||
|
|
||||||
mkAssimilated: Pattern -> Root3 -> Str = \p,fcl ->
|
mkAssimilated : Pattern -> Root3 -> Str = \p,fcl ->
|
||||||
p.h + fcl.c + p.m1 + fcl.l + p.t;
|
p.h + fcl.c + p.m1 + fcl.l + p.t;
|
||||||
|
|
||||||
-- takes a weak pattern and a triliteral root and makes
|
-- takes a weak pattern and a triliteral root and makes
|
||||||
@@ -211,43 +211,50 @@ oper
|
|||||||
_ => endVowel ! m
|
_ => endVowel ! m
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--macro for geminate verbs: FIXME, change the misleading variable names
|
|
||||||
verbGeminate : (_,_,_,_,_,_,_,_,_,_,_ : Str) -> Verb =
|
--macro for hollow verbs:
|
||||||
\xAf,xif,xyf,xuf,axAf,axaf,uxAf,uxaf,xaf,xAf',ppart ->
|
verbHollow : DefForms -> Verb =
|
||||||
let { perfPattern = patHollowPerf xAf xif xyf xuf ;
|
\vforms ->
|
||||||
impfPattern = patHollowImpf axAf axaf uxAf uxaf ;
|
let { xAf = vforms ! 0 ; -- VPerf Act _
|
||||||
impPattern = patHollowImp xaf xAf'
|
xif = vforms ! 1 ; -- VPerf Act (Per3 Fem Pl)
|
||||||
} in
|
xIf = vforms ! 2 ; -- VPerf Pas _
|
||||||
|
xuf = vforms ! 3 ; -- VPerf Pas (Per3 Fem Pl)
|
||||||
|
axAf = vforms ! 4 ; -- VImpf Act _
|
||||||
|
axaf = vforms ! 5 ; -- VImpf Act (Per2/Per3 Fem Pl)
|
||||||
|
uxAf = vforms ! 6 ; -- VImpf Pas _
|
||||||
|
uxaf = vforms ! 7 ; -- VImpf Pas (Per2/Per3 Fem Pl)
|
||||||
|
impSg = vforms ! 8 ; -- VImp (Sg Masc / Pl Fem)
|
||||||
|
impPl = vforms ! 9 ; -- VImp (Pl Masc / Sg Fem)
|
||||||
|
ppart = vforms ! 10 ; -- VPPart
|
||||||
|
|
||||||
|
patPerf = patHollowPerf xAf xif xIf xuf ;
|
||||||
|
patImpf = patHollowImpf axAf axaf uxAf uxaf ;
|
||||||
|
patJus = patHollowJus axaf axAf uxaf uxAf ;
|
||||||
|
patImp = patHollowImp impSg impPl ;
|
||||||
|
} in
|
||||||
{ s = table {
|
{ s = table {
|
||||||
VPerf v pgn => perfPattern ! v ! pgn + suffixPerf ! pgn ;
|
VPerf v pgn => patPerf ! v ! pgn + suffixPerf ! pgn ;
|
||||||
VImpf Ind v pgn => prefixImpf ! pgn + impfPattern ! v ! pgn + suffixImpfInd ! pgn ;
|
VImpf Ind v pgn => prefixImpf ! pgn + patImpf ! v ! pgn + suffixImpfInd ! pgn ;
|
||||||
VImpf m v pgn => prefixImpf ! pgn + impfPattern ! v ! pgn + suffixImpfCJ m ! pgn ;
|
VImpf Cnj v pgn => prefixImpf ! pgn + patImpf ! v ! pgn + suffixImpfCJ Cnj ! pgn ;
|
||||||
VImp g n => impPattern ! g ! n + suffixImpfCJ Jus ! (Per2 g n);
|
VImpf Jus v pgn => prefixImpf ! pgn + patJus ! v ! pgn + suffixImpfCJ Jus ! pgn ;
|
||||||
VPPart => ppart
|
VImp g n => patImp ! g ! n + suffixImpfCJ Jus ! Per2 g n ;
|
||||||
|
VPPart => ppart
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--macro for hollow verbs:
|
--macro for geminate verbs: same behaviour as hollow verbs, except for jussive.
|
||||||
verbHollow : (_,_,_,_,_,_,_,_,_,_,_ : Str) -> Verb =
|
-- IL -- to be tested: there are no geminate verbs in LexiconAra
|
||||||
\xAf,xif,xyf,xuf,axAf,axaf,uxAf,uxaf,xaf,xAf',ppart ->
|
verbGeminate : DefForms -> Verb = \vforms ->
|
||||||
let { perfPattern = patHollowPerf xAf xif xyf xuf ;
|
let verbHol = verbHollow vforms
|
||||||
impfPattern = patHollowImpf axAf axaf uxAf uxaf ;
|
in { s = table {
|
||||||
impPattern = patHollowImp axaf xAf' ;
|
VImpf Jus v pgn => verbHol.s ! VImpf Cnj v pgn ;
|
||||||
jusPattern = patHollowJus axaf axAf uxaf uxAf ;
|
x => verbHol.s ! x
|
||||||
} in
|
}
|
||||||
{ s = table {
|
} ;
|
||||||
VPerf v pgn => perfPattern ! v ! pgn + suffixPerf ! pgn ;
|
|
||||||
VImpf Ind v pgn => prefixImpf ! pgn + impfPattern ! v ! pgn + suffixImpfInd ! pgn ;
|
|
||||||
VImpf Cnj v pgn => prefixImpf ! pgn + impfPattern ! v ! pgn + suffixImpfCJ Cnj ! pgn ;
|
|
||||||
VImpf Jus v pgn => prefixImpf ! pgn + jusPattern ! v ! pgn + suffixImpfCJ Jus ! pgn ;
|
|
||||||
VImp g n => impPattern ! g ! n + suffixImpfCJ Jus ! (Per2 g n);
|
|
||||||
VPPart => ppart
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
--macro for defective verbs:
|
--macro for defective verbs:
|
||||||
verbDef : DefForms -> Vowel -> Verb =
|
verbDef : DefForms -> Vowel -> Verb =
|
||||||
\vforms,vImpf ->
|
\vforms,vowImpf ->
|
||||||
let {
|
let {
|
||||||
rama = vforms ! 0 ; -- VPerf Act (Per3 Masc Sg)
|
rama = vforms ! 0 ; -- VPerf Act (Per3 Masc Sg)
|
||||||
ramay = vforms ! 1 ; -- VPerf Act (Per3 Fem Pl)
|
ramay = vforms ! 1 ; -- VPerf Act (Per3 Fem Pl)
|
||||||
@@ -266,11 +273,11 @@ oper
|
|||||||
patImp = patDefImp Irmi Irmu
|
patImp = patDefImp Irmi Irmu
|
||||||
} in
|
} in
|
||||||
{ s = table {
|
{ s = table {
|
||||||
VPerf v pgn => patPerf ! v ! pgn + (suffixPerfDef v) ! pgn ;
|
VPerf v pgn => patPerf ! v ! pgn + suffixPerfDef v ! pgn ;
|
||||||
VImpf m Act pgn => prefixImpf ! pgn + patImpfAct ! pgn + (suffixImpfDef Act vImpf) ! m ! pgn ;
|
VImpf m Act pgn => prefixImpf ! pgn + patImpfAct ! pgn + suffixImpfDef Act vowImpf ! m ! pgn ;
|
||||||
VImpf m Pas pgn => prefixImpf ! pgn + urma + (suffixImpfDef Pas vImpf) ! m ! pgn ;
|
VImpf m Pas pgn => prefixImpf ! pgn + urma + suffixImpfDef Pas vowImpf ! m ! pgn ;
|
||||||
VImp g n => patImp ! g ! n + (suffixImpfDef Act vImpf) ! Jus ! (Per2 g n) ;
|
VImp g n => patImp ! g ! n + suffixImpfDef Act vowImpf ! Jus ! Per2 g n ;
|
||||||
VPPart => ppart
|
VPPart => ppart
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -279,16 +286,16 @@ oper
|
|||||||
Act =>
|
Act =>
|
||||||
table {
|
table {
|
||||||
Per3 Fem Pl => ramay ;
|
Per3 Fem Pl => ramay ;
|
||||||
Per3 _ _ => rama ;
|
Per3 _ _ => rama ;
|
||||||
_ => ramay
|
_ => ramay
|
||||||
} ;
|
} ;
|
||||||
Pas =>
|
Pas =>
|
||||||
table {
|
table {
|
||||||
Per3 Masc Pl => rumu ;
|
Per3 Masc Pl => rumu ;
|
||||||
Per3 Fem Pl => rumy ;
|
Per3 Fem Pl => rumy ;
|
||||||
Per3 _ _ => rumi ;
|
Per3 _ _ => rumi ;
|
||||||
_ => rumy
|
_ => rumy
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--ignores the vowel=u case, eg "دعو"
|
--ignores the vowel=u case, eg "دعو"
|
||||||
@@ -375,13 +382,13 @@ oper
|
|||||||
--now is used for the sound, assimilated (weak C1), and when C1 = hamza:
|
--now is used for the sound, assimilated (weak C1), and when C1 = hamza:
|
||||||
|
|
||||||
v1sound : Root3 -> Vowel -> Vowel -> Verb =
|
v1sound : Root3 -> Vowel -> Vowel -> Verb =
|
||||||
\fcl,vPerf,vImpf ->
|
\fcl,vowPerf,vowImpf ->
|
||||||
let {
|
let {
|
||||||
qf = {f = fcl.c ; c = fcl.l} ;
|
qf = {f = fcl.c ; c = fcl.l} ;
|
||||||
qif = mkBilit (fvc ! vImpf) qf;
|
qif = mkBilit (fvc ! vowImpf) qf;
|
||||||
katab = mkStrong (patV1Perf ! vPerf) fcl ;
|
katab = mkStrong (patV1Perf ! vowPerf) fcl ;
|
||||||
kutib = mkStrong fucil fcl ; --FIXME no passive if vPerf == u
|
kutib = mkStrong fucil fcl ; --FIXME no passive if vowPerf == u
|
||||||
ktub = mkStrong (patV1Impf ! vImpf) fcl ;
|
ktub = mkStrong (patV1Impf ! vowImpf) fcl ;
|
||||||
aktub = "َ" +
|
aktub = "َ" +
|
||||||
case fcl.f of {
|
case fcl.f of {
|
||||||
"و"|"ي" => qif ;
|
"و"|"ي" => qif ;
|
||||||
@@ -390,28 +397,28 @@ v1sound : Root3 -> Vowel -> Vowel -> Verb =
|
|||||||
uktab = mkStrong ufcal fcl ;
|
uktab = mkStrong ufcal fcl ;
|
||||||
euktub = case fcl.f of {
|
euktub = case fcl.f of {
|
||||||
"؟"|"و"|"ي" => qif ;
|
"؟"|"و"|"ي" => qif ;
|
||||||
_ => prefixImp ! vImpf + ktub
|
_ => prefixImp ! vowImpf + ktub
|
||||||
};
|
};
|
||||||
maktUb = mkStrong mafcUl fcl
|
maktUb = mkStrong mafcUl fcl
|
||||||
} in
|
} in
|
||||||
verb katab kutib aktub uktab euktub maktUb ;
|
verb katab kutib aktub uktab euktub maktUb ;
|
||||||
|
|
||||||
v1hollow : Root3 -> Vowel -> Verb =
|
v1hollow : Root3 -> Vowel -> Verb =
|
||||||
\xwf,vowel ->
|
\xwf,vowImpf ->
|
||||||
let {
|
let {
|
||||||
xAf = mkHollow fAc xwf ;
|
xif = mkHollow (patHol1 ! vowImpf) xwf ; -- VPerf Act (Per3 Fem Pl)
|
||||||
xif = mkHollow (patHol1 ! vowel) xwf ;
|
xAf = mkHollow fAc xwf ; -- VPerf Act _
|
||||||
xyf = mkHollow fIc xwf ;
|
xuf = mkHollow (patHol2 ! vowImpf) xwf ; -- VPerf Pas (Per3 Fem Pl)
|
||||||
xuf = mkHollow (patHol2 ! vowel) xwf ;
|
xIf = mkHollow fIc xwf ; -- VPerf Pas _
|
||||||
xaf = mkHollow (fvc ! vowel) xwf ;
|
xaf = mkHollow (fvc ! vowImpf) xwf ; -- VImp Sg Masc / Pl Fem
|
||||||
axaf= "َ" + xaf ;
|
xAf'= mkHollow (fVc ! vowImpf) xwf ; -- VImp Pl Masc / Sg Fem
|
||||||
uxAf= mkHollow ufAc xwf ;
|
axaf= "َ" + xaf ; -- VImpf Act (Per2/Per3 Fem Pl)
|
||||||
uxaf= "ُ" + xaf ;
|
axAf= "َ" + xAf'; -- VImpf Act _
|
||||||
xAf'= mkHollow (patHol3 ! vowel) xwf ;
|
uxaf= "ُ" + xaf ; -- VImpf Pas (Per2/Per3 Fem Pl)
|
||||||
axAf= "َ" + xAf';
|
uxAf= mkHollow ufAc xwf ; -- VImpf Pas _
|
||||||
ppart = "مَ" + xAf' -- FIXME actually wierd anomalies happen with the a vowel..
|
ppart = "مَ" + xAf' -- FIXME actually wierd anomalies happen with the a vowel..
|
||||||
|
|
||||||
} in verbHollow xAf xif xyf xuf axAf axaf uxAf uxaf xaf xAf' ppart ;
|
} in verbHollow (toDefForms xAf xif xIf xuf axAf axaf uxAf uxaf xaf xAf' ppart) ;
|
||||||
|
|
||||||
patHol1 : Vowel => Pattern =
|
patHol1 : Vowel => Pattern =
|
||||||
table { u => fuc ; _ => fic} ;
|
table { u => fuc ; _ => fic} ;
|
||||||
@@ -419,11 +426,11 @@ patHol1 : Vowel => Pattern =
|
|||||||
patHol2 : Vowel => Pattern =
|
patHol2 : Vowel => Pattern =
|
||||||
table { u => fic ; _ => fuc} ;
|
table { u => fic ; _ => fuc} ;
|
||||||
|
|
||||||
patHol3 : Vowel => Pattern =
|
fVc : Vowel => Pattern =
|
||||||
table {
|
table {
|
||||||
u => fUc ;
|
u => fUc ;
|
||||||
i => fIc ;
|
i => fIc ;
|
||||||
a => fAc
|
a => fAc
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--used in assimilated (wqf -> qif, wqc -> qac..) and hollow (qwl -> qul, xwf->xaf..)
|
--used in assimilated (wqf -> qif, wqc -> qac..) and hollow (qwl -> qul, xwf->xaf..)
|
||||||
@@ -436,23 +443,25 @@ fvc : Vowel => Pattern =
|
|||||||
|
|
||||||
|
|
||||||
v1geminate : Str -> Vowel -> Vowel -> Verb =
|
v1geminate : Str -> Vowel -> Vowel -> Verb =
|
||||||
\rootStr,vPerf,vImpf ->
|
\rootStr,vowPerf,vowImpf ->
|
||||||
let {
|
let {
|
||||||
mdd = mkRoot3 rootStr ; --fcc
|
mdd = mkRoot3 rootStr ; --fcc
|
||||||
md = mkRoot2 rootStr ; --fc
|
md = mkRoot2 rootStr ; --fc
|
||||||
madd = mkBilit facc md ;
|
madd = mkBilit facc md ;
|
||||||
madad = mkStrong (patGem1 ! vPerf) mdd ;
|
madad = mkStrong (patGem1 ! vowPerf) mdd ;
|
||||||
mudd = mkBilit fucc md ;
|
mudd = mkBilit fucc md ;
|
||||||
mudid = mkStrong fucil mdd ;
|
mudid = mkStrong fucil mdd ;
|
||||||
mudd' = mkBilit (patGem2 ! vImpf) md ;
|
mudd' = mkBilit (patGem2 ! vowImpf) md ;
|
||||||
amudd = "َ" + mudd' ;
|
amudd = "َ" + mudd' ;
|
||||||
mdud = mkStrong (patGem3 ! vImpf) mdd ;
|
mdud = mkStrong (patGem3 ! vowImpf) mdd ;
|
||||||
amdud = "َ" + mdud ;
|
amdud = "َ" + mdud ;
|
||||||
umadd = "ُ" + madd ;
|
umadd = "ُ" + madd ;
|
||||||
umdad = "ُ" + mkStrong fcal mdd ;
|
umdad = "ُ" + mkStrong fcal mdd ;
|
||||||
Umdud = (prefixImp ! vImpf) + mdud;
|
Umdud = (prefixImp ! vowImpf) + mdud;
|
||||||
mamdUd = mkStrong mafcUl mdd
|
mamdUd = mkStrong mafcUl mdd
|
||||||
} in verbGeminate madd madad mudd mudid amudd amdud umadd umdad Umdud mudd' mamdUd;
|
} in verbGeminate (toDefForms
|
||||||
|
madd madad mudd mudid amudd amdud
|
||||||
|
umadd umdad Umdud mudd' mamdUd) ;
|
||||||
|
|
||||||
patGem1 : Vowel => Pattern =
|
patGem1 : Vowel => Pattern =
|
||||||
table {
|
table {
|
||||||
@@ -475,59 +484,47 @@ patGem3 : Vowel => Pattern =
|
|||||||
i => fcil --no such verb probably exists
|
i => fcil --no such verb probably exists
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- IL -- Defective, hollow and geminate verbs all need 11 forms.
|
||||||
|
{- NB. the numbers don't always refer to the same forms!
|
||||||
|
The verb(Def|Hollow|Geminate) constructors pick the right forms. -}
|
||||||
DefForms : Type = Predef.Ints 10 => Str ;
|
DefForms : Type = Predef.Ints 10 => Str ;
|
||||||
|
|
||||||
toDefForms : (x1,_,_,_,_,_,_,_,_,_,x11 : Str) -> DefForms =
|
toDefForms : (x1,_,_,_,_,_,_,_,_,_,x11 : Str) -> DefForms =
|
||||||
\rama,ramay,rumi,rumu,rumiy,armi,armu,urma,eirmi,eirmu,marmiy ->
|
\a,b,c,d,e,f,g,h,i,j,k ->
|
||||||
table {
|
table {
|
||||||
0 => rama ;
|
0 => a ; 1 => b ; 2 => c ; 3 => d ; 4 => e ; 5 => f ; 6 => g ;
|
||||||
1 => ramay ;
|
7 => h ; 8 => i ; 9 => j ; 10 => k
|
||||||
2 => rumi ;
|
} ;
|
||||||
3 => rumu ;
|
|
||||||
4 => rumiy ;
|
|
||||||
5 => armi ;
|
|
||||||
6 => armu ;
|
|
||||||
7 => urma ;
|
|
||||||
8 => eirmi ;
|
|
||||||
9 => eirmu ;
|
|
||||||
10 => marmiy
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
def1Forms_perfA : Root3 -> Vowel -> DefForms = \rmy,vowImpf ->
|
||||||
def1Forms_vPerfA : Root3 -> Vowel -> DefForms = \rmy,vImpf ->
|
|
||||||
let {
|
let {
|
||||||
|
_rmi = mkDefective (patDef1 ! vowImpf) rmy ;
|
||||||
|
_rmu = mkDefective (patDef2 ! vowImpf) rmy ;
|
||||||
rama = mkDefective faca rmy ;
|
rama = mkDefective faca rmy ;
|
||||||
ramay = mkStrong facalo rmy ;
|
ramay = mkStrong facalo rmy ;
|
||||||
rumi = mkDefective fuci rmy ;
|
rumi = mkDefective fuci rmy ;
|
||||||
rumu = mkDefective fucu rmy ;
|
rumu = mkDefective fucu rmy ;
|
||||||
rumiy = mkStrong fucilo rmy ;
|
rumiy = mkStrong fucilo rmy ;
|
||||||
rmi = mkDefective (patDef1 ! vImpf) rmy ;
|
armi = "َ" + _rmi ;
|
||||||
armi = "َ" + rmi ;
|
armu = "َ" + _rmu ;
|
||||||
rmu = mkDefective (patDef2 ! vImpf) rmy ;
|
|
||||||
armu = "َ" + rmu ;
|
|
||||||
urma = mkDefective ufca rmy ;
|
urma = mkDefective ufca rmy ;
|
||||||
eirmi = prefixImp ! vImpf + rmi;
|
eirmi = prefixImp ! vowImpf + _rmi;
|
||||||
eirmu = prefixImp ! vImpf + rmu;
|
eirmu = prefixImp ! vowImpf + _rmu;
|
||||||
marmiy = mkStrong mafcil rmy
|
marmiy = mkStrong mafcil rmy
|
||||||
} in toDefForms rama ramay rumi rumu rumiy armi armu urma eirmi eirmu marmiy ;
|
} in toDefForms rama ramay rumi rumu rumiy armi armu urma eirmi eirmu marmiy ;
|
||||||
|
|
||||||
v1defective : Root3 -> Vowel -> Vowel -> Verb = \rmy,vPerf,vImpf ->
|
v1defective_a : Root3 -> Vowel -> Verb = \rmy,vowImpf ->
|
||||||
case vPerf of {
|
let vforms = def1Forms_perfA rmy vowImpf
|
||||||
i => v1defective_i rmy vImpf ;
|
in verbDef vforms vowImpf ;
|
||||||
_ => v1defective_a rmy vImpf
|
|
||||||
} ;
|
|
||||||
|
|
||||||
v1defective_a : Root3 -> Vowel -> Verb = \rmy,vImpf ->
|
v1defective_i : Root3 -> Vowel -> Verb = \bqy,vowImpf -> -- IL (conjugation 1d4)
|
||||||
let vforms = def1Forms_vPerfA rmy vImpf
|
let vforms_a = def1Forms_perfA bqy vowImpf ;
|
||||||
in verbDef vforms vImpf ;
|
|
||||||
|
|
||||||
v1defective_i : Root3 -> Vowel -> Verb = \bqy,vImpf -> -- IL (conjugation 1d4)
|
|
||||||
let vforms_a = def1Forms_vPerfA bqy vImpf ;
|
|
||||||
baqI = mkDefective facIl bqy ;
|
baqI = mkDefective facIl bqy ;
|
||||||
baqiy = mkDefective facil bqy ;
|
baqiy = mkDefective facil bqy ;
|
||||||
vforms_i = table { 0 => baqI ;
|
vforms_i = table { 0 => baqI ;
|
||||||
1 => baqiy ;
|
1 => baqiy ;
|
||||||
x => vforms_a ! x } ;
|
x => vforms_a ! x } ;
|
||||||
in verbDef vforms_i vImpf ;
|
in verbDef vforms_i vowImpf ;
|
||||||
|
|
||||||
patDef1 : Vowel => Pattern =
|
patDef1 : Vowel => Pattern =
|
||||||
table {
|
table {
|
||||||
@@ -656,6 +653,42 @@ v8assimilated : Root3 -> Verb = --- IL 8a1
|
|||||||
muttafaq = "م" + uttafaq
|
muttafaq = "م" + uttafaq
|
||||||
} in verb eittafaq euttufiq attafiq uttafaq eittafiq muttafaq;
|
} in verb eittafaq euttufiq attafiq uttafaq eittafiq muttafaq;
|
||||||
|
|
||||||
|
v10sound : Root3 -> Verb = ---- IL 10s -- to be checked
|
||||||
|
\qtl ->
|
||||||
|
let {
|
||||||
|
_staqtal = "َستَ" + mkStrong fcal qtl ;
|
||||||
|
_staqtil = "َستَ" + mkStrong fcil qtl;
|
||||||
|
istaqtal = "اِ" + _staqtal ; -- VPerf Act
|
||||||
|
ustuqtil = "اُسْتُ" + mkStrong fcil qtl; -- VPerf Pas
|
||||||
|
astaqtil = "َ" + _staqtil ; -- VImpf _ Act
|
||||||
|
astaqtal = "َ" + _staqtal ; -- VImpf _ Pas
|
||||||
|
istaqtil = "اِ" + _staqtil ; -- VImp
|
||||||
|
mustaqtal = "مُ" + _staqtal -- VPPart
|
||||||
|
} in
|
||||||
|
verb istaqtal ustuqtil astaqtil astaqtal istaqtil mustaqtal ;
|
||||||
|
|
||||||
|
v10hollow : Root3 -> Verb = ---- IL 10h -- to be checked
|
||||||
|
\xwf ->
|
||||||
|
let {
|
||||||
|
_staxaf = "سْتَ" + mkHollow fac xwf ;
|
||||||
|
_staxAf = "سْتَ" + mkHollow fAc xwf ;
|
||||||
|
_staxif = "سْتَ" + mkHollow fic xwf ;
|
||||||
|
_staxIf = "سْتَ" + mkHollow fIc xwf ;
|
||||||
|
istaxaf = "اِ" + _staxaf ; -- VPerf Act (Per3 Fem Pl)
|
||||||
|
istaxAf = "اِ" + _staxAf ; -- VPerf Act _
|
||||||
|
ustuxif = "اُسْتُ" + mkHollow fic xwf ; -- VPerf Pas (Per3 Fem Pl)
|
||||||
|
ustuxIf = "اُسْتُ" + mkHollow fIc xwf ; -- VPerf Pas _
|
||||||
|
istaxif = "اِ" + _staxif ; -- VImp Sg Masc / Pl Fem
|
||||||
|
istaxIf = "اِ" + _staxIf ; -- VImp Pl Masc / Sg Fem
|
||||||
|
astaxif = "َ" + _staxif ; -- VImpf Act (Per2/Per3 Fem Pl)
|
||||||
|
astaxIf = "َ" + _staxIf ; -- VImpf Act _
|
||||||
|
ustaxaf = "ُ" + _staxaf ; -- VImpf Pas (Per2/Per3 Fem Pl)
|
||||||
|
ustaxAf = "ُ" + _staxAf ; -- VImpf Pas _
|
||||||
|
ppart = "مُ" + _staxIf -- PPart ("weird anomalies" here too?)
|
||||||
|
|
||||||
|
} in verbHollow (toDefForms
|
||||||
|
istaxAf istaxaf ustuxIf ustuxif astaxIf astaxif
|
||||||
|
ustaxAf ustaxaf istaxif istaxIf ppart) ;
|
||||||
|
|
||||||
patV1Perf : Vowel => Pattern =
|
patV1Perf : Vowel => Pattern =
|
||||||
table {
|
table {
|
||||||
@@ -681,66 +714,64 @@ endVowel : Mood => Str =
|
|||||||
prefixImp : Vowel => Str =
|
prefixImp : Vowel => Str =
|
||||||
table {
|
table {
|
||||||
u => "أُ" ;
|
u => "أُ" ;
|
||||||
_ => "إِ"
|
_ => "إِ"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
patHollowPerf : (_,_,_,_ :Str) -> Voice => PerGenNum => Str = \xAf,xif,xyf,xuf ->
|
patHollowPerf : (_,_,_,_ :Str) -> Voice => PerGenNum => Str = \xAf,xif,xIf,xuf ->
|
||||||
table {
|
table {
|
||||||
Act =>
|
Act =>
|
||||||
table {
|
table {
|
||||||
Per3 Fem Pl => xif ;
|
Per3 Fem Pl => xif ;
|
||||||
Per3 _ _ => xAf ;
|
Per3 _ _ => xAf ;
|
||||||
_ => xif
|
_ => xif
|
||||||
} ;
|
} ;
|
||||||
Pas =>
|
Pas =>
|
||||||
table {
|
table {
|
||||||
Per3 Fem Pl => xuf ;
|
Per3 Fem Pl => xuf ;
|
||||||
Per3 _ _ => xyf ;
|
Per3 _ _ => xIf ;
|
||||||
_ => xuf
|
_ => xuf
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--this is the pattern of imperfect hollow (ind & conj) and geminate verbs (all)
|
--this is the pattern of imperfect hollow (ind & conj) and geminate verbs (all)
|
||||||
patHollowImpf : (_,_,_,_ :Str) -> Voice => PerGenNum => Str = \axAf,axaf,uxAf,uxaf ->
|
patHollowImpf : (_,_,_,_ :Str) -> Voice => PerGenNum => Str = \axAf,axaf,uxAf,uxaf ->
|
||||||
table {
|
table {
|
||||||
Act =>
|
Act =>
|
||||||
table {
|
table {
|
||||||
Per3 Fem Pl => axaf ;
|
Per3 Fem Pl => axaf ;
|
||||||
Per2 Fem Pl => axaf ;
|
Per2 Fem Pl => axaf ;
|
||||||
_ => axAf
|
_ => axAf
|
||||||
} ;
|
} ;
|
||||||
Pas =>
|
Pas =>
|
||||||
table {
|
table {
|
||||||
Per3 Fem Pl => uxaf ;
|
Per3 Fem Pl => uxaf ;
|
||||||
Per2 Fem Pl => uxaf ;
|
Per2 Fem Pl => uxaf ;
|
||||||
_ => uxAf
|
_ => uxAf
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
patHollowJus : (_,_,_,_ : Str) -> Voice => PerGenNum => Str =\axaf,axAf,uxaf,uxAf->
|
patHollowJus : (_,_,_,_ : Str) -> Voice => PerGenNum => Str =\axaf,axAf,uxaf,uxAf->
|
||||||
table {
|
table {
|
||||||
Act =>
|
Act =>
|
||||||
table {
|
table {
|
||||||
Per3 g Sg => axaf ;
|
Per3 _ Sg => axaf ;
|
||||||
Per3 Fem Pl => axaf;
|
Per3 Fem Pl => axaf ;
|
||||||
Per2 Fem Pl => axaf;
|
Per2 Fem Pl => axaf ;
|
||||||
Per2 Masc Sg => axaf;
|
Per2 Masc Sg => axaf ;
|
||||||
Per1 _ => axaf;
|
Per1 _ => axaf ;
|
||||||
_ => axAf
|
_ => axAf
|
||||||
} ;
|
} ;
|
||||||
Pas =>
|
Pas =>
|
||||||
table {
|
table {
|
||||||
Per3 g Sg => uxaf ;
|
Per3 _ Sg => uxaf ;
|
||||||
Per3 Fem Pl => uxaf;
|
Per3 Fem Pl => uxaf ;
|
||||||
Per2 Fem Pl => uxaf;
|
Per2 Fem Pl => uxaf ;
|
||||||
Per2 Masc Sg => uxaf;
|
Per2 Masc Sg => uxaf ;
|
||||||
Per1 _ => uxaf;
|
Per1 _ => uxaf ;
|
||||||
_ => uxAf
|
_ => uxAf
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
||||||
table {
|
table {
|
||||||
Masc => table { Sg => xaf ; _ => xAf} ;
|
Masc => table { Sg => xaf ; _ => xAf} ;
|
||||||
@@ -847,25 +878,19 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
_ => ""
|
_ => ""
|
||||||
};
|
};
|
||||||
|
|
||||||
defArt : State -> Str -> Str = \st,stem ->
|
-- "Sun letters": assimilate with def. article
|
||||||
let arra = "الرَّ" ;
|
sun : pattern Str = #("ت"|"ث"|"د"|"ذ"|"ر"|"ز"|"س"|"ش"|"ص"|"ض"|"ط"|"ظ"|"ل"|"ن") ;
|
||||||
arri = "الرِّ" ;
|
|
||||||
arr = "الرِّ" ;
|
vow : pattern Str = #("َ" | "ِ" | "ُ") ;
|
||||||
atta = "التَ" ;
|
defArt : State -> Str -> Str = \st,stem -> -- IL -- to be checked
|
||||||
atti = "التِّ";
|
let al = "ال" in
|
||||||
att = "التّ" ;
|
case st of {
|
||||||
al = "ال" ;
|
Def =>
|
||||||
in case st of { -- TODO rest of the assimilations
|
case stem of {
|
||||||
Def => case stem of {
|
s@#sun + v@#vow + x => al + s + v + "ّ" + x ; -- vowel before shadda
|
||||||
ra@"رَ" + x => arra + x ;
|
s@#sun + x => al + s + "ّ" + x;
|
||||||
ri@"رِ" + x => arri + x ;
|
x => al + x } ;
|
||||||
r@"ر" + x => arr + x ; -- no vowel specified
|
_ => stem
|
||||||
ta@"تَ" + x => atta + x ;
|
|
||||||
ti@"تِ" + x => atti + x ;
|
|
||||||
t@"ت" + x => att + x ; -- no vowel specified
|
|
||||||
_ => al + stem
|
|
||||||
} ;
|
|
||||||
_ => "" + stem
|
|
||||||
};
|
};
|
||||||
|
|
||||||
--declension 1 (strong ending) of the singular or broken plural words
|
--declension 1 (strong ending) of the singular or broken plural words
|
||||||
|
|||||||
Reference in New Issue
Block a user