mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
@@ -132,7 +132,7 @@ flags
|
|||||||
meat_N = brkN "لحم" "فَعلة" "فُعُول" Masc NoHum ;
|
meat_N = brkN "لحم" "فَعلة" "فُعُول" Masc NoHum ;
|
||||||
milk_N = brkN "حلب" "فَعِيل" "فَعِيل" Masc NoHum ; --no plur
|
milk_N = brkN "حلب" "فَعِيل" "فَعِيل" Masc NoHum ; --no plur
|
||||||
moon_N = brkN "قمر" "فَعَل" "أَفعَال" Masc NoHum ;
|
moon_N = brkN "قمر" "فَعَل" "أَفعَال" Masc NoHum ;
|
||||||
mother_N2 = mkN2 (sdfN "ءم" "فُعَّ" Fem Hum) ;
|
mother_N2 = mkN2 (mkN "أُمّ" "أُمَّات" Fem Hum) ;
|
||||||
mountain_N = brkN "جبل" "فَعَل" "فِعَال" Masc NoHum ;
|
mountain_N = brkN "جبل" "فَعَل" "فِعَال" Masc NoHum ;
|
||||||
music_N = mkN (reg "مُوسِيقَى" "مُوسِيقَى") Fem NoHum ; --no plur
|
music_N = mkN (reg "مُوسِيقَى" "مُوسِيقَى") Fem NoHum ; --no plur
|
||||||
narrow_A = sndA "ضيق" "فَعِّل" ;
|
narrow_A = sndA "ضيق" "فَعِّل" ;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ lin
|
|||||||
++ noun c'
|
++ noun c'
|
||||||
++ adj c'
|
++ adj c'
|
||||||
++ cn.np ! c' ;
|
++ cn.np ! c' ;
|
||||||
True => noun (cas c) -- deal with possessive suffix
|
True => noun (cas c) -- deal with possessive suffix + dative hack
|
||||||
++ determiner c'
|
++ determiner c'
|
||||||
++ adj c'
|
++ adj c'
|
||||||
++ cn.np ! c'
|
++ cn.np ! c'
|
||||||
@@ -106,7 +106,7 @@ lin
|
|||||||
PossPron p = baseQuant ** {
|
PossPron p = baseQuant ** {
|
||||||
s = \\_,_,_,_ => BIND ++ p.s ! Gen;
|
s = \\_,_,_,_ => BIND ++ p.s ! Gen;
|
||||||
d = Poss;
|
d = Poss;
|
||||||
is1sg = case p.a.pgn of { Per1 Sing => True ; _ => False } ;
|
is1sg = is1sg p.a ;
|
||||||
isPron = True} ;
|
isPron = True} ;
|
||||||
|
|
||||||
NumSg = {
|
NumSg = {
|
||||||
@@ -179,7 +179,9 @@ lin
|
|||||||
Use2N3 n3 = n3 ;
|
Use2N3 n3 = n3 ;
|
||||||
Use3N3 n3 = n3 ** {c2 = n3.c3} ;
|
Use3N3 n3 = n3 ** {c2 = n3.c3} ;
|
||||||
|
|
||||||
ComplN2 n2 np = UseN n2 ** {np = \\c => n2.c2.s ++ bindIf n2.c2.binds ++ np.s ! n2.c2.c} ;
|
ComplN2 n2 np = UseN n2 ** {
|
||||||
|
np = \\c => n2.c2.s ++ bindIf n2.c2.binds ++ np.s ! n2.c2.c
|
||||||
|
} ;
|
||||||
|
|
||||||
ComplN3 n3 np = ComplN2 n3 np ** {c2 = n3.c3} ;
|
ComplN3 n3 np = ComplN2 n3 np ** {c2 = n3.c3} ;
|
||||||
|
|
||||||
@@ -195,13 +197,22 @@ lin
|
|||||||
AdvCN,
|
AdvCN,
|
||||||
SentCN = \cn,ss -> cn ** {s2 = \\n,d,c => cn.s2 ! n ! d ! c ++ ss.s} ;
|
SentCN = \cn,ss -> cn ** {s2 = \\n,d,c => cn.s2 ! n ! d ! c ++ ss.s} ;
|
||||||
|
|
||||||
ApposCN cn np = cn ** { np = \\c => cn.np ! c ++ np.s ! c } ;
|
ApposCN cn np = cn ** {
|
||||||
|
np = \\c => cn.np ! c ++ np.s ! c
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : CN -> NP -> CN ; -- house of Paris, house of mine
|
-- : CN -> NP -> CN ; -- house of Paris, house of mine
|
||||||
PossNP cn np = cn ** {
|
PossNP cn np = cn ** {
|
||||||
s = \\n,_d,c => cn.s ! n ! Const ! c ;
|
s = \\n,d,c => cn.s ! n ! case d of {Poss=>d ; _=>Const} ! c ;
|
||||||
s2 = \\n,_d,c => cn.s2 ! n ! Const ! Gen ;
|
s2 = \\n,d,c => cn.s2 ! n ! case d of {Poss=>d ; _=>Const} ! Gen ;
|
||||||
np = \\c => cn.np ! c ++ np.s ! Gen
|
np = \\c => cn.np ! c
|
||||||
|
++ case is1sg np.a of {
|
||||||
|
True => "لَدَي" ++ np.empty ;
|
||||||
|
False =>
|
||||||
|
case np.a.isPron of {
|
||||||
|
True => "لَدَي" ++ BIND ++ np.s ! Gen ;
|
||||||
|
False => np.s ! Gen }
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
-- : CN -> NP -> CN ; -- glass of wine
|
-- : CN -> NP -> CN ; -- glass of wine
|
||||||
|
|||||||
@@ -177,8 +177,8 @@ resource ResAra = PatternsAra ** open Prelude, Predef, OrthoAra, ParamX in {
|
|||||||
|
|
||||||
-- All fields of NP
|
-- All fields of NP
|
||||||
cn2str : CN -> Number -> State -> Case -> Str = \cn,n,s,c ->
|
cn2str : CN -> Number -> State -> Case -> Str = \cn,n,s,c ->
|
||||||
cn.s ! n ! s ! c ++
|
cn.s ! n ! s ! c ++
|
||||||
cn.s2 ! n ! s ! c ++
|
cn.s2 ! n ! s ! c ++
|
||||||
cn.np ! c ;
|
cn.np ! c ;
|
||||||
|
|
||||||
useN : Noun -> CN = \n -> n ** {np = \\_ => []} ;
|
useN : Noun -> CN = \n -> n ** {np = \\_ => []} ;
|
||||||
@@ -1181,11 +1181,17 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
--dual suffixes
|
--dual suffixes
|
||||||
dl : State => Case => Str =
|
dl : State => Case => Str =
|
||||||
table {
|
table {
|
||||||
(Const|Poss) =>
|
Const =>
|
||||||
table {
|
table {
|
||||||
Nom => "َا";
|
Nom => "َا";
|
||||||
_ => "َيْ"
|
_ => "َيْ"
|
||||||
};
|
};
|
||||||
|
Poss =>
|
||||||
|
table {
|
||||||
|
Nom => "َا" ; -- wrong for 1st person poss. suff
|
||||||
|
Bare => "َيَّ" ; -- this covers 1st person for genitive and accusative
|
||||||
|
_ => "َيْ"
|
||||||
|
};
|
||||||
_ =>
|
_ =>
|
||||||
table {
|
table {
|
||||||
Nom => "َانِ";
|
Nom => "َانِ";
|
||||||
@@ -1395,6 +1401,8 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
AAgr = {g : Gender ; n : Number} ;
|
AAgr = {g : Gender ; n : Number} ;
|
||||||
|
|
||||||
agrLite : Agr -> AgrLite = \a -> a ** {gn = pgn2gn a.pgn} ;
|
agrLite : Agr -> AgrLite = \a -> a ** {gn = pgn2gn a.pgn} ;
|
||||||
|
is1sg : Agr -> Bool = \a ->
|
||||||
|
case a.pgn of {Per1 Sing => True; _ => False} ;
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
-- NP, Pron
|
-- NP, Pron
|
||||||
|
|||||||
Reference in New Issue
Block a user