forked from GitHub/gf-rgl
Merge pull request #26 from inariksit/arabic
Arabic: compound nouns, verb paradigms, assimilations, whitespace
This commit is contained in:
@@ -85,7 +85,6 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
|
|||||||
V2V, V2S, V2Q = ResAra.Verb ** {c2 : Str} ; --- AR
|
V2V, V2S, V2Q = ResAra.Verb ** {c2 : Str} ; --- AR
|
||||||
V3 = ResAra.Verb ** {c2, c3 : Str} ;
|
V3 = ResAra.Verb ** {c2, c3 : Str} ;
|
||||||
VV = ResAra.Verb ** {c2 : Str ; isAux : Bool} ; --- IL
|
VV = ResAra.Verb ** {c2 : Str ; isAux : Bool} ; --- IL
|
||||||
-- VV = {s : VVForm => Str ; isAux : Bool} ;
|
|
||||||
|
|
||||||
A = ResAra.Adj ;
|
A = ResAra.Adj ;
|
||||||
A2 = ResAra.Adj ** {c2 : Str} ;
|
A2 = ResAra.Adj ** {c2 : Str} ;
|
||||||
|
|||||||
@@ -16,5 +16,4 @@ concrete ExtendAra of Extend =
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
GenNP np = { s = \\_,_,_,_ => np.s ! Gen ; d = Const ; isNum, isPron = False } ;
|
GenNP np = { s = \\_,_,_,_ => np.s ! Gen ; d = Const ; isNum, isPron = False } ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ flags optimize = all ;--noexpand;
|
|||||||
case g of {
|
case g of {
|
||||||
Masc => waHid;
|
Masc => waHid;
|
||||||
Fem => waHida
|
Fem => waHida
|
||||||
} in Al ! state + word + dec1sg ! state ! c;
|
} in defArt state waHid + word + dec1sg ! state ! c;
|
||||||
n = num;
|
n = num;
|
||||||
d = state;
|
d = state;
|
||||||
isPron = False;
|
isPron = False;
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ resource ParadigmsAra = open
|
|||||||
= mkFullN ;
|
= mkFullN ;
|
||||||
mkN : (root,sgPatt,brokenPlPatt : Str) -> Gender -> Species -> N -- broken plural
|
mkN : (root,sgPatt,brokenPlPatt : Str) -> Gender -> Species -> N -- broken plural
|
||||||
= brkN ;
|
= brkN ;
|
||||||
|
mkN : N -> (attr : Str) -> N -- Compound nouns
|
||||||
|
= \n,attr -> n ** { s = \\num,s,c => n.s ! num ! s ! c ++ attr } ; --- IL (TODO: all kinds of compounds)
|
||||||
--- mkN : (root,sgPatt : Str) -> Gender -> Species -> N -- sound feminine plural
|
--- mkN : (root,sgPatt : Str) -> Gender -> Species -> N -- sound feminine plural
|
||||||
--- = sdfN ;
|
--- = sdfN ;
|
||||||
} ;
|
} ;
|
||||||
@@ -278,7 +280,7 @@ resource ParadigmsAra = open
|
|||||||
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 vImpf ;
|
<"و"|"ي",_> => v1defective root vPerf vImpf ;
|
||||||
<_,"و"|"ي"> => v1hollow root vImpf ;
|
<_,"و"|"ي"> => v1hollow root vImpf ;
|
||||||
_ => v1sound root vPerf vImpf
|
_ => v1sound root vPerf vImpf
|
||||||
};
|
};
|
||||||
@@ -351,10 +353,10 @@ resource ParadigmsAra = open
|
|||||||
\rootStr ->
|
\rootStr ->
|
||||||
let {
|
let {
|
||||||
rbT = mkRoot3 rootStr ;
|
rbT = mkRoot3 rootStr ;
|
||||||
} in {
|
v8fun = case rbT.f of {
|
||||||
s = (v8sound rbT).s ;
|
("و"|"ي"|"ّ") => v8assimilated ;
|
||||||
lock_V = <>
|
_ => v8sound }
|
||||||
};
|
} in lin V (v8fun rbT) ;
|
||||||
|
|
||||||
Preposition = Str ;
|
Preposition = Str ;
|
||||||
|
|
||||||
@@ -560,6 +562,6 @@ formV : (root : Str) -> VerbForm -> V = \s,f -> case f of {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
param VerbForm =
|
param VerbForm =
|
||||||
FormI | FormIII | FormIII | FormIV | FormV | FormVI | FormVIII ;
|
FormI | FormII | FormIII | FormIV | FormV | FormVI | FormVIII ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -48,6 +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
|
||||||
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 = "" } ;
|
||||||
@@ -77,6 +78,8 @@ flags coding=utf8 ;
|
|||||||
ficlp = { h = "" ; m1 = "ِ" ; m2 = "ْ" ; t = "َة" } ;
|
ficlp = { h = "" ; m1 = "ِ" ; m2 = "ْ" ; t = "َة" } ;
|
||||||
ftacal = { h = "" ; m1 = "ْتَ" ; m2 = "َ" ; t = "" } ;
|
ftacal = { h = "" ; m1 = "ْتَ" ; m2 = "َ" ; t = "" } ;
|
||||||
ftacil = { h = "" ; m1 = "ْتَ" ; m2 = "ِ" ; t = "" } ;
|
ftacil = { h = "" ; m1 = "ْتَ" ; m2 = "ِ" ; t = "" } ;
|
||||||
|
ttacal = ftacal ** { m1 = "" ; h = "تَّ" } ; ---- IL assimilated VIII
|
||||||
|
ttacil = ftacil ** { m1 = "" ; h = "تَّ" } ; ---- IL assimilated VIII
|
||||||
fuccAl = { h = "" ; m1 = "ُ" ; m2 = "َّا" ; t = "" } ;
|
fuccAl = { h = "" ; m1 = "ُ" ; m2 = "َّا" ; t = "" } ;
|
||||||
fuccil = { h = "" ; m1 = "ُ" ; m2 = "ِّ" ; t = "" } ;
|
fuccil = { h = "" ; m1 = "ُ" ; m2 = "ِّ" ; t = "" } ;
|
||||||
fuccilo = { h = "" ; m1 = "ُ" ; m2 = "ِّ" ; t = "ْ" } ;
|
fuccilo = { h = "" ; m1 = "ُ" ; m2 = "ِّ" ; t = "ْ" } ;
|
||||||
|
|||||||
@@ -76,12 +76,11 @@ resource ResAra = PatternsAra ** open Prelude, Predef, ParamX in {
|
|||||||
|
|
||||||
-- takes a weak pattern and a triliteral root and makes
|
-- takes a weak pattern and a triliteral root and makes
|
||||||
-- a word, deducing which root consonant is weak
|
-- a word, deducing which root consonant is weak
|
||||||
mkWeak : Pattern -> Str -> Str = \pat,root ->
|
mkWeak : Pattern -> Root3 -> Str = \pat,fcl ->
|
||||||
let fcl = mkRoot3 root in
|
case <fcl.f,fcl.c,fcl.l> of {
|
||||||
case root of {
|
<_,_,("و"|"ي"|"ّ")> => mkDefective pat fcl;
|
||||||
_ + ("و"|"ي"|"ّ") => mkDefective pat fcl;
|
<_,("و"|"ي"),_> => mkHollow pat fcl;
|
||||||
_ + ("و"|"ي") + _ => mkHollow pat fcl;
|
<("و"|"ي"),_,_> => mkAssimilated pat fcl
|
||||||
("و"|"ي") + _ => mkAssimilated pat fcl
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mkBilit : Pattern -> Root2 -> Str = \p,fcl ->
|
mkBilit : Pattern -> Root2 -> Str = \p,fcl ->
|
||||||
@@ -95,7 +94,7 @@ resource ResAra = PatternsAra ** open Prelude, Predef, ParamX in {
|
|||||||
w@_ + "ف" + x@_ + "ع" + y@_ =>
|
w@_ + "ف" + x@_ + "ع" + y@_ =>
|
||||||
let pat = { h = w ; m1 = x; m2 = ""; t = y} in
|
let pat = { h = w ; m1 = x; m2 = ""; t = y} in
|
||||||
case <length rS : Ints 100> of {
|
case <length rS : Ints 100> of {
|
||||||
6 | 5 => mkWeak pat rS ; --3=>
|
6 | 5 => mkWeak pat (mkRoot3 rS) ; --3=>
|
||||||
4 | 3 => mkBilit pat (mkRoot2 rS) ; --2=>
|
4 | 3 => mkBilit pat (mkRoot2 rS) ; --2=>
|
||||||
_ => rS ---- AR error "expected 3--6"
|
_ => rS ---- AR error "expected 3--6"
|
||||||
}
|
}
|
||||||
@@ -247,18 +246,30 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
--macro for defective verbs:
|
--macro for defective verbs:
|
||||||
verbDef: (_,_,_,_,_,_,_,_,_,_,_ : Str) -> Vowel -> Verb =
|
verbDef : DefForms -> Vowel -> Verb =
|
||||||
\rama,ramay,rumi,rumu,rumiy,armi,armu,urma,Irmi,Irmu,ppart,vowel ->
|
\vforms,vImpf ->
|
||||||
let {
|
let {
|
||||||
|
rama = vforms ! 0 ; -- VPerf Act (Per3 Masc Sg)
|
||||||
|
ramay = vforms ! 1 ; -- VPerf Act (Per3 Fem Pl)
|
||||||
|
rumi = vforms ! 2 ; -- VPerf Pas (Per3 _ Sg)
|
||||||
|
rumu = vforms ! 3 ; -- VPerf Pas (Per3 Masc Pl)
|
||||||
|
rumiy = vforms ! 4 ; -- VPerf Pas (Per3 Fem Pl)
|
||||||
|
armi = vforms ! 5 ; -- VImpf _ Act (Per1 _ _ | Per2/3 Fem _ | Per2/3 Masc Sg)
|
||||||
|
armu = vforms ! 6 ; -- VImpf _ Act (Per2/3 Masc Pl)
|
||||||
|
urma = vforms ! 7 ; -- VImpf _ Pas
|
||||||
|
Irmi = vforms ! 8 ; -- VImp Masc Sg | VImp Fem _
|
||||||
|
Irmu = vforms ! 9 ; -- VImp Masc Pl
|
||||||
|
ppart = vforms ! 10 ; -- VPPart
|
||||||
|
|
||||||
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
|
||||||
} 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 vowel) ! m ! pgn ;
|
VImpf m Act pgn => prefixImpf ! pgn + patImpfAct ! pgn + (suffixImpfDef Act vImpf) ! m ! pgn ;
|
||||||
VImpf m Pas pgn => prefixImpf ! pgn + urma + (suffixImpfDef Pas vowel) ! m ! pgn ;
|
VImpf m Pas pgn => prefixImpf ! pgn + urma + (suffixImpfDef Pas vImpf) ! m ! pgn ;
|
||||||
VImp g n => patImp ! g ! n + (suffixImpfDef Act vowel) ! Jus ! (Per2 g n) ;
|
VImp g n => patImp ! g ! n + (suffixImpfDef Act vImpf) ! Jus ! (Per2 g n) ;
|
||||||
VPPart => ppart
|
VPPart => ppart
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
@@ -464,23 +475,59 @@ patGem3 : Vowel => Pattern =
|
|||||||
i => fcil --no such verb probably exists
|
i => fcil --no such verb probably exists
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
v1defective : Root3 -> Vowel -> Verb =
|
DefForms : Type = Predef.Ints 10 => Str ;
|
||||||
\rmy,vowel ->
|
toDefForms : (x1,_,_,_,_,_,_,_,_,_,x11 : Str) -> DefForms =
|
||||||
|
\rama,ramay,rumi,rumu,rumiy,armi,armu,urma,eirmi,eirmu,marmiy ->
|
||||||
|
table {
|
||||||
|
0 => rama ;
|
||||||
|
1 => ramay ;
|
||||||
|
2 => rumi ;
|
||||||
|
3 => rumu ;
|
||||||
|
4 => rumiy ;
|
||||||
|
5 => armi ;
|
||||||
|
6 => armu ;
|
||||||
|
7 => urma ;
|
||||||
|
8 => eirmi ;
|
||||||
|
9 => eirmu ;
|
||||||
|
10 => marmiy
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
def1Forms_vPerfA : Root3 -> Vowel -> DefForms = \rmy,vImpf ->
|
||||||
let {
|
let {
|
||||||
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 ! vowel) rmy ;
|
rmi = mkDefective (patDef1 ! vImpf) rmy ;
|
||||||
armi = "َ" + rmi ;
|
armi = "َ" + rmi ;
|
||||||
rmu = mkDefective (patDef2 ! vowel) rmy ;
|
rmu = mkDefective (patDef2 ! vImpf) rmy ;
|
||||||
armu = "َ" + rmu ;
|
armu = "َ" + rmu ;
|
||||||
urma = mkDefective ufca rmy ;
|
urma = mkDefective ufca rmy ;
|
||||||
eirmi = prefixImp ! vowel + rmi;
|
eirmi = prefixImp ! vImpf + rmi;
|
||||||
eirmu = prefixImp ! vowel + rmu;
|
eirmu = prefixImp ! vImpf + rmu;
|
||||||
marmiy = mkStrong mafcil rmy
|
marmiy = mkStrong mafcil rmy
|
||||||
} in verbDef rama ramay rumi rumu rumiy armi armu urma eirmi eirmu marmiy vowel ;
|
} in toDefForms rama ramay rumi rumu rumiy armi armu urma eirmi eirmu marmiy ;
|
||||||
|
|
||||||
|
v1defective : Root3 -> Vowel -> Vowel -> Verb = \rmy,vPerf,vImpf ->
|
||||||
|
case vPerf of {
|
||||||
|
i => v1defective_i rmy vImpf ;
|
||||||
|
_ => v1defective_a rmy vImpf
|
||||||
|
} ;
|
||||||
|
|
||||||
|
v1defective_a : Root3 -> Vowel -> Verb = \rmy,vImpf ->
|
||||||
|
let vforms = def1Forms_vPerfA rmy vImpf
|
||||||
|
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 ;
|
||||||
|
baqiy = mkDefective facil bqy ;
|
||||||
|
vforms_i = table { 0 => baqI ;
|
||||||
|
1 => baqiy ;
|
||||||
|
x => vforms_a ! x } ;
|
||||||
|
in verbDef vforms_i vImpf ;
|
||||||
|
|
||||||
patDef1 : Vowel => Pattern =
|
patDef1 : Vowel => Pattern =
|
||||||
table {
|
table {
|
||||||
@@ -519,7 +566,7 @@ v2defective : Root3 -> Verb = \gny ->
|
|||||||
ugannu = "ُ" + gannu;
|
ugannu = "ُ" + gannu;
|
||||||
uganna = "ُ" + ganna;
|
uganna = "ُ" + ganna;
|
||||||
mugannaY = "مُ" + ganna + "ى"
|
mugannaY = "مُ" + ganna + "ى"
|
||||||
} in verbDef ganna gannay gunni gunnu gunniy uganni ugannu uganna ganni gannu mugannaY i;
|
} in verbDef (toDefForms ganna gannay gunni gunnu gunniy uganni ugannu uganna ganni gannu mugannaY) i;
|
||||||
|
|
||||||
v3sound : Root3 -> Verb =
|
v3sound : Root3 -> Verb =
|
||||||
\tbc ->
|
\tbc ->
|
||||||
@@ -561,7 +608,7 @@ v4defective : Root3 -> Verb = \cTy ->
|
|||||||
eacTi = "أَ" + cTi;
|
eacTi = "أَ" + cTi;
|
||||||
eacTu = "أَ" + cTu;
|
eacTu = "أَ" + cTu;
|
||||||
mucTaY = "م" + ucTa +"ى"
|
mucTaY = "م" + ucTa +"ى"
|
||||||
} in verbDef eacTa eacTay eucTi eucTu eucTiy ucTi ucTu ucTa eacTi eacTu mucTaY i;
|
} in verbDef (toDefForms eacTa eacTay eucTi eucTu eucTiy ucTi ucTu ucTa eacTi eacTu mucTaY) i;
|
||||||
|
|
||||||
v5sound : Root3 -> Verb =
|
v5sound : Root3 -> Verb =
|
||||||
\nfs ->
|
\nfs ->
|
||||||
@@ -596,6 +643,20 @@ v8sound : Root3 -> Verb =
|
|||||||
murtabaT = "م" + urtabaT
|
murtabaT = "م" + urtabaT
|
||||||
} in verb eirtabaT eurtubiT artabiT urtabaT eirtabiT murtabaT;
|
} in verb eirtabaT eurtubiT artabiT urtabaT eirtabiT murtabaT;
|
||||||
|
|
||||||
|
v8assimilated : Root3 -> Verb = --- IL 8a1
|
||||||
|
\wfq ->
|
||||||
|
let {
|
||||||
|
ttafiq = mkWeak ttacil wfq ;
|
||||||
|
ttafaq = mkWeak ttacal wfq ;
|
||||||
|
eittafaq = "إِ" + ttafaq ;
|
||||||
|
euttufiq = mkWeak euttucil wfq ;
|
||||||
|
attafiq = "َ" + ttafiq ;
|
||||||
|
uttafaq = "ُ" + ttafaq ;
|
||||||
|
eittafiq = "إِ" + ttafiq ;
|
||||||
|
muttafaq = "م" + uttafaq
|
||||||
|
} in verb eittafaq euttufiq attafiq uttafaq eittafiq muttafaq;
|
||||||
|
|
||||||
|
|
||||||
patV1Perf : Vowel => Pattern =
|
patV1Perf : Vowel => Pattern =
|
||||||
table {
|
table {
|
||||||
a => facal ; --katab
|
a => facal ; --katab
|
||||||
@@ -715,7 +776,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
|
|
||||||
-- indeclinable nominal word (mamnuu3 mina S-Sarf)
|
-- indeclinable nominal word (mamnuu3 mina S-Sarf)
|
||||||
indeclN : Str -> State => Case => Str =
|
indeclN : Str -> State => Case => Str =
|
||||||
\aHmar -> \\s,c => Al!s + aHmar + indecl!c;
|
\aHmar -> \\s,c => defArt s aHmar + indecl!c;
|
||||||
|
|
||||||
-- takes 2 words, singular and broken plural, and gives the
|
-- takes 2 words, singular and broken plural, and gives the
|
||||||
-- complete noun inflection table
|
-- complete noun inflection table
|
||||||
@@ -752,32 +813,32 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
sing : Str -> State => Case => Str =
|
sing : Str -> State => Case => Str =
|
||||||
\word ->
|
\word ->
|
||||||
case word of {
|
case word of {
|
||||||
lemma + "ِي" => \\s,c => Al ! s + lemma + dec2sg ! s ! c ;
|
lemma + "ِي" => \\s,c => defArt s lemma + dec2sg ! s ! c ;
|
||||||
_ + ("ا"|"ى") => \\s,c => Al ! s + word + dec3sg ! s ! c ;
|
_ + ("ا"|"ى") => \\s,c => defArt s word + dec3sg ! s ! c ;
|
||||||
_ => \\s,c => Al ! s + word + dec1sg ! s ! c
|
_ => \\s,c => defArt s word + dec1sg ! s ! c
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
-- takes a singular word and tests the ending to
|
-- takes a singular word and tests the ending to
|
||||||
-- determine the declension and gives the corresponding dual inf table
|
-- determine the declension and gives the corresponding dual inf table
|
||||||
dual : Str -> State => Case => Str =
|
dual : Str -> State => Case => Str =
|
||||||
\caSaA ->
|
\caSaA ->
|
||||||
case caSaA of {
|
case caSaA of {
|
||||||
lemma + ("ا"|"ى") => \\s,c => Al ! s + lemma + "ي" + dl ! s ! c ;
|
lemma + ("ا"|"ى") => \\s,c => defArt s lemma + "ي" + dl ! s ! c ;
|
||||||
_ => \\s,c => Al ! s + caSaA + dl ! s ! c
|
_ => \\s,c => defArt s caSaA + dl ! s ! c
|
||||||
};
|
};
|
||||||
|
|
||||||
-- takes a singular word and gives the corresponding sound
|
-- takes a singular word and gives the corresponding sound
|
||||||
--plural feminine table
|
--plural feminine table
|
||||||
plurF : Str -> State => Case => Str =
|
plurF : Str -> State => Case => Str =
|
||||||
\kalima ->
|
\kalima ->
|
||||||
\\s,c => Al ! s + (mkAt kalima) + f_pl ! s ! c ;
|
\\s,c => defArt s (mkAt kalima) + f_pl ! s ! c ;
|
||||||
|
|
||||||
-- takes a singular word and gives the corresponding sound
|
-- takes a singular word and gives the corresponding sound
|
||||||
--plural masculine table. FIXME: consider declension 3
|
--plural masculine table. FIXME: consider declension 3
|
||||||
plurM : Str -> State => Case => Str =
|
plurM : Str -> State => Case => Str =
|
||||||
\mucallim ->
|
\mucallim ->
|
||||||
\\s,c => Al ! s + mucallim + m_pl ! s ! c ;
|
\\s,c => defArt s mucallim + m_pl ! s ! c ;
|
||||||
|
|
||||||
|
|
||||||
-- to add the Al prefix for Definite words
|
-- to add the Al prefix for Definite words
|
||||||
Al : State => Str =
|
Al : State => Str =
|
||||||
@@ -786,7 +847,28 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
_ => ""
|
_ => ""
|
||||||
};
|
};
|
||||||
|
|
||||||
--declection 1 (strong ending) of the singular or broken plural words
|
defArt : State -> Str -> Str = \st,stem ->
|
||||||
|
let arra = "الرَّ" ;
|
||||||
|
arri = "الرِّ" ;
|
||||||
|
arr = "الرِّ" ;
|
||||||
|
atta = "التَ" ;
|
||||||
|
atti = "التِّ";
|
||||||
|
att = "التّ" ;
|
||||||
|
al = "ال" ;
|
||||||
|
in case st of { -- TODO rest of the assimilations
|
||||||
|
Def => case stem of {
|
||||||
|
ra@"رَ" + x => arra + x ;
|
||||||
|
ri@"رِ" + x => arri + x ;
|
||||||
|
r@"ر" + x => arr + x ; -- no vowel specified
|
||||||
|
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
|
||||||
dec1sg : State => Case => Str =
|
dec1sg : State => Case => Str =
|
||||||
table {
|
table {
|
||||||
Indef =>
|
Indef =>
|
||||||
@@ -1140,16 +1222,16 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
NCard => table {
|
NCard => table {
|
||||||
Masc => \\s,c => (sing wAhid) ! s ! c ;
|
Masc => \\s,c => (sing wAhid) ! s ! c ;
|
||||||
--all fem are first declension:
|
--all fem are first declension:
|
||||||
Fem => \\s,c => Al ! s + wAhida + dec1sg ! s ! c
|
Fem => \\s,c => defArt s wAhida + dec1sg ! s ! c
|
||||||
};
|
};
|
||||||
NOrd => table {
|
NOrd => table {
|
||||||
Masc => \\s,c => Al ! s + awwal + dec1sg ! s ! c;
|
Masc => \\s,c => defArt s awwal + dec1sg ! s ! c;
|
||||||
Fem => \\s,c => (sing Ula) ! s ! c
|
Fem => \\s,c => (sing Ula) ! s ! c
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ten => table {
|
ten => table {
|
||||||
NCard => \\_,s,c => Al ! s + wAhid + m_pl ! Indef ! c;
|
NCard => \\_,s,c => defArt s wAhid + m_pl ! Indef ! c;
|
||||||
NOrd => \\_,s,c => Al ! s + awwal + m_pl ! Indef ! c
|
NOrd => \\_,s,c => defArt s awwal + m_pl ! Indef ! c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ concrete SentenceAra of Sentence = CatAra ** open
|
|||||||
ResAra,
|
ResAra,
|
||||||
Prelude,
|
Prelude,
|
||||||
ResAra,
|
ResAra,
|
||||||
|
TenseX,
|
||||||
ParamX,
|
ParamX,
|
||||||
CommonX in {
|
CommonX in {
|
||||||
|
|
||||||
@@ -111,31 +112,22 @@ concrete SentenceAra of Sentence = CatAra ** open
|
|||||||
-- EmbedVP vp = {s = infVP False vp (agrP3 Sg)} ; --- agr
|
-- EmbedVP vp = {s = infVP False vp (agrP3 Sg)} ; --- agr
|
||||||
--
|
--
|
||||||
|
|
||||||
--FIXME, all tenses
|
UseCl t p cl =
|
||||||
UseCl t ap cl =
|
{s = case <t.t,t.a> of { --- IL guessed tenses
|
||||||
{s = cl.s ! ResAra.Pres ! ap.p ! Verbal
|
<(Pres|Cond),Simul> => cl.s ! ResAra.Pres ! p.p ! Verbal ;
|
||||||
{- case t of {
|
<Fut ,_ > => cl.s ! ResAra.Fut ! p.p ! Verbal ;
|
||||||
TPres => cl.s ! ResAra.Pres ! p.p ! Verbal ;
|
<_ ,_ > => cl.s ! ResAra.Past ! p.p ! Verbal
|
||||||
TCond => cl.s ! ResAra.Pres ! p.p ! Verbal ;
|
|
||||||
TPast => cl.s ! ResAra.Past ! p.p ! Verbal ;
|
|
||||||
TFut => cl.s ! ResAra.Fut ! p.p ! Verbal
|
|
||||||
}
|
}
|
||||||
-} };
|
};
|
||||||
|
|
||||||
--FIXME, all tenses
|
UseQCl t p qcl =
|
||||||
UseQCl t ap qcl = --{s = cl.s ! t ! p ! Verbal } ;
|
{s = \\q =>
|
||||||
{s =
|
case <t.t,t.a> of { --- IL guessed tenses
|
||||||
table {
|
<(Pres|Cond),Simul> => qcl.s ! ResAra.Pres ! p.p ! q ;
|
||||||
QDir => qcl.s ! ResAra.Pres ! ap.p ! QDir;
|
<Fut ,_ > => qcl.s ! ResAra.Fut ! p.p ! q ;
|
||||||
QIndir => qcl.s ! ResAra.Pres ! ap.p ! QIndir
|
<_ ,_ > => qcl.s ! ResAra.Past ! p.p ! q
|
||||||
}
|
}
|
||||||
{- case t of {
|
};
|
||||||
TPres => "هَل" ++ qcl.s ! ResAra.Pres ! p.p ! q ;
|
|
||||||
TCond => "هَل" ++ qcl.s ! ResAra.Pres ! p.p ! q ;
|
|
||||||
TPast => "هَل" ++ qcl.s ! ResAra.Past ! p.p ! q ;
|
|
||||||
TFut => "هَل" ++ qcl.s ! ResAra.Fut ! p.p ! q
|
|
||||||
}
|
|
||||||
-} };
|
|
||||||
|
|
||||||
-- UseRCl t a p cl = {s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r} ;
|
-- UseRCl t a p cl = {s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r} ;
|
||||||
|
|
||||||
|
|||||||
@@ -46,4 +46,3 @@ oper
|
|||||||
{ pgn = Per3 Masc n ; isPron = False } ;
|
{ pgn = Per3 Masc n ; isPron = False } ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user