(Ara) Misc fixes to tenses, NPs, VPs

This commit is contained in:
Inari Listenmaa
2018-11-13 17:03:32 +01:00
parent eb43758d37
commit c14e879224
5 changed files with 23 additions and 16 deletions

View File

@@ -13,7 +13,7 @@ concrete RelativeAra of Relative = CatAra **
s = \\t,p,agr,c =>
let
npS : Case => Str = \\_ => rp.s ! agr2ragr agr c ;
np = {s = npS ; a = agr} ;
np = emptyNP ** {s = npS ; a = agr} ;
cl = Se.PredVP np vp ;
in
cl.s ! t ! p ! Nominal

View File

@@ -1301,7 +1301,6 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
}
};
predVP : NP -> VP -> Cl = \np,vp ->
{ s =\\t,p,o =>
let {
@@ -1323,24 +1322,29 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
<True, Pres, Neg> => "لَيسَ" ;--same here, just add negation particle
<_, Past, Pos> => kataba ;
<_, Past, Neg> => "لَمْ" ++ yaktub ;
<_, _Fut, Pos> => "سَ" ++ yaktubu ;
<_, _Fut, Neg> => "لَنْ" ++ yaktuba
<_, Cond, _ > => yaktuba ;
<_, Fut, Pos> => "سَ" ++ yaktubu ;
<_, Fut, Neg> => "لَنْ" ++ yaktuba
};
pred : ParamX.Tense -> Polarity -> Str =
\tn,pl -> case <vp.isPred,tn,pl> of {
<True, Pres, Pos> => vp.pred.s ! gn ! Nom; --xabar marfooc
_ => vp.pred.s ! gn ! Acc --xabar kaana wa laysa manSoob
};
subj = np.empty
++ case <vp.isPred,np.a.isPron> of {
<False,True> => [] ; -- prodrop if it's not predicative
_ => np.s ! Nom
} ;
} in
-- If you want prodrop, use proDrop : NP -> NP for your subject. /IL
case o of {
Verbal => vStr t p ++ case vp.obj.a.isPron of {
True => vp.obj.s ++ np.s ! Nom ; -- obj. clitic attaches directly to the verb
False => np.s ! Nom ++ vp.obj.s }
True => vp.obj.s ++ subj ; -- obj. clitic attaches directly to the verb
False => subj ++ vp.obj.s }
++ vp.s2 ++ pred t p ;
Nominal => np.s ! Nom ++ vStr t p ++ vp.obj.s ++ vp.s2 ++ pred t p ;
VOS => vStr t p ++ vp.obj.s ++ vp.s2 ++ pred t p ++ np.s ! Nom
Nominal => subj ++ vStr t p ++ vp.obj.s ++ vp.s2 ++ pred t p ;
VOS => vStr t p ++ vp.obj.s ++ vp.s2 ++ pred t p ++ subj
}
} ;

View File

@@ -68,18 +68,18 @@ concrete SentenceAra of Sentence = CatAra ** open
UseCl t p cl =
{s = t.s ++ p.s ++
case <t.t,t.a> of { --- IL guessed tenses
<(Pres|Cond),Simul> => cl.s ! Pres ! p.p ! Nominal ;
<Fut ,_ > => cl.s ! Fut ! p.p ! Nominal ;
<_ ,_ > => cl.s ! Past ! p.p ! Nominal
<Pres,Simul> => cl.s ! Pres ! p.p ! Nominal ;
<Pres,Anter> => cl.s ! Past ! p.p ! Nominal ;
<x ,_ > => cl.s ! x ! p.p ! Nominal
}
};
UseQCl t p qcl =
{s = \\q => t.s ++ p.s ++
case <t.t,t.a> of { --- IL guessed tenses
<(Pres|Cond),Simul> => qcl.s ! Pres ! p.p ! q ;
<Fut ,_ > => qcl.s ! Fut ! p.p ! q ;
<_ ,_ > => qcl.s ! Past ! p.p ! q
<Pres,Simul> => qcl.s ! Pres ! p.p ! q ;
<Pres,Anter> => qcl.s ! Past ! p.p ! q ;
<x ,_ > => qcl.s ! x ! p.p ! q
}
};

View File

@@ -17,10 +17,12 @@ lin
let g = cn.g ; n = sizeToNumber det.n in {
s = \\c => det.s ! NoHum ! g ! c ++ cn.s ! Sg ! Def ! c ++ cn.adj ! n ! Def ! c ++ xs.s; ----IL word order?? Seems to be nontrivial according to ResAra comments.
a = dummyAgrP3 n ;
empty = []
} ;
CNNumNP cn i = {
s = \\c => cn.s ! Sg ! Def ! c ++ uttNum i ! Masc ;
a = dummyAgrP3 Sg ;
empty = []
} ;
SymbS sy = sy ;

View File

@@ -26,7 +26,8 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra in {
vp ** {
s = \\pgn,vpf => vvVP.s ! pgn ! vpf
++ vv.c2.s -- أَنْ
++ vp.s ! pgn ! VPImpf Cnj
++ vp.s ! pgn ! VPImpf Cnj ;
isPred = False
} ;
-- ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ;