forked from GitHub/gf-rgl
(Ara) WIP assimilate def. article
This commit is contained in:
@@ -776,7 +776,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
||||
|
||||
-- indeclinable nominal word (mamnuu3 mina S-Sarf)
|
||||
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
|
||||
-- complete noun inflection table
|
||||
@@ -813,32 +813,32 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
||||
sing : Str -> State => Case => Str =
|
||||
\word ->
|
||||
case word of {
|
||||
lemma + "ِي" => \\s,c => Al ! s + lemma + dec2sg ! s ! c ;
|
||||
_ + ("ا"|"ى") => \\s,c => Al ! s + word + dec3sg ! s ! c ;
|
||||
_ => \\s,c => Al ! s + word + dec1sg ! s ! c
|
||||
lemma + "ِي" => \\s,c => defArt s lemma + dec2sg ! s ! c ;
|
||||
_ + ("ا"|"ى") => \\s,c => defArt s word + dec3sg ! s ! c ;
|
||||
_ => \\s,c => defArt s word + dec1sg ! s ! c
|
||||
};
|
||||
|
||||
|
||||
-- takes a singular word and tests the ending to
|
||||
-- determine the declension and gives the corresponding dual inf table
|
||||
dual : Str -> State => Case => Str =
|
||||
\caSaA ->
|
||||
case caSaA of {
|
||||
lemma + ("ا"|"ى") => \\s,c => Al ! s + lemma + "ي" + dl ! s ! c ;
|
||||
_ => \\s,c => Al ! s + caSaA + dl ! s ! c
|
||||
lemma + ("ا"|"ى") => \\s,c => defArt s lemma + "ي" + dl ! s ! c ;
|
||||
_ => \\s,c => defArt s caSaA + dl ! s ! c
|
||||
};
|
||||
|
||||
-- takes a singular word and gives the corresponding sound
|
||||
--plural feminine table
|
||||
plurF : Str -> State => Case => Str =
|
||||
\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
|
||||
--plural masculine table. FIXME: consider declension 3
|
||||
plurM : Str -> State => Case => Str =
|
||||
\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
|
||||
Al : State => Str =
|
||||
@@ -847,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 =
|
||||
table {
|
||||
Indef =>
|
||||
|
||||
Reference in New Issue
Block a user