mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-09-28 21:23:39 -06:00
more updates from Codex
This commit is contained in:
+60
-15
@@ -23,9 +23,9 @@ concrete ExtendHye of Extend =
|
||||
open Prelude, ResHye, ParadigmsHye, (R = ParamX) in {
|
||||
|
||||
lincat
|
||||
VPS = {s : Str} ; [VPS] = {s1,s2 : Str} ;
|
||||
VPS = {s : Agr => Str} ; [VPS] = {s1,s2 : Agr => Str} ;
|
||||
VPI = {s : Str} ; [VPI] = {s1,s2 : Str} ;
|
||||
[Comp] = {s1,s2 : Str} ; [Imp] = {s1,s2 : Str} ;
|
||||
[Comp] = {s1,s2 : Str} ; [Imp] = {s1,s2 : Number => Str} ;
|
||||
RNP = {s : Case => Str} ; RNPList = {s : Case => Str} ;
|
||||
|
||||
oper
|
||||
@@ -40,20 +40,51 @@ oper
|
||||
imperative=\\n=>v.imperative!n++x;passive=v.passive++x;
|
||||
past=\\p,n=>v.past!p!n++x;participle=\\p=>v.participle!p++x;
|
||||
subjunctive=\\a,p,n=>v.subjunctive!a!p!n++x} ;
|
||||
extPrependVP : Str -> VP -> VP = \x,v -> lin VP {s=x++v.s;
|
||||
conditional=\\a,p,n=>x++v.conditional!a!p!n;
|
||||
converb={imperfective=x++v.converb.imperfective;futCon1=x++v.converb.futCon1;
|
||||
futCon2=x++v.converb.futCon2;negative=x++v.converb.negative;
|
||||
perfective=x++v.converb.perfective;simultaneous=x++v.converb.simultaneous};
|
||||
imperative=\\n=>x++v.imperative!n;passive=x++v.passive;
|
||||
past=\\p,n=>x++v.past!p!n;participle=\\p=>x++v.participle!p;
|
||||
subjunctive=\\a,p,n=>x++v.subjunctive!a!p!n} ;
|
||||
passivePart : Verb -> Str = \v -> v.passivePart ;
|
||||
agentAdv : NP -> Str = \np -> np.s ! Dat ++ "կողմից" ;
|
||||
refl : RNP = lin RNP {s=\\_=>"իրեն"} ;
|
||||
|
||||
lin
|
||||
GenModNP num np cn = {s=\\c=>np.s!Dat ++ cn.s!Indef!c!num.n;a={n=num.n;p=P3}} ;
|
||||
EmptyRelSlash slash = {s="որը" ++ slash.s} ;
|
||||
|
||||
MkVPS temp pol vp = {s=pol.s ++ vp.s} ;
|
||||
MkVPS temp pol vp = {s=\\agr=>case temp.a of {
|
||||
Anter => case <temp.t,pol.p> of {
|
||||
<R.Pres,Pos> => vp.converb.perfective++presentAux agr.p agr.n;
|
||||
<R.Pres,Neg> => negativePresentAux agr.p agr.n++vp.converb.perfective;
|
||||
<R.Past,Pos> => vp.converb.perfective++pastAux agr.p agr.n;
|
||||
<R.Past,Neg> => negativePastAux agr.p agr.n++vp.converb.perfective;
|
||||
<R.Fut,Pos> => vp.converb.perfective++copulaVerb.conditional!Non_Past!agr.p!agr.n;
|
||||
<R.Fut,Neg> => negativePresentAux agr.p agr.n++vp.converb.perfective++copulaVerb.converb.futCon1;
|
||||
<R.Cond,Pos> => vp.converb.perfective++copulaVerb.conditional!Perfect!agr.p!agr.n;
|
||||
<R.Cond,Neg> => negativePastAux agr.p agr.n++vp.converb.perfective
|
||||
};
|
||||
Simul => case <temp.t,pol.p> of {
|
||||
<R.Pres,Pos> => vp.converb.imperfective++presentAux agr.p agr.n;
|
||||
<R.Pres,Neg> => negativePresentAux agr.p agr.n++vp.converb.imperfective;
|
||||
<R.Past,Pos> => vp.past!agr.p!agr.n;
|
||||
<R.Past,Neg> => "չ"++BIND++vp.past!agr.p!agr.n;
|
||||
<R.Fut,Pos> => vp.conditional!Non_Past!agr.p!agr.n;
|
||||
<R.Fut,Neg> => negativePresentAux agr.p agr.n++vp.converb.futCon1;
|
||||
<R.Cond,Pos> => vp.conditional!Perfect!agr.p!agr.n;
|
||||
<R.Cond,Neg> => "չ"++BIND++vp.conditional!Perfect!agr.p!agr.n
|
||||
}
|
||||
}} ;
|
||||
BaseVPS x y = {s1=x.s;s2=y.s} ;
|
||||
ConsVPS x xs = {s1=x.s;s2=xs.s1++","++xs.s2} ;
|
||||
ConjVPS c xs = {s=xs.s1++c.s++xs.s2} ;
|
||||
PredVPS np vps = {s=np.s!Nom++vps.s} ;
|
||||
SQuestVPS np vps = {s=np.s!Nom++vps.s++"՞"} ;
|
||||
QuestVPS ip vps = {s=ip.s++vps.s++"՞"} ;
|
||||
RelVPS rp vps = {s=rp.s++vps.s} ;
|
||||
ConsVPS x xs = {s1=x.s;s2=\\a=>xs.s1!a++","++xs.s2!a} ;
|
||||
ConjVPS c xs = {s=\\a=>xs.s1!a++c.s++xs.s2!a} ;
|
||||
PredVPS np vps = {s=np.s!Nom++vps.s!np.a} ;
|
||||
SQuestVPS np vps = {s=np.s!Nom++vps.s!np.a++BIND++"՞"} ;
|
||||
QuestVPS ip vps = {s=ip.s++vps.s!{n=Sg;p=P3}++BIND++"՞"} ;
|
||||
RelVPS rp vps = {s=rp.s++vps.s!{n=Sg;p=P3}} ;
|
||||
ExistS t p np = {s=np.s!Nom++"կա"} ;
|
||||
ExistNPQS t p np = {s=np.s!Nom++"կա՞"} ;
|
||||
ExistIPQS t p ip = {s=ip.s++"կա՞"} ;
|
||||
@@ -66,10 +97,24 @@ lin
|
||||
|
||||
PresPartAP vp = {s=\\_,_,_=>vp.participle!Subject;isPre=True} ;
|
||||
EmbedPresPart vp = {s=vp.participle!Subject} ;
|
||||
PastPartAP slash = {s=\\_,_,_=>slash.participle!Resultative;isPre=True} ;
|
||||
PastPartAgentAP slash np = {s=\\_,_,_=>slash.participle!Resultative++np.s!Instr;isPre=True} ;
|
||||
PassVPSlash slash = extAddVP (extToVP (mkV "լինել")) (slash.participle!Resultative) ;
|
||||
PassAgentVPSlash slash np = extAddVP (extToVP (mkV "լինել")) (slash.participle!Resultative++np.s!Instr) ;
|
||||
PastPartAP slash = {s=\\_,_,_=>passivePart slash;isPre=True} ;
|
||||
PastPartAgentAP slash np = {s=\\_,_,_=>agentAdv np++passivePart slash;isPre=True} ;
|
||||
PassVPSlash slash = lin VP {
|
||||
s=passivePart slash++copulaVerb.s;
|
||||
conditional=\\a,p,n=>passivePart slash++copulaVerb.conditional!a!p!n;
|
||||
converb={imperfective=passivePart slash++copulaVerb.converb.imperfective;
|
||||
futCon1=passivePart slash++copulaVerb.converb.futCon1;
|
||||
futCon2=passivePart slash++copulaVerb.converb.futCon2;
|
||||
negative=passivePart slash++copulaVerb.converb.negative;
|
||||
perfective=passivePart slash++copulaVerb.converb.perfective;
|
||||
simultaneous=passivePart slash++copulaVerb.converb.simultaneous};
|
||||
imperative=\\n=>passivePart slash++copulaVerb.imperative!n;
|
||||
passive=passivePart slash++copulaVerb.passive;
|
||||
past=\\p,n=>passivePart slash++copulaVerb.past!p!n;
|
||||
participle=\\p=>passivePart slash++copulaVerb.participle!p;
|
||||
subjunctive=\\a,p,n=>passivePart slash++copulaVerb.subjunctive!a!p!n
|
||||
} ;
|
||||
PassAgentVPSlash slash np = extPrependVP (agentAdv np) (PassVPSlash slash) ;
|
||||
ProgrVPSlash slash = slash ;
|
||||
ComplBareVS vs s = extAddVP (extToVP vs) s.s ;
|
||||
|
||||
@@ -110,7 +155,7 @@ lin
|
||||
ConsComp x xs = {s1=x.s;s2=xs.s1++","++xs.s2} ;
|
||||
ConjComp c xs = {s=xs.s1++c.s++xs.s2} ;
|
||||
BaseImp x y = {s1=x.s;s2=y.s} ;
|
||||
ConsImp x xs = {s1=x.s;s2=xs.s1++","++xs.s2} ;
|
||||
ConjImp c xs = {s=xs.s1++c.s++xs.s2} ;
|
||||
ConsImp x xs = {s1=x.s;s2=\\n=>xs.s1!n++","++xs.s2!n} ;
|
||||
ConjImp c xs = {s=\\n=>xs.s1!n++c.s++xs.s2!n} ;
|
||||
TPastSimple = {s=[];t=R.Past} ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user