summaryrefslogtreecommitdiff
path: root/next-lib/src/arabic/QuestionAra.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2009-03-28 20:22:07 +0000
committeraarne <aarne@cs.chalmers.se>2009-03-28 20:22:07 +0000
commita94143ee92565dadb1caaf1042f303878059c200 (patch)
treedb11b1bbfe4c18afd71f8444436dd5535e989b20 /next-lib/src/arabic/QuestionAra.gf
parent71bb4eda8a34e39a3ef853e40f8be93494f975f4 (diff)
BronzeageAra compiles again, via minimal Syntax
Diffstat (limited to 'next-lib/src/arabic/QuestionAra.gf')
-rw-r--r--next-lib/src/arabic/QuestionAra.gf73
1 files changed, 62 insertions, 11 deletions
diff --git a/next-lib/src/arabic/QuestionAra.gf b/next-lib/src/arabic/QuestionAra.gf
index 651a72cfd..0a02db4af 100644
--- a/next-lib/src/arabic/QuestionAra.gf
+++ b/next-lib/src/arabic/QuestionAra.gf
@@ -1,4 +1,4 @@
-concrete QuestionAra of Question = CatAra ** open ResAra, ParamX in {
+concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude in {
flags optimize=all_subs ;
@@ -13,11 +13,53 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX in {
};
---
--- QuestVP qp vp =
--- let cl = mkClause (qp.s ! Nom) {n = qp.n ; p = P3} vp
--- in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ;
---
+-- AR copied from PredVP
+ QuestVP qp vp =
+ { s =\\t,p,_ =>
+ let {
+---- o = Verbal ; ---- AR
+ np = {s = table Case {_ => qp.s} ; a ={pgn = Per3 Masc qp.n ; isPron = False}} ;
+ pgn = np.a.pgn ;
+ gn = pgn2gn pgn;
+ kataba = vp.s ! pgn ! VPPerf ;
+ yaktubu = vp.s ! pgn ! VPImpf Ind ;
+ yaktuba = vp.s ! pgn ! VPImpf Cnj ;
+ yaktub = vp.s ! pgn ! VPImpf Jus ;
+ vStr : ResAra.Tense -> Polarity -> Str =
+ \tn,pl -> case<vp.isPred,tn,pl> of {
+ <False, ResAra.Pres, Pos> => yaktubu ;
+ <False, ResAra.Pres, Neg> => "لَا" ++ yaktubu ;
+ <True, ResAra.Pres, Pos> => "" ; --no verb "to be" in present
+ <True, ResAra.Pres, Neg> => "لَيسَ" ;--same here, just add negation particle
+ <_, ResAra.Past, Pos> => kataba ;
+ <_, ResAra.Past, Neg> => "لَمْ" ++ yaktub ;
+ <_, ResAra.Fut, Pos> => "سَ" ++ yaktubu ;
+ <_, ResAra.Fut, Neg> => "لَنْ" ++ yaktuba
+ };
+ pred : ResAra.Tense -> Polarity -> Str =
+ \tn,pl -> case <vp.isPred,tn,pl> of {
+ <True, ResAra.Pres, Pos> => vp.pred.s ! gn ! Nom; --xabar marfooc
+ _ => vp.pred.s ! gn ! Acc --xabar kaana wa laysa manSoob
+ } ;
+
+ } in
+--- case o of {
+---- _ =>
+ case <False, np.a.isPron> of {
+---- AR workaround 18/12/2008 case <vp.obj.a.isPron, np.a.isPron> of {
+ -- ya2kuluhu
+ <False,True> => (vStr t p) ++ vp.obj.s ++ vp.s2 ++ (pred t p);
+ -- ya2kuluhu al-waladu, yakuluhu al-2awlaadu
+ <False,False> => (vStr t p) ++ np.s ! Nom ++ vp.obj.s ++ vp.s2 ++ (pred t p);
+ <True,False> => (vStr t p) ++ vp.obj.s ++ np.s ! Nom ++ vp.s2 ++ (pred t p);
+ <True,True> => (vStr t p) ++ vp.obj.s ++ vp.s2 ++ (pred t p)
+ };
+ ---- Nominal =>
+ ---- np.s ! Nom ++ (vStr t p) ++ vp.obj.s ++ vp.s2 ++ (pred t p)
+ }
+ ; ---- };
+
+
-- QuestSlash ip slash = {
-- s = \\t,a,p =>
-- let
@@ -29,7 +71,10 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX in {
-- }
-- } ;
--
--- QuestIAdv iadv cl = {
+
+---- AR guessed
+ QuestIAdv iadv cl = {s = \\t,p,_ => iadv.s ++ cl.s ! t ! p ! Verbal} ;
+
-- s = \\t,a,p =>
-- let
-- cls = cl.s ! t ! a ! p ;
@@ -47,9 +92,15 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX in {
-- n = ip.n
-- } ;
--
--- IDetCN idet num ord cn = {
--- s = \\c => idet.s ++ num.s ++ ord.s ++ cn.s ! idet.n ! c ;
--- n = idet.n
--- } ;
+
+---- AR guesses
+ IdetCN idet cn = {
+ s = idet.s ! Nom ++ cn.s ! idet.n ! Indef ! Nom ;
+ n = idet.n
+ } ;
+ IdetQuant idet num = {
+ s = \\c => idet.s ++ num.s ! Masc ! Indef ! c;
+ n = ResAra.Sg ---- size of Num
+ } ;
--
}