(Ara) Add a paradigm for relative adjectives

This commit is contained in:
Inari Listenmaa
2018-11-16 15:03:19 +01:00
parent 9d59e59387
commit a2907a91a5
2 changed files with 29 additions and 9 deletions

View File

@@ -76,7 +76,7 @@ resource ParadigmsAra = open
--- = sdfN ;
} ;
dualN : N -> N ;
dualN : N -> N ; -- Force the plural of the N into dual (e.g. "twins")
--This is used for loan words or anything that has untreated irregularities
--in the interdigitization process of its words
@@ -130,16 +130,15 @@ resource ParadigmsAra = open
-- Overloaded operator for main cases
mkA = overload {
mkA : (root,patt : Str) -> A
mkA : (root,sg : Str) -> A -- adjective with sound plural; takes root string and sg. pattern string
= \r,p -> lin A (sndA r p);
mkA : (root : Str) -> A -- forms adjectives with positive form aFCal
mkA : (root : Str) -> A -- adjective with positive form aFCal
= \r -> lin A (clrA r);
mkA : (root,sg,pl : Str) -> A
mkA : (root,sg,pl : Str) -> A -- adjective with broken plural
= \r,s,p -> lin A (brkA r s p) ;
-- mkA : (posit,compar,plur : Str) -> A
-- = degrA ;
} ;
degrA : (posit,compar,plur : Str) -> A ;
--Takes a root string and a pattern string
sndA : (root,patt : Str) -> Adj ;
@@ -147,6 +146,8 @@ resource ParadigmsAra = open
--Takes a root string only
clrA : (root : Str) -> Adj ; -- forms adjectives of type aFCal
nisbaA : Str -> Adj ; -- forms relative adjectives by adding the suffix ِيّ
--3 Two-place adjectives
--
-- Two-place adjectives need a preposition for their second argument.
@@ -637,6 +638,14 @@ resource ParadigmsAra = open
}
};
nisbaA : Str -> Adj = \Haal ->
let Haaliyy = Haal + "ِيّ" in {
s = table {
APosit g n d c => positAdj Haaliyy ! g ! n ! d ! c ;
AComp d c => "أَكْثَر" ++ indeclN Haaliyy ! d ! c
}
} ;
clrA root =
let { eaHmar = mkWord "أَفعَل" root;
HamrA' = mkWord "فَعلاء" root;

View File

@@ -966,9 +966,10 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
-- determine the declension and gives the corresponding inf table
sing : Str -> State => Case => Str = \word ->
\\s,c => defArt s (case word of {
lemma + "ِي" => fixShd lemma (dec2sg ! s ! c) ;
_ + ("ا"|"ى") => fixShd word (dec3sg ! s ! c) ;
lemma + "ة" => case s of {
lemma + "ِيّ" => fixShd word (decNisba ! s ! c) ;
lemma + "ِي" => fixShd lemma (dec2sg ! s ! c) ;
_ + ("ا"|"ى") => fixShd word (dec3sg ! s ! c) ;
lemma + "ة" => case s of {
Poss => lemma + "ت" + dec1sg ! s ! c ;
_ => word + dec1sg ! s ! c
} ;
@@ -1046,6 +1047,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
_ => "ِي"
};
--declension 3 (ending in alif)
dec3sg : State => Case => Str = \\s,c =>
case <s,c> of {
@@ -1054,6 +1056,15 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
_ => []
};
--declension 2 (ends in yaa')
decNisba : State => Case => Str = \\s,c =>
case <s,c> of {
<_, Bare> => [] ;
<Indef,Acc> => "اً" ;
<Indef> => "ٍ" ;
<_, Acc> => "َ" ;
_ => []
};
--dual suffixes
dl : State => Case => Str =