forked from GitHub/gf-rgl
(Ara) Add paradigm for doubly weak FormIV + remove hamza from imperative prefix
This commit is contained in:
@@ -6,6 +6,8 @@ flags coding=utf8 ;
|
|||||||
|
|
||||||
vow : pattern Str = #("َ" | "ِ" | "ُ" | "ً" | "ٍ" | "ٌ") ;
|
vow : pattern Str = #("َ" | "ِ" | "ُ" | "ً" | "ٍ" | "ٌ") ;
|
||||||
|
|
||||||
|
weak : pattern Str = #("و"|"ي") ;
|
||||||
|
|
||||||
-- "Sun letters": assimilate with def. article
|
-- "Sun letters": assimilate with def. article
|
||||||
sun : pattern Str = #("ت"|"ث"|"د"|"ذ"|"ر"|"ز"|"س"|"ش"|"ص"|"ض"|"ط"|"ظ"|"ل"|"ن") ;
|
sun : pattern Str = #("ت"|"ث"|"د"|"ذ"|"ر"|"ز"|"س"|"ش"|"ص"|"ض"|"ط"|"ظ"|"ل"|"ن") ;
|
||||||
|
|
||||||
@@ -17,6 +19,12 @@ flags coding=utf8 ;
|
|||||||
_ => word + suffix
|
_ => word + suffix
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- IL: using this to reuse patterns for weak verbs, might be strange/wrong
|
||||||
|
rmSukun : Str -> Str = \s -> case s of {
|
||||||
|
x + "ْ" + y => x + y ;
|
||||||
|
_ => s
|
||||||
|
} ;
|
||||||
|
|
||||||
-- Hamza
|
-- Hamza
|
||||||
hamza : pattern Str = #("ء"|"؟") ;
|
hamza : pattern Str = #("ء"|"؟") ;
|
||||||
|
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ resource ParadigmsAra = open
|
|||||||
} in {
|
} in {
|
||||||
s =
|
s =
|
||||||
case root.l of {
|
case root.l of {
|
||||||
"و"|"ي" => (v2defective root).s;
|
#weak => (v2defective root).s;
|
||||||
_ => (v2sound root).s
|
_ => (v2sound root).s
|
||||||
};
|
};
|
||||||
lock_V = <>
|
lock_V = <>
|
||||||
@@ -368,16 +368,12 @@ resource ParadigmsAra = open
|
|||||||
|
|
||||||
v4 =
|
v4 =
|
||||||
\rootStr ->
|
\rootStr ->
|
||||||
let {
|
let root : Root3 = mkRoot3 rootStr ;
|
||||||
root = mkRoot3 rootStr
|
verb : Verb = case rootStr of {
|
||||||
} in {
|
? + #hamza + #weak => v4doubleweak root ;
|
||||||
s =
|
_ + #weak => v4defective root ;
|
||||||
case root.l of {
|
_ => v4sound root } ;
|
||||||
"و"|"ي" => (v4defective root).s;
|
in lin V verb ;
|
||||||
_ => (v4sound root).s
|
|
||||||
};
|
|
||||||
lock_V = <>
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
v5 =
|
v5 =
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ resource ResAra = PatternsAra ** open Prelude, Predef, OrthoAra, ParamX in {
|
|||||||
isNum : Bool
|
isNum : Bool
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
uttNum : NumOrdCard -> (Gender => Str) ;
|
uttNum : NumOrdCard -> (Gender => Str) ;
|
||||||
uttNum n = \\g => n.s ! g ! Def ! Nom ; ----IL
|
uttNum n = \\g => n.s ! g ! Def ! Nom ; ----IL
|
||||||
|
|
||||||
@@ -263,8 +262,11 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
--macro for defective verbs:
|
--macro for defective verbs:
|
||||||
verbDef : DefForms -> Vowel -> Verb =
|
verbDef : DefForms -> Vowel -> Verb = verbDefBool False ;
|
||||||
\vforms,vowImpf ->
|
verbDoubleDef : DefForms -> Vowel -> Verb = verbDefBool True ;
|
||||||
|
|
||||||
|
verbDefBool : Bool -> DefForms -> Vowel -> Verb =
|
||||||
|
\isDoubleDef,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)
|
||||||
@@ -280,13 +282,14 @@ oper
|
|||||||
|
|
||||||
patPerf = patDefPerf rama ramay rumi rumu rumiy ;
|
patPerf = patDefPerf rama ramay rumi rumu rumiy ;
|
||||||
patImpfAct = patDefImpfAct armi armu ;
|
patImpfAct = patDefImpfAct armi armu ;
|
||||||
patImp = patDefImp Irmi Irmu
|
patImp = patDefImp Irmi Irmu ;
|
||||||
|
suffixImpf = case isDoubleDef of {True => suffixImpfDoubleDef ; _ => suffixImpfDef}
|
||||||
} 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 vowImpf ! m ! pgn ;
|
VImpf m Act pgn => prefixImpf ! pgn + patImpfAct ! pgn + suffixImpf Act vowImpf ! m ! pgn ;
|
||||||
VImpf m Pas pgn => prefixImpf ! pgn + urma + suffixImpfDef Pas vowImpf ! m ! pgn ;
|
VImpf m Pas pgn => prefixImpf ! pgn + urma + suffixImpf Pas vowImpf ! m ! pgn ;
|
||||||
VImp g n => patImp ! g ! n + suffixImpfDef Act vowImpf ! Jus ! Per2 g n ;
|
VImp g n => patImp ! g ! n + suffixImpf Act vowImpf ! Jus ! Per2 g n ;
|
||||||
VPPart => ppart
|
VPPart => ppart
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
@@ -352,7 +355,6 @@ oper
|
|||||||
Per1 Plur => "نَا"
|
Per1 Plur => "نَا"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
suffixImpfDef : Voice -> Vowel -> Mood => PerGenNum => Str = \vc,vw ->
|
suffixImpfDef : Voice -> Vowel -> Mood => PerGenNum => Str = \vc,vw ->
|
||||||
let {
|
let {
|
||||||
default : Mood -> Str = \m ->
|
default : Mood -> Str = \m ->
|
||||||
@@ -389,6 +391,10 @@ oper
|
|||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- does this even happen other than with رءي? /IL
|
||||||
|
suffixImpfDoubleDef : Voice -> Vowel -> Mood => PerGenNum => Str = \vc,vw ->
|
||||||
|
\\m,p => rmSukun (suffixImpfDef vc vw ! m ! p) ;
|
||||||
|
|
||||||
--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 =
|
||||||
@@ -406,7 +412,7 @@ 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 ! vowImpf + ktub
|
_ => prefixImp ! vowImpf + ktub
|
||||||
};
|
};
|
||||||
maktUb = mkStrong mafcUl fcl
|
maktUb = mkStrong mafcUl fcl
|
||||||
@@ -506,7 +512,7 @@ toDefForms : (x1,_,_,_,_,_,_,_,_,_,x11 : Str) -> DefForms =
|
|||||||
7 => h ; 8 => i ; 9 => j ; 10 => k
|
7 => h ; 8 => i ; 9 => j ; 10 => k
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
def1Forms_perfA : Root3 -> Vowel -> DefForms = \rmy,vowImpf ->
|
v1DefForms_perfA : Root3 -> Vowel -> DefForms = \rmy,vowImpf ->
|
||||||
let {
|
let {
|
||||||
_rmi = mkDefective (patDef1 ! vowImpf) rmy ;
|
_rmi = mkDefective (patDef1 ! vowImpf) rmy ;
|
||||||
_rmu = mkDefective (patDef2 ! vowImpf) rmy ;
|
_rmu = mkDefective (patDef2 ! vowImpf) rmy ;
|
||||||
@@ -524,11 +530,11 @@ def1Forms_perfA : Root3 -> Vowel -> DefForms = \rmy,vowImpf ->
|
|||||||
} 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_a : Root3 -> Vowel -> Verb = \rmy,vowImpf ->
|
v1defective_a : Root3 -> Vowel -> Verb = \rmy,vowImpf ->
|
||||||
let vforms = def1Forms_perfA rmy vowImpf
|
let vforms = v1DefForms_perfA rmy vowImpf
|
||||||
in verbDef vforms vowImpf ;
|
in verbDef vforms vowImpf ;
|
||||||
|
|
||||||
v1defective_i : Root3 -> Vowel -> Verb = \bqy,vowImpf -> -- IL (conjugation 1d4)
|
v1defective_i : Root3 -> Vowel -> Verb = \bqy,vowImpf -> -- IL (conjugation 1d4)
|
||||||
let vforms_a = def1Forms_perfA bqy vowImpf ;
|
let vforms_a = v1DefForms_perfA bqy vowImpf ;
|
||||||
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 ;
|
||||||
@@ -599,23 +605,32 @@ v4sound : Root3 -> Verb =
|
|||||||
verb eaqnac euqnic uqnic uqnac eaqnic muqnac;
|
verb eaqnac euqnic uqnic uqnac eaqnic muqnac;
|
||||||
|
|
||||||
|
|
||||||
v4defective : Root3 -> Verb = \cTy ->
|
v4DefForms : Root3 -> DefForms = \cTy ->
|
||||||
let {
|
let {
|
||||||
cTa = mkDefective fca cTy;
|
_cTa = mkDefective fca cTy;
|
||||||
cTu = mkDefective fcu cTy;
|
_cTu = mkDefective fcu cTy;
|
||||||
cTi = mkDefective fci cTy;
|
_cTi = mkDefective fci cTy;
|
||||||
eacTa = "أَ" + cTa;
|
eacTa = "أَ" + _cTa; -- VPerf Act (Per3 Masc Sg)
|
||||||
eacTay = mkStrong eafcal cTy ;
|
eacTay = mkStrong eafcal cTy ; -- VPerf Act (Per3 Fem Pl)
|
||||||
ucTi = "ُ" + cTi;
|
eucTi = "أُ" + _cTi; -- VPerf Pas (Per3 _ Sg)
|
||||||
eucTi = "أُ" + cTi;
|
eucTu = "أُ" + _cTu; -- VPerf Pas (Per3 Masc Pl)
|
||||||
ucTu = "ُ" + cTu;
|
eucTiy = mkStrong eufcil cTy ; -- VPerf Pas (Per3 Fem Pl)
|
||||||
eucTu = "أُ" + cTu;
|
ucTi = "ُ" + _cTi; -- VImpf Act
|
||||||
eucTiy = mkStrong eufcil cTy ;
|
ucTu = "ُ" + _cTu; -- VImpf Act (Per2/3 Masc Pl)
|
||||||
ucTa = "ُ" + cTa;
|
ucTa = "ُ" + _cTa; -- VImpf Pas
|
||||||
eacTi = "أَ" + cTi;
|
eacTi = "أَ" + _cTi; -- VImp (Masc Sg / Fem _)
|
||||||
eacTu = "أَ" + cTu;
|
eacTu = "أَ" + _cTu; -- VImp Masc Pl
|
||||||
mucTaY = "م" + ucTa +"ى"
|
mucTaY = "م" + ucTa +"ى"
|
||||||
} in verbDef (toDefForms eacTa eacTay eucTi eucTu eucTiy ucTi ucTu ucTa eacTi eacTu mucTaY) i;
|
} in toDefForms eacTa eacTay eucTi eucTu eucTiy ucTi ucTu ucTa eacTi eacTu mucTaY ;
|
||||||
|
|
||||||
|
v4defective : Root3 -> Verb = \cTy ->
|
||||||
|
verbDef (v4DefForms cTy) i ;
|
||||||
|
|
||||||
|
v4doubleweak : Root3 -> Verb = \r'y ->
|
||||||
|
let ry = r'y ** {c = ""} ;
|
||||||
|
vforms : DefForms = \\x => rmSukun (v4DefForms ry ! x) ; -- only remove the first sukun
|
||||||
|
in verbDoubleDef vforms i ; -- sukun in suffixes is removed in verbDoubleDef
|
||||||
|
|
||||||
|
|
||||||
v5sound : Root3 -> Verb =
|
v5sound : Root3 -> Verb =
|
||||||
\nfs ->
|
\nfs ->
|
||||||
@@ -723,8 +738,8 @@ endVowel : Mood => Str =
|
|||||||
|
|
||||||
prefixImp : Vowel => Str =
|
prefixImp : Vowel => Str =
|
||||||
table {
|
table {
|
||||||
u => "أُ" ;
|
u => "اُ" ;
|
||||||
_ => "إِ"
|
_ => "اِ"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
patHollowPerf : (_,_,_,_ :Str) -> Voice => PerGenNum => Str = \xAf,xif,xIf,xuf ->
|
patHollowPerf : (_,_,_,_ :Str) -> Voice => PerGenNum => Str = \xAf,xif,xIf,xuf ->
|
||||||
|
|||||||
Reference in New Issue
Block a user