mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 09:28:54 -06:00
@@ -72,7 +72,7 @@ resource ParadigmsAra = open
|
|||||||
|
|
||||||
mkN : overload {
|
mkN : overload {
|
||||||
mkN : (sg : Str) -> N ; -- non-human regular nouns
|
mkN : (sg : Str) -> N ; -- non-human regular nouns
|
||||||
mkN : Species -> N -> N ;
|
mkN : Species -> N -> N ; -- specify humanness, for a noun constructed as non-human
|
||||||
mkN : (sg,pl : Str) -> Gender -> Species -> N ;
|
mkN : (sg,pl : Str) -> Gender -> Species -> N ;
|
||||||
mkN : NTable -> Gender -> Species -> N ; -- loan words, irregular
|
mkN : NTable -> Gender -> Species -> N ; -- loan words, irregular
|
||||||
mkN : (root,sgPatt,brokenPlPatt : Str) -> Gender -> Species -> N ; -- broken plural
|
mkN : (root,sgPatt,brokenPlPatt : Str) -> Gender -> Species -> N ; -- broken plural
|
||||||
@@ -88,24 +88,11 @@ resource ParadigmsAra = open
|
|||||||
|
|
||||||
dualN : N -> N ; -- Force the plural of the N into dual (e.g. "twins")
|
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
|
mkFullN : NTable -> Gender -> Species -> N ; -- This is used for loan words or anything that has untreated irregularities in the interdigitization process of its words
|
||||||
--in the interdigitization process of its words
|
|
||||||
mkFullN : NTable -> Gender -> Species -> N ;
|
|
||||||
|
|
||||||
--Takes a root string, a singular pattern string, a broken plural
|
|
||||||
--pattern string, a gender, and species. Gives a noun.
|
|
||||||
brkN : Str -> Str -> Str -> Gender -> Species -> N ;
|
|
||||||
|
|
||||||
--Takes a root string, a singular pattern string, a gender,
|
|
||||||
--and species. Gives a noun whose plural is sound feminine.
|
|
||||||
sdfN : Str -> Str -> Gender -> Species -> N ;
|
|
||||||
|
|
||||||
--takes a root string, a singular pattern string, a gender,
|
|
||||||
--and species. Gives a noun whose plural is sound masculine
|
|
||||||
sdmN : Str -> Str -> Gender -> Species -> N ;
|
|
||||||
|
|
||||||
|
|
||||||
|
sdfN : Str -> Str -> Gender -> Species -> N ; -- Takes a root string, a singular pattern string, a gender, and species. Gives a noun whose plural is sound feminine.
|
||||||
|
|
||||||
|
sdmN : Str -> Str -> Gender -> Species -> N ; -- Takes a root string, a singular pattern string, a gender, and species. Gives a noun whose plural is sound masculine
|
||||||
|
|
||||||
--3 Proper names
|
--3 Proper names
|
||||||
|
|
||||||
@@ -142,19 +129,18 @@ resource ParadigmsAra = open
|
|||||||
-- Overloaded operator for main cases
|
-- Overloaded operator for main cases
|
||||||
|
|
||||||
mkA = overload {
|
mkA = overload {
|
||||||
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 -- adjective with positive form aFCal
|
mkA : (root : Str) -> A -- adjective with positive form aFCal
|
||||||
= \r -> lin A (clrA r);
|
= \r -> lin A (clrA r);
|
||||||
mkA : (root,sg,pl : Str) -> A -- adjective with broken plural
|
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,sg,pl : Str) -> A -- adjective with broken plural, same for both fem. and masc.
|
||||||
= \r,s,p -> lin A (brkA r s p) ;
|
= \r,s,p -> lin A (brkA r s p) ;
|
||||||
mkA : A -> Str -> A = \a,s -> a ** { -- add non-inflecting component after adjective
|
mkA : (isSoundFem : Bool) -> (root,sg,pl : Str) -> A -- adjective with broken plural, boolean argument whether feminine is sound (True) or shared with masc (False)
|
||||||
s = table {af => a.s ! af ++ s}
|
= \b,r,s,p -> lin A (brkABool b r s p) ;
|
||||||
} ;
|
mkA : A -> Str -> A -- add non-inflecting component after adjective
|
||||||
mkA : Str -> A -> A = \s,a -> a ** { -- add non-inflecting component before adjective
|
= \a,s -> a ** {s = table {af => a.s ! af ++ s}} ;
|
||||||
s = table {af => s ++ a.s ! af}
|
mkA : Str -> A -> A -- add non-inflecting component before adjective
|
||||||
}
|
= \s,a -> a ** {s = table {af => s ++ a.s ! af}}
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
idaafaA : N -> A -> A ; -- first argument will be in constructus but inflect in case, adjective in genitive, but inflect in gender, number and definiteness. e.g. غَيْرُ طَيِّبٍ
|
idaafaA : N -> A -> A ; -- first argument will be in constructus but inflect in case, adjective in genitive, but inflect in gender, number and definiteness. e.g. غَيْرُ طَيِّبٍ
|
||||||
@@ -163,12 +149,6 @@ resource ParadigmsAra = open
|
|||||||
|
|
||||||
irregFemA : (masc : A) -> (fem : A) -> A ; -- adjective with irregular feminine. Takes two adjectives (masc. "regular" and fem. "regular") and puts them together.
|
irregFemA : (masc : A) -> (fem : A) -> A ; -- adjective with irregular feminine. Takes two adjectives (masc. "regular" and fem. "regular") and puts them together.
|
||||||
|
|
||||||
--Takes a root string and a pattern string
|
|
||||||
sndA : (root,patt : Str) -> Adj ;
|
|
||||||
|
|
||||||
--Takes a root string only
|
|
||||||
clrA : (root : Str) -> Adj ; -- forms adjectives of type aFCal
|
|
||||||
|
|
||||||
nisbaA : Str -> Adj ; -- forms relative adjectives by adding the suffix ِيّ
|
nisbaA : Str -> Adj ; -- forms relative adjectives by adding the suffix ِيّ
|
||||||
|
|
||||||
--3 Two-place adjectives
|
--3 Two-place adjectives
|
||||||
@@ -568,6 +548,10 @@ resource ParadigmsAra = open
|
|||||||
kutub = mkWord pl root
|
kutub = mkWord pl root
|
||||||
} in mkFullN (reg kitAb kutub) gen spec;
|
} in mkFullN (reg kitAb kutub) gen spec;
|
||||||
|
|
||||||
|
|
||||||
|
--Takes a root string, a singular pattern string, a broken plural
|
||||||
|
--pattern string, a gender, and species. Gives a noun.
|
||||||
|
brkN : Str -> Str -> Str -> Gender -> Species -> N ;
|
||||||
brkN root sg pl gen spec =
|
brkN root sg pl gen spec =
|
||||||
let { raw = brkN' root sg pl gen spec} in raw **
|
let { raw = brkN' root sg pl gen spec} in raw **
|
||||||
{ s = \\n,d,c =>
|
{ s = \\n,d,c =>
|
||||||
@@ -658,13 +642,20 @@ resource ParadigmsAra = open
|
|||||||
d = det
|
d = det
|
||||||
});
|
});
|
||||||
|
|
||||||
brkA : (root,sg,pl : Str) -> Adj = \root,sg,pl ->
|
brkA : (root,sg,pl : Str) -> Adj -- also broken feminine
|
||||||
|
= brkABool False ;
|
||||||
|
|
||||||
|
brkABool : Bool -> (root,sg,pl : Str) -> Adj = \isSndFem,root,sg,pl ->
|
||||||
let jadId = mkWord sg root ;
|
let jadId = mkWord sg root ;
|
||||||
jadIda = jadId + "َة" ;
|
jadIda = jadId + "َة" ;
|
||||||
judud = mkWord pl root ;
|
judud = mkWord pl root ;
|
||||||
|
jadIdAt = case isSndFem of {
|
||||||
|
True => jadId + "َات" ;
|
||||||
|
False => judud
|
||||||
|
} ;
|
||||||
akbar = mkWord "أَفعَل" root ;
|
akbar = mkWord "أَفعَل" root ;
|
||||||
mascTbl = reg jadId judud ;
|
mascTbl = reg jadId judud ;
|
||||||
femTbl = reg jadIda judud ;
|
femTbl = reg jadIda jadIdAt ;
|
||||||
in { s = table {
|
in { s = table {
|
||||||
APosit Masc n d c => rectifyHmz (mascTbl ! n ! d ! c) ;
|
APosit Masc n d c => rectifyHmz (mascTbl ! n ! d ! c) ;
|
||||||
APosit Fem n d c => rectifyHmz (femTbl ! n ! d ! c) ;
|
APosit Fem n d c => rectifyHmz (femTbl ! n ! d ! c) ;
|
||||||
@@ -680,8 +671,8 @@ resource ParadigmsAra = open
|
|||||||
AComp d c => ghayr.s ! Sg ! Const ! c ++ tayyib.s ! AComp d c }
|
AComp d c => ghayr.s ! Sg ! Const ! c ++ tayyib.s ! AComp d c }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
sndA root pat =
|
sndA : Str -> Str -> A = \root,pat ->
|
||||||
let raw = sndA' root pat in {
|
let raw = sndA' root pat in lin A {
|
||||||
s = \\af =>
|
s = \\af =>
|
||||||
case root of {
|
case root of {
|
||||||
_ + #hamza + _ => rectifyHmz(raw.s ! af);
|
_ + #hamza + _ => rectifyHmz(raw.s ! af);
|
||||||
@@ -707,19 +698,22 @@ resource ParadigmsAra = open
|
|||||||
x => m.s ! x }
|
x => m.s ! x }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
nisbaA : Str -> Adj = \Haal ->
|
nisbaA Haal =
|
||||||
let Haaliyy = Haal + "ِيّ" in {
|
let Haaliyy : Str = case Haal of {
|
||||||
|
x + "ِيّ" => Haal ; -- if the ending is already given, don't add it
|
||||||
|
_ => Haal + "ِيّ" -- intended usage: give only stem
|
||||||
|
} in lin A {
|
||||||
s = table {
|
s = table {
|
||||||
APosit g n d c => positAdj Haaliyy ! g ! n ! d ! c ;
|
APosit g n d c => positAdj Haaliyy ! g ! n ! d ! c ;
|
||||||
AComp d c => "أَكْثَر" ++ indeclN Haaliyy ! d ! c
|
AComp d c => "أَكْثَر" ++ indeclN Haaliyy ! d ! c
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
clrA root =
|
clrA : Str -> A = \root ->
|
||||||
let { eaHmar = mkWord "أَفعَل" root;
|
let { eaHmar = mkWord "أَفعَل" root;
|
||||||
HamrA' = mkWord "فَعلاء" root;
|
HamrA' = mkWord "فَعلاء" root;
|
||||||
Humr = mkWord "فُعل" root
|
Humr = mkWord "فُعل" root
|
||||||
} in {
|
} in lin A {
|
||||||
s = clr eaHmar HamrA' Humr;
|
s = clr eaHmar HamrA' Humr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ concrete StructuralAra of Structural = CatAra **
|
|||||||
-- ["هَد تْ"] ; ["هَثِنغ تْ"] ; "مُستنءت" ; ["هَدنءت تْ"]] ; ----
|
-- ["هَد تْ"] ; ["هَثِنغ تْ"] ; "مُستنءت" ; ["هَدنءت تْ"]] ; ----
|
||||||
-- isAux = True
|
-- isAux = True
|
||||||
-- } ;
|
-- } ;
|
||||||
|
nothing_NP = regNP "لَا شَيْء" Sg Def ;
|
||||||
no_Utt = {s = \\_ => "لا"} ;
|
no_Utt = {s = \\_ => "لا"} ;
|
||||||
on_Prep = mkPrep "عَلَى" ;
|
on_Prep = mkPrep "عَلَى" ;
|
||||||
only_Predet = mkPredet "فَقَط" False;
|
only_Predet = mkPredet "فَقَط" False;
|
||||||
|
|||||||
Reference in New Issue
Block a user