forked from GitHub/gf-rgl
(Ara) Formatting + small typofixes
This commit is contained in:
@@ -112,10 +112,10 @@ resource ResAra = PatternsAra ** open Prelude, Predef, OrthoAra, ParamX in {
|
|||||||
emptyNTable : NTable = \\n,s,c => [] ;
|
emptyNTable : NTable = \\n,s,c => [] ;
|
||||||
|
|
||||||
Preposition : Type = {s : Str ; c : Case} ;
|
Preposition : Type = {s : Str ; c : Case} ;
|
||||||
Noun : Type = {
|
Noun : Type = {
|
||||||
s,s2 : NTable ;
|
s,s2 : NTable ;
|
||||||
g : Gender ;
|
g : Gender ;
|
||||||
h : Species ;
|
h : Species ;
|
||||||
isDual : Bool -- whether it takes dual instead of plural: eyes, twins, ...
|
isDual : Bool -- whether it takes dual instead of plural: eyes, twins, ...
|
||||||
} ;
|
} ;
|
||||||
Noun2 : Type = Noun ** {c2 : Preposition} ;
|
Noun2 : Type = Noun ** {c2 : Preposition} ;
|
||||||
@@ -771,7 +771,7 @@ v8assimilated : Root3 -> Verb = --- IL 8a1
|
|||||||
muttafaq = "م" + uttafaq
|
muttafaq = "م" + uttafaq
|
||||||
} in verb eittafaq euttufiq attafiq uttafaq eittafiq muttafaq;
|
} in verb eittafaq euttufiq attafiq uttafaq eittafiq muttafaq;
|
||||||
|
|
||||||
v8hollow : Root3 -> Verb = -- IL
|
v8hollow : Root3 -> Verb = -- IL
|
||||||
\Hwj ->
|
\Hwj ->
|
||||||
let {
|
let {
|
||||||
_Htaj = mkHollow ftacal Hwj ;
|
_Htaj = mkHollow ftacal Hwj ;
|
||||||
@@ -793,7 +793,7 @@ v8hollow : Root3 -> Verb = -- IL
|
|||||||
} in verbHollow (toDefForms
|
} in verbHollow (toDefForms
|
||||||
iHtAj iHtaj uHtIj uHtij aHtAj aHtaj
|
iHtAj iHtaj uHtIj uHtij aHtAj aHtaj
|
||||||
uHtAj uHtaj iHtAj iHtaj ppart) ;
|
uHtAj uHtaj iHtAj iHtaj ppart) ;
|
||||||
v10sound : Root3 -> Verb = ---- IL 10s -- to be checked
|
v10sound : Root3 -> Verb = -- IL 10s -- to be checked
|
||||||
\qtl ->
|
\qtl ->
|
||||||
let {
|
let {
|
||||||
_staqtal = "ستَ" + mkStrong fcal qtl ;
|
_staqtal = "ستَ" + mkStrong fcal qtl ;
|
||||||
@@ -807,7 +807,7 @@ v10sound : Root3 -> Verb = ---- IL 10s -- to be checked
|
|||||||
} in
|
} in
|
||||||
verb istaqtal ustuqtil astaqtil astaqtal istaqtil mustaqtal ;
|
verb istaqtal ustuqtil astaqtil astaqtal istaqtil mustaqtal ;
|
||||||
|
|
||||||
v10hollow : Root3 -> Verb = ---- IL 10h -- to be checked
|
v10hollow : Root3 -> Verb = -- IL 10h -- to be checked
|
||||||
\xwf ->
|
\xwf ->
|
||||||
let {
|
let {
|
||||||
_staxaf = "سْتَ" + mkHollow fac xwf ;
|
_staxaf = "سْتَ" + mkHollow fac xwf ;
|
||||||
@@ -826,7 +826,7 @@ v10hollow : Root3 -> Verb = ---- IL 10h -- to be checked
|
|||||||
ustaxAf = "ُ" + _staxAf ; -- VImpf Pas _
|
ustaxAf = "ُ" + _staxAf ; -- VImpf Pas _
|
||||||
ppart = "مُ" + _staxIf -- PPart ("weird anomalies" here too?)
|
ppart = "مُ" + _staxIf -- PPart ("weird anomalies" here too?)
|
||||||
|
|
||||||
} in verbHollow (toDefForms
|
} in verbHollow (toDefForms
|
||||||
istaxAf istaxaf ustuxIf ustuxif astaxIf astaxif
|
istaxAf istaxaf ustuxIf ustuxif astaxIf astaxif
|
||||||
ustaxAf ustaxaf istaxif istaxIf ppart) ;
|
ustaxAf ustaxaf istaxif istaxIf ppart) ;
|
||||||
|
|
||||||
@@ -1079,7 +1079,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
-- if a word ends in ء or ة, don't add alif for indef acc.
|
-- if a word ends in ء or ة, don't add alif for indef acc.
|
||||||
dec1sgNoDoubleAlif : State => Case => Str = \\s,c =>
|
dec1sgNoDoubleAlif : State => Case => Str = \\s,c =>
|
||||||
case <s,c> of {
|
case <s,c> of {
|
||||||
<Indef,Acc> => "ً" ;
|
<Indef,Acc> => "ً" ;
|
||||||
@@ -1274,7 +1274,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
gn2pgn : {g : Gender; n : Number} -> PerGenNum = \gn ->
|
gn2pgn : {g : Gender; n : Number} -> PerGenNum = \gn ->
|
||||||
case gn of { {g = gn; n = nm} => Per3 gn nm } ;
|
case gn of { {g = gn; n = nm} => Per3 gn nm } ;
|
||||||
|
|
||||||
-- these are chosen in many places, trying to be consistent
|
-- these are chosen in many places, trying to be consistent
|
||||||
@@ -1349,33 +1349,36 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
empty = []
|
empty = []
|
||||||
};
|
};
|
||||||
|
|
||||||
proDrop : NP -> NP = \np ->
|
proDrop : NP -> NP = \np ->
|
||||||
case np.a.isPron of {
|
case np.a.isPron of {
|
||||||
True => np ** {s = table {Nom => [] ; x => np.s ! x}};
|
True => np ** {s = table {Nom => [] ; x => np.s ! x}};
|
||||||
_ => np
|
_ => np
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
emptyNP : NP = {
|
emptyNP : NP = {
|
||||||
s = \\_ => [] ;
|
s = \\_ => [] ;
|
||||||
a = {pgn = Per3 Masc Sg ; isPron = False} ;
|
a = {pgn = Per3 Masc Sg ; isPron = False} ;
|
||||||
empty = [] } ;
|
empty = [] } ;
|
||||||
|
|
||||||
agrNP : Agr -> NP = \agr -> emptyNP ** {a = agr} ;
|
agrNP : Agr -> NP = \agr -> emptyNP ** {a = agr} ;
|
||||||
|
|
||||||
i_Pron : NP = mkPron "أَنَا" "نِي" "ي" (Per1 Sing) ;
|
i_Pron : NP = mkPron "أَنَا" "نِي" "ي" (Per1 Sing) ;
|
||||||
youSgMasc_Pron : NP = mkPron "أَنتَ" "كَ" "كَ" (Per2 Masc Sg) ;
|
|
||||||
youSgFem_Pron : NP = mkPron "أَنتِ" "كِ" "كِ" (Per2 Fem Sg) ;
|
|
||||||
youDlMasc_Pron : NP = mkPron "أَنتُمَا" "كُمَا" "كُمَا" (Per2 Masc Dl) ;
|
|
||||||
youDlFem_Pron : NP = mkPron "أَنتُمَا" "كُمَا" "كُمَا" (Per2 Fem Dl) ;
|
|
||||||
he_Pron : NP = mkPron "هُوَ" "هُ" "هُ" (Per3 Masc Sg) ;
|
|
||||||
she_Pron : NP = mkPron "هِيَ" "ها" "ها" (Per3 Fem Sg) ;
|
|
||||||
we_Pron : NP = mkPron "نَحنُ" "نا" "نا" (Per1 Plur) ;
|
we_Pron : NP = mkPron "نَحنُ" "نا" "نا" (Per1 Plur) ;
|
||||||
youPlMasc_Pron : NP = mkPron "أَنتُمْ" "كُمْ" "كُمْ" (Per2 Masc Sg) ;
|
|
||||||
youPlFem_Pron : NP = mkPron "أَنتُنَّ" "كُنَّ" "كُنَّ" (Per2 Fem Sg) ;
|
youSgMasc_Pron : NP = mkPron "أَنتَ" "كَ" "كَ" (Per2 Masc Sg) ;
|
||||||
theyMasc_Pron : NP = mkPron "هُمْ" "هُمْ" "هُمْ" (Per3 Masc Pl) ;
|
youSgFem_Pron : NP = mkPron "أَنتِ" "كِ" "كِ" (Per2 Fem Sg) ;
|
||||||
theyFem_Pron : NP = mkPron "هُنَّ" "هُنَّ" "هُنَّ" (Per3 Fem Pl) ;
|
youDlMasc_Pron : NP = mkPron "أَنتُمَا" "كُمَا" "كُمَا" (Per2 Masc Dl) ;
|
||||||
|
youDlFem_Pron : NP = mkPron "أَنتُمَا" "كُمَا" "كُمَا" (Per2 Fem Dl) ;
|
||||||
|
youPlMasc_Pron : NP = mkPron "أَنتُمْ" "كُمْ" "كُمْ" (Per2 Masc Pl) ;
|
||||||
|
youPlFem_Pron : NP = mkPron "أَنتُنَّ" "كُنَّ" "كُنَّ" (Per2 Fem Pl) ;
|
||||||
|
|
||||||
|
he_Pron : NP = mkPron "هُوَ" "هُ" "هُ" (Per3 Masc Sg) ;
|
||||||
|
she_Pron : NP = mkPron "هِيَ" "ها" "ها" (Per3 Fem Sg) ;
|
||||||
theyDlMasc_Pron : NP = mkPron "هُمَا" "هُمَا" "هُمَا" (Per3 Masc Dl) ;
|
theyDlMasc_Pron : NP = mkPron "هُمَا" "هُمَا" "هُمَا" (Per3 Masc Dl) ;
|
||||||
theyDlFem_Pron : NP = mkPron "هُمَا" "هُمَا" "هُمَا" (Per3 Fem Dl) ;
|
theyDlFem_Pron : NP = mkPron "هُمَا" "هُمَا" "هُمَا" (Per3 Fem Dl) ;
|
||||||
|
theyMasc_Pron : NP = mkPron "هُمْ" "هُمْ" "هُمْ" (Per3 Masc Pl) ;
|
||||||
|
theyFem_Pron : NP = mkPron "هُنَّ" "هُنَّ" "هُنَّ" (Per3 Fem Pl) ;
|
||||||
|
|
||||||
|
|
||||||
-- Used e.g. to encode the subject as an object clitic
|
-- Used e.g. to encode the subject as an object clitic
|
||||||
-- or to find a possessive suffix corresponding to the NP.
|
-- or to find a possessive suffix corresponding to the NP.
|
||||||
@@ -1385,7 +1388,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
False => pgn2pron np.a.pgn
|
False => pgn2pron np.a.pgn
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
pgn2pron : PerGenNum -> NP = \pgn ->
|
pgn2pron : PerGenNum -> NP = \pgn ->
|
||||||
case pgn of {
|
case pgn of {
|
||||||
Per1 Sing => i_Pron ;
|
Per1 Sing => i_Pron ;
|
||||||
Per1 Plur => we_Pron ;
|
Per1 Plur => we_Pron ;
|
||||||
@@ -1400,7 +1403,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
Per3 Fem Dl => theyDlFem_Pron ;
|
Per3 Fem Dl => theyDlFem_Pron ;
|
||||||
Per3 Masc Dl => theyDlMasc_Pron ;
|
Per3 Masc Dl => theyDlMasc_Pron ;
|
||||||
Per3 Fem Pl => theyFem_Pron ;
|
Per3 Fem Pl => theyFem_Pron ;
|
||||||
Per3 Masc Pl => theyMasc_Pron
|
Per3 Masc Pl => theyMasc_Pron
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
pron2np : NP -> NP = \np -> np ** {
|
pron2np : NP -> NP = \np -> np ** {
|
||||||
@@ -1430,25 +1433,25 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
a : Agr -- can be both subject and object of a QCl, needs full agr. info (stupid given that s depends on gender but meh)
|
a : Agr -- can be both subject and object of a QCl, needs full agr. info (stupid given that s depends on gender but meh)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkIP = overload {
|
mkIP = overload {
|
||||||
mkIP : Str -> Number -> IP = \maa,n -> {
|
mkIP : Str -> Number -> IP = \maa,n -> {
|
||||||
s = \\_p,_g,_s,_c => maa ;
|
s = \\_p,_g,_s,_c => maa ;
|
||||||
a = { pgn = agrP3 NoHum Masc n ; isPron = False }
|
a = { pgn = agrP3 NoHum Masc n ; isPron = False }
|
||||||
} ;
|
} ;
|
||||||
mkIP : (_,_ : Str) -> Number -> IP = \maa,maadhaa,n -> {
|
mkIP : (_,_ : Str) -> Number -> IP = \maa,maadhaa,n -> {
|
||||||
s = table { True => \\_g,_s,_c => maa ;
|
s = table { True => \\_g,_s,_c => maa ;
|
||||||
False => \\_g,_s,_c => maadhaa } ;
|
False => \\_g,_s,_c => maadhaa } ;
|
||||||
a = { pgn = agrP3 NoHum Masc n ; isPron = False }
|
a = { pgn = agrP3 NoHum Masc n ; isPron = False }
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ip2np : IP -> Bool -> NP = \ip,isPred -> ip ** { s = ip.s ! isPred ! Masc ! Def ; empty = [] } ;
|
ip2np : IP -> Bool -> NP = \ip,isPred -> ip ** { s = ip.s ! isPred ! Masc ! Def ; empty = [] } ;
|
||||||
np2ip : NP -> IP = \np -> np ** {s = \\_,_,_ => np.s} ;
|
np2ip : NP -> IP = \np -> np ** {s = \\_,_,_ => np.s} ;
|
||||||
|
|
||||||
IDet : Type = {
|
IDet : Type = {
|
||||||
s : Gender -- IdetCN needs to choose the gender of the CN
|
s : Gender -- IdetCN needs to choose the gender of the CN
|
||||||
=> State -- Needs to be retained variable for IP; PrepIP chooses the state of IP
|
=> State -- Needs to be retained variable for IP; PrepIP chooses the state of IP
|
||||||
=> Case => Str ;
|
=> Case => Str ;
|
||||||
n : Number ;
|
n : Number ;
|
||||||
d : State -- in IdetCN, chooses the state of the CN
|
d : State -- in IdetCN, chooses the state of the CN
|
||||||
} ;
|
} ;
|
||||||
@@ -1483,7 +1486,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
};
|
};
|
||||||
|
|
||||||
uttVP : VP -> (Gender=>Str) = \vp ->
|
uttVP : VP -> (Gender=>Str) = \vp ->
|
||||||
\\g => vp.s ! Per3 g Sg ! VPPerf
|
\\g => vp.s ! Per3 g Sg ! VPPerf
|
||||||
++ vp.obj.s ++ vp.pred.s ! {n = Sg ; g = g} ! Nom
|
++ vp.obj.s ++ vp.pred.s ! {n = Sg ; g = g} ! Nom
|
||||||
++ vp.s2 ;
|
++ vp.s2 ;
|
||||||
|
|
||||||
@@ -1503,7 +1506,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
};
|
};
|
||||||
|
|
||||||
passPredV : Verb -> VP = \v ->
|
passPredV : Verb -> VP = \v ->
|
||||||
let actVP = predV v in actVP ** {
|
let actVP = predV v in actVP ** {
|
||||||
s = \\pgn,vf =>
|
s = \\pgn,vf =>
|
||||||
case vf of {
|
case vf of {
|
||||||
VPPerf => v.s ! (VPerf Pas pgn) ;
|
VPPerf => v.s ! (VPerf Pas pgn) ;
|
||||||
@@ -1543,7 +1546,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
_ => vp.pred.s ! gn ! Acc --xabar kaana wa laysa manSoob
|
_ => vp.pred.s ! gn ! Acc --xabar kaana wa laysa manSoob
|
||||||
};
|
};
|
||||||
sc : Preposition = case o of {Subord => {s=[]; c=Acc} ; Dir => vp.sc} ;
|
sc : Preposition = case o of {Subord => {s=[]; c=Acc} ; Dir => vp.sc} ;
|
||||||
subj = np.empty ++ sc.s
|
subj = np.empty ++ sc.s
|
||||||
++ case vp.isPred of {
|
++ case vp.isPred of {
|
||||||
False => (proDrop np).s ! sc.c ; -- prodrop if it's not predicative
|
False => (proDrop np).s ! sc.c ; -- prodrop if it's not predicative
|
||||||
True => np.s ! sc.c
|
True => np.s ! sc.c
|
||||||
@@ -1552,11 +1555,11 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
} in
|
} in
|
||||||
case o of {
|
case o of {
|
||||||
Verbal => vStr t p ++ case vp.obj.a.isPron of {
|
Verbal => vStr t p ++ case vp.obj.a.isPron of {
|
||||||
True => vp.obj.s ++ subj ; -- obj. clitic attaches directly to the verb
|
True => vp.obj.s ++ subj ; -- obj. clitic attaches directly to the verb
|
||||||
False => subj ++ vp.obj.s }
|
False => subj ++ vp.obj.s }
|
||||||
++ vp.s2 ++ pred t p ;
|
++ vp.s2 ++ pred t p ;
|
||||||
VOS => vStr t p ++ vp.obj.s ++ vp.s2 ++ pred t p ++ subj ;
|
VOS => vStr t p ++ vp.obj.s ++ vp.s2 ++ pred t p ++ subj ;
|
||||||
Nominal|Subord => subj ++ vStr t p ++ vp.obj.s ++ vp.s2 ++ pred t p
|
Nominal|Subord => subj ++ vStr t p ++ vp.obj.s ++ vp.s2 ++ pred t p
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -1616,11 +1619,11 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
predVPSlash : NP -> VPSlash -> ClSlash = \np,v -> v ** {
|
predVPSlash : NP -> VPSlash -> ClSlash = \np,v -> v ** {
|
||||||
subj = np
|
subj = np
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
complClSlash = overload {
|
complClSlash = overload {
|
||||||
complClSlash : NP -> ClSlash -> Cl = \obj,cls ->
|
complClSlash : NP -> ClSlash -> Cl = \obj,cls ->
|
||||||
predVP cls.subj (insertObj obj cls) ;
|
predVP cls.subj (insertObj obj cls) ;
|
||||||
complClSlash : ClSlash -> Cl = \cls ->
|
complClSlash : ClSlash -> Cl = \cls ->
|
||||||
predVP cls.subj (insertObj emptyNP cls) -- Empty subject and object
|
predVP cls.subj (insertObj emptyNP cls) -- Empty subject and object
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -1630,7 +1633,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
-- Relative
|
-- Relative
|
||||||
|
|
||||||
param
|
param
|
||||||
RAgr = RSg Gender | RPl Gender | RDl Gender Case ;
|
RAgr = RSg Gender | RPl Gender | RDl Gender Case ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
@@ -1675,7 +1678,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
\wAhid,awwal,Ula ->
|
\wAhid,awwal,Ula ->
|
||||||
let wAhida : Str = case wAhid of {
|
let wAhida : Str = case wAhid of {
|
||||||
x + "ة" => mkAt wAhid ;
|
x + "ة" => mkAt wAhid ;
|
||||||
_ => wAhid + "َة" }
|
_ => wAhid + "َة" }
|
||||||
in
|
in
|
||||||
{ s= table {
|
{ s= table {
|
||||||
unit => table {
|
unit => table {
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ concrete StructuralAra of Structural = CatAra **
|
|||||||
yes_Utt = {s = \\_ => "نَعَم"} ;
|
yes_Utt = {s = \\_ => "نَعَم"} ;
|
||||||
youSg_Pron = youSgMasc_Pron ;
|
youSg_Pron = youSgMasc_Pron ;
|
||||||
youPl_Pron = youPlMasc_Pron ;
|
youPl_Pron = youPlMasc_Pron ;
|
||||||
youPol_Pron = youSgFem_Pron ; -- arbitrary?
|
youPol_Pron = youPlFem_Pron ; -- arbitrary?
|
||||||
|
|
||||||
have_V2 = dirV2 (regV "يَملِك") ;
|
have_V2 = dirV2 (regV "يَملِك") ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user