1
0
forked from GitHub/gf-rgl

Merge pull request #47 from inariksit/arabic

(Ara) Add linref for CN + choose bare form for UttCN, no case
This commit is contained in:
Inari Listenmaa
2018-10-19 17:25:50 +02:00
committed by GitHub
3 changed files with 16 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
-- Noun
CN = ResAra.Noun ** {adj : NTable ; np : Case => Str};
CN = ResAra.CN;
NP, Pron = ResAra.NP; --{s : Case => Str ; a : Agr } ;
Num,
Ord,
@@ -90,4 +90,8 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
N3 = ResAra.Noun ** {c2, c3 : Str} ;
PN = {s : Case => Str; g : Gender; h : Species} ;
linref
CN = \cn -> uttCN cn ! Masc ;
}

View File

@@ -15,7 +15,7 @@ concrete PhraseAra of Phrase = CatAra ** open
UttAP ap = {s = ResAra.uttAP ap} ; --IL
UttCard c = {s = ResAra.uttNum c} ; --IL
UttCN cn = {s = \\_ => cn.s ! Sg ! Def ! Nom} ; --IL
UttCN cn = {s = ResAra.uttCN cn } ; --IL
UttNP np = {s = \\_ => np.s ! Nom} ;
UttVP vp = {s = \\g => (compVP vp).s ! {g=g ; n=Sg} ! Nom} ; --IL
UttS,

View File

@@ -17,7 +17,7 @@ resource ResAra = PatternsAra ** open Prelude, Predef, OrthoAra, ParamX in {
Vowel = u | a | i ;
Number = Sg | Dl | Pl;
Gender = Masc | Fem ;
Case = Nom | Acc | Gen
Case = Nom | Acc | Gen
| Bare ; -- 1st person poss. suff. overrides case
Person = P1 | P2 | P3 ;
Species = NoHum | Hum ;
@@ -99,7 +99,7 @@ resource ResAra = PatternsAra ** open Prelude, Predef, OrthoAra, ParamX in {
=> mkDefective pat (mkRoot3 rS) ;
x@? + ("و"|"ي") + z@?
=> mkHollow pat (mkRoot3 rS) ;
("و"|"ي") + y@? + z@?
("و"|"ي") + y@? + z@?
=> mkAssimilated pat (mkRoot3 rS) ;
? + ? + _ => mkBilit pat (mkRoot2 rS) ; --2=>
_=> error rS ---- AR error "expected 3--6"
@@ -119,6 +119,10 @@ resource ResAra = PatternsAra ** open Prelude, Predef, OrthoAra, ParamX in {
uttAP : AP -> (Gender => Str) ;
uttAP ap = \\g => ap.s ! NoHum ! g ! Sg ! Def ! Nom ; ----IL
CN : Type = Noun ** {adj : NTable ; np : Case => Str};
uttCN : CN -> (Gender => Str) ;
uttCN cn = \\_ => cn.s ! Sg ! Indef ! Bare ;
NumOrdCard : Type = {
s : Gender => State => Case => Str ;
n : Size ;
@@ -861,11 +865,11 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
\\s,c => defArt s (case word of {
lemma + "ِي" => fixShd lemma (dec2sg ! s ! c) ;
_ + ("ا"|"ى") => fixShd word (dec3sg ! s ! c) ;
lemma + "ة" => case s of {
lemma + "ة" => case s of {
Poss => lemma + "ت" + dec1sg ! s ! c ;
_ => word + dec1sg ! s ! c
} ;
_ => fixShd word (dec1sg ! s ! c)
_ => fixShd word (dec1sg ! s ! c)
}) ;
@@ -960,7 +964,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
_ =>
table {
Nom => "َانِ";
Bare => "َيْن";
Bare => "َيْن";
_ => "َيْنِ"
}
};
@@ -975,7 +979,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
};
_ =>
table {
Bare => "ِين";
Bare => "ِين";
Nom => "ُونَ";
_ => "ِينَ"
}