1
0
forked from GitHub/gf-rgl

a majour refactoring to support clitic pronouns

This commit is contained in:
Krasimir Angelov
2018-07-04 13:01:06 +02:00
parent 6fe595104c
commit 21961e39ba
16 changed files with 404 additions and 336 deletions

View File

@@ -52,8 +52,8 @@ concrete CatBul of Cat = CommonX - [IAdv,CAdv,AdV,SC] ** open ResBul, Prelude, P
-- Noun -- Noun
CN = {s : NForm => Str; g : AGender} ; CN = {s : NForm => Str; g : AGender} ;
NP = {s : Role => Str; a : Agr; p : Polarity} ; NP = {s : Role => Str; gn : GenNum; p : PronPerson} ;
Pron = {s : Role => Str; clit : Case => Str; gen : AForm => Str; a : Agr} ; Pron = {s : Role => Str; gen : AForm => Str; gn : GenNum; p : PronPerson} ;
Det,DAP = {s : Bool => AGender => Role => Str; nn : NNumber; spec : Species; p : Polarity} ; Det,DAP = {s : Bool => AGender => Role => Str; nn : NNumber; spec : Species; p : Polarity} ;
Predet = {s : GenNum => Str} ; Predet = {s : GenNum => Str} ;
Ord = {s : AForm => Str} ; Ord = {s : AForm => Str} ;
@@ -118,6 +118,7 @@ concrete CatBul of Cat = CommonX - [IAdv,CAdv,AdV,SC] ** open ResBul, Prelude, P
VPSlash = \vps -> let vp : ResBul.VP VPSlash = \vps -> let vp : ResBul.VP
= {s = vps.s ; = {s = vps.s ;
ad = vps.ad ; ad = vps.ad ;
clitics = vps.clitics ;
compl = \\a => vps.compl1 ! a ++ vps.c2.s ++ vps.compl2 ! a ; compl = \\a => vps.compl1 ! a ++ vps.c2.s ++ vps.compl2 ! a ;
vtype = vps.vtype ; vtype = vps.vtype ;
p = Pos ; p = Pos ;
@@ -132,19 +133,19 @@ concrete CatBul of Cat = CommonX - [IAdv,CAdv,AdV,SC] ** open ResBul, Prelude, P
} ; } ;
V, VS, VQ, VA = \v -> linrefVP (predV v); V, VS, VQ, VA = \v -> linrefVP (predV v);
V2 = \v -> linrefVP (predV v) ++ linrefPrep v.c2 ; V2 = \v -> linrefVP (predV v) ++ linPrep v.c2 ;
V2V = \v -> linrefVP (predV v) ++ linrefPrep v.c2 ++ linrefPrep v.c3 ++ "да"; V2V = \v -> linrefVP (predV v) ++ linPrep v.c2 ++ linPrep v.c3 ++ "да";
V2A, V2S, V2Q = \v -> linrefVP (predV v) ++ linrefPrep v.c2 ++ linrefPrep v.c3; V2A, V2S, V2Q = \v -> linrefVP (predV v) ++ linPrep v.c2 ++ linPrep v.c3;
V3 = \v -> linrefVP (predV v) ++ linrefPrep v.c2 ++ linrefPrep v.c3; V3 = \v -> linrefVP (predV v) ++ linPrep v.c2 ++ linPrep v.c3;
VV = \v -> linrefVP (predV v); VV = \v -> linrefVP (predV v);
Prep = linrefPrep ; Prep = linPrep ;
A = \a -> a.s ! ASg Masc Indef; A = \a -> a.s ! ASg Masc Indef;
A2 = \a -> a.s ! ASg Masc Indef ++ a.c2; A2 = \a -> a.s ! ASg Masc Indef ++ a.c2;
N = \n -> n.s ! NF Sg Indef; N = \n -> n.s ! NF Sg Indef;
N2 = \n -> n.s ! NF Sg Indef ++ linrefPrep n.c2; N2 = \n -> n.s ! NF Sg Indef ++ linPrep n.c2;
N3 = \n -> n.s ! NF Sg Indef ++ linrefPrep n.c2 ++ linrefPrep n.c3; N3 = \n -> n.s ! NF Sg Indef ++ linPrep n.c2 ++ linPrep n.c3;
} }

View File

@@ -25,9 +25,9 @@ concrete ConjunctionBul of Conjunction =
} ; } ;
ConjNP conj ss = { ConjNP conj ss = {
s = \\role => conj.s ++ (linCoordSep [])!conj.distr!conj.conj++ss.s!conj.distr!conj.conj!role; s = \\role => conj.s ++ (linCoordSep [])!conj.distr!conj.conj++ss.s!conj.distr!conj.conj!role;
a = {gn = conjGenNum (gennum (AMasc NonHuman) conj.n) ss.a.gn; p = ss.a.p}; gn = conjGenNum (gennum (AMasc NonHuman) conj.n) ss.gn;
p = Pos p = ss.p
} ; } ;
ConjAP conj ss = { ConjAP conj ss = {
@@ -59,11 +59,13 @@ concrete ConjunctionBul of Conjunction =
ConsIAdv x xs = {s = \\d,t,qform=>x.s!qform++(linCoordSep comma)!d!t++xs.s!d!t!qform} ; ConsIAdv x xs = {s = \\d,t,qform=>x.s!qform++(linCoordSep comma)!d!t++xs.s!d!t!qform} ;
BaseNP x y = BaseNP x y =
{s = \\d,t,role=>x.s!role++linCoord!t++y.s!role; {s = \\d,t,role=>x.s!role++linCoord!t++y.s!role;
a = conjAgr x.a y.a} ; gn = conjGenNum x.gn y.gn;
p = x.p} ;
ConsNP x xs = ConsNP x xs =
{s = \\d,t,role=>x.s!role++(linCoordSep comma)!d!t++xs.s!d!t!role; {s = \\d,t,role=>x.s!role++(linCoordSep comma)!d!t++xs.s!d!t!role;
a = conjAgr xs.a x.a} ; gn = conjGenNum xs.gn x.gn;
p = x.p} ;
BaseAP x y = BaseAP x y =
{s = \\d,t,aform,p => x.s!aform!p++linCoord!t++y.s!aform!p; {s = \\d,t,aform,p => x.s!aform!p++linCoord!t++y.s!aform!p;
@@ -91,7 +93,7 @@ concrete ConjunctionBul of Conjunction =
[Adv] = {s : Bool => Ints 3 => Str} ; [Adv] = {s : Bool => Ints 3 => Str} ;
[AdV] = {s : Bool => Ints 3 => Str} ; [AdV] = {s : Bool => Ints 3 => Str} ;
[IAdv] = {s : Bool => Ints 3 => QForm => Str} ; [IAdv] = {s : Bool => Ints 3 => QForm => Str} ;
[NP] = {s : Bool => Ints 3 => Role => Str; a : Agr} ; [NP] = {s : Bool => Ints 3 => Role => Str; gn : GenNum; p : PronPerson} ;
[AP] = {s : Bool => Ints 3 => AForm => Person => Str; adv : Bool => Ints 3 => Str; isPre : Bool} ; [AP] = {s : Bool => Ints 3 => AForm => Person => Str; adv : Bool => Ints 3 => Str; isPre : Bool} ;
[RS] = {s : Bool => Ints 3 => Agr => Str} ; [RS] = {s : Bool => Ints 3 => Agr => Str} ;
[CN] = {s : Bool => Ints 3 => NForm => Str; g : AGender} ; [CN] = {s : Bool => Ints 3 => NForm => Str; g : AGender} ;

View File

@@ -24,7 +24,7 @@ lin
how_old_QCl p = mkQCl (MorphoFunsBul.mkIAdv "на колко") (mkCl <lin NP p : NP> (mkNP a_Quant plNum (mkN041 "година"))) ; how_old_QCl p = mkQCl (MorphoFunsBul.mkIAdv "на колко") (mkCl <lin NP p : NP> (mkNP a_Quant plNum (mkN041 "година"))) ;
how_far_QCl name = mkQCl (ExtraBul.IAdvAdv (ss "далече")) name ; how_far_QCl name = mkQCl (ExtraBul.IAdvAdv (ss "далече")) name ;
married_Cl p1 p2 = mkCl <lin NP p1 : NP> married_Cl p1 p2 = mkCl <lin NP p1 : NP>
(mkVP (mkVP (mkA076 (case p1.a.gn of { (mkVP (mkVP (mkA076 (case p1.gn of {
R.GSg R.Fem => "омъжен" ; R.GSg R.Fem => "омъжен" ;
_ => "женен" _ => "женен"
}))) (SyntaxBul.mkAdv (mkPrep "за" R.Acc) <lin NP p2 : NP>)); }))) (SyntaxBul.mkAdv (mkPrep "за" R.Acc) <lin NP p2 : NP>));
@@ -32,7 +32,7 @@ lin
is_right_VP = mkVP (mkA084 "верен") ; is_right_VP = mkVP (mkA084 "верен") ;
is_wrong_VP = mkVP (mkA079 "грешен") ; is_wrong_VP = mkVP (mkA079 "грешен") ;
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ; n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
weather_adjCl a = R.mkClause (a.s ! R.ASg R.Masc R.Indef ! R.P3) {gn=R.GSg R.Masc; p=R.P3} R.Pos (R.insertObj (\\_=>"") R.Pos (R.predV R.verbBe)) ; weather_adjCl a = R.mkClause (a.s ! R.ASg R.Masc R.Indef ! R.P3) (R.GSg R.Masc) (R.NounP3 R.Pos) (R.insertObj (\\_=>"") R.Pos (R.predV R.verbBe)) ;
lin lin
weekdayPunctualAdv w = SyntaxBul.mkAdv in_Prep (mkNP w) ; -- on Sunday weekdayPunctualAdv w = SyntaxBul.mkAdv in_Prep (mkNP w) ; -- on Sunday

View File

@@ -120,7 +120,7 @@ lin
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++ v.s ! Imperf ! VPres Sg P3 ; } ++ v.s ! Imperf ! VPres Sg P3 ;
s2= inflVerb v ; s2= inflVerb v ;
s3= "" s3= ""
@@ -133,7 +133,7 @@ lin
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++ v.c2.s ++
@@ -149,7 +149,7 @@ lin
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++ v.c2.s ++
@@ -166,7 +166,7 @@ lin
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++ v.c2.s ++
@@ -183,7 +183,7 @@ lin
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++ v.c2.s ++
@@ -200,7 +200,7 @@ lin
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++ v.c2.s ++
@@ -217,7 +217,7 @@ lin
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++ v.c2.s ++
@@ -233,7 +233,7 @@ lin
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
case v.typ of { case v.typ of {
@@ -251,7 +251,7 @@ lin
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
"че" ++ pp "изречение"; "че" ++ pp "изречение";
@@ -265,7 +265,7 @@ lin
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
pp "въпрос"; pp "въпрос";
@@ -279,7 +279,7 @@ lin
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
pp "прилагателно"; pp "прилагателно";

View File

@@ -2,7 +2,7 @@
concrete ExtendBul of Extend = CatBul ** open Prelude, Predef, ResBul, GrammarBul, MorphoFunsBul in { concrete ExtendBul of Extend = CatBul ** open Prelude, Predef, ResBul, GrammarBul, MorphoFunsBul in {
lin lin
GenModNP num np cn = DetCN (DetQuant DefArt num) (AdvCN cn (PrepNP possess_Prep np)) ; -- this man's car(s) ; DEFAULT the car of this man GenModNP num np cn = DetCN (DetQuant DefArt num) (AdvCN cn (PrepNP (mkPrep "на") np)) ;
AdAdV a adv = {s = a.s ++ adv.s; p = adv.p} ; AdAdV a adv = {s = a.s ++ adv.s; p = adv.p} ;
@@ -66,9 +66,9 @@ lin
} ; } ;
GerundNP vp = { GerundNP vp = {
s = \\_ => daComplex Simul Pos vp ! Imperf ! {gn=GSg Neut; p=P1}; s = \\_ => daComplex Simul Pos vp ! Imperf ! {gn=GSg Neut; p=P1};
a = {gn=GSg Neut; p=P3}; gn =GSg Neut;
p = Pos p = NounP3 Pos
} ; } ;
GerundAdv, ByVP = \vp -> GerundAdv, ByVP = \vp ->
@@ -79,7 +79,7 @@ lin
InOrderToVP vp = InOrderToVP vp =
{s = "за" ++ daComplex Simul Pos vp ! Perf ! {gn=GSg Neut; p=P3}}; {s = "за" ++ daComplex Simul Pos vp ! Perf ! {gn=GSg Neut; p=P3}};
iFem_Pron = mkPron "аз" "мен" "ме" "ми" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Fem) P1 ; iFem_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Fem) PronP1 ;
youFem_Pron = youSg_Pron ; youFem_Pron = youSg_Pron ;
weFem_Pron = we_Pron ; weFem_Pron = we_Pron ;
youPlFem_Pron = youPl_Pron ; youPlFem_Pron = youPl_Pron ;
@@ -102,7 +102,7 @@ lin
clitic = case vp.vtype of { clitic = case vp.vtype of {
VNormal => {s=[]; agr=agr} ; VNormal => {s=[]; agr=agr} ;
VMedial c => {s=reflClitics ! c; agr=agr} ; VMedial c => {s=reflClitics ! c; agr=agr} ;
VPhrasal c => {s=personalClitics ! c ! agr.gn ! agr.p; agr={gn=GSg Neut; p=P3}} VPhrasal c => {s=personalClitics agr ! c; agr={gn=GSg Neut; p=P3}}
} ; } ;
in vp.ad.s ++ clitic.s ++ in vp.ad.s ++ clitic.s ++
vp.s ! Imperf ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ++ vp.s ! Imperf ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ++
@@ -117,7 +117,7 @@ lin
BaseVPS x y = {s = \\d,t,a=>x.s!a++linCoord!t++y.s!a} ; BaseVPS x y = {s = \\d,t,a=>x.s!a++linCoord!t++y.s!a} ;
ConsVPS x xs = {s = \\d,t,a=>x.s!a++(linCoordSep bindComma)!d!t++xs.s!d!t!a} ; ConsVPS x xs = {s = \\d,t,a=>x.s!a++(linCoordSep bindComma)!d!t++xs.s!d!t!a} ;
PredVPS np vps = {s = np.s ! RSubj ++ vps.s ! np.a} ; PredVPS np vps = {s = np.s ! RSubj ++ vps.s ! personAgr np.gn np.p} ;
MkVPS t p vp = { MkVPS t p vp = {
s = \\a => s = \\a =>
@@ -135,22 +135,22 @@ lin
ComplSlashPartLast = ComplSlash ; ComplSlashPartLast = ComplSlash ;
lincat lincat
RNP = {s : Role => Str; a : Agr; p : Polarity} ; RNP = {s : Role => Str; gn : GenNum} ;
lin lin
ReflRNP slash rnp = { ReflRNP slash rnp = {
s = slash.s ; s = slash.s ;
ad = slash.ad ; ad = slash.ad ;
compl = \\a => slash.compl1 ! a ++ slash.c2.s ++ rnp.s ! RObj slash.c2.c ++ slash.compl2 ! rnp.a ; clitics = slash.clitics ;
compl = \\a => slash.compl1 ! a ++ slash.c2.s ++ rnp.s ! RObj slash.c2.c ++ slash.compl2 ! agrP3 rnp.gn ;
vtype = slash.vtype ; vtype = slash.vtype ;
p = orPol rnp.p slash.p ; p = slash.p ;
isSimple = False isSimple = False
} ; } ;
ReflPron = ReflPron =
{ s = \\role => "себе си"; { s = \\role => "себе си";
a = {gn = GSg Masc; p = P3} ; gn = GSg Masc
p = Pos
} ; } ;
ReflPoss num cn = ReflPoss num cn =
@@ -168,43 +168,44 @@ lin
} ; } ;
s = reflPron ! aform (gennum cn.g (numnnum num.nn)) Def (RObj Acc) ++ num.s ! dgenderSpecies cn.g Indef role ++ cn.s ! nf s = reflPron ! aform (gennum cn.g (numnnum num.nn)) Def (RObj Acc) ++ num.s ! dgenderSpecies cn.g Indef role ++ cn.s ! nf
in case role of { in case role of {
RObj Dat => "на" ++ s; RObj c => linCase c Pos ++ s;
RObj WithPrep => with_Word ++ s; _ => s
_ => s
} ; } ;
a = {gn = gennum cn.g (numnnum num.nn); p = P3} ; gn = gennum cn.g (numnnum num.nn)
p = Pos
} ; } ;
PredetRNP pred rnp = { PredetRNP pred rnp = {
s = \\c => pred.s ! rnp.a.gn ++ rnp.s ! c ; s = \\c => pred.s ! rnp.gn ++ rnp.s ! c ;
a = rnp.a ; gn = rnp.gn
p = rnp.p
} ; } ;
lin lin
ApposNP np1 np2 = {s = \\role => np1.s ! role ++ bindComma ++ np2.s ! role; a = np1.a; p = np1.p} ; ApposNP np1 np2 = {s = \\role => case role of {
RObj c => linCase c (personPol np1.p) ++ np1.s ! RObj CPrep ;
role => np1.s ! role
} ++ bindComma ++ np2.s ! role;
gn = np1.gn;
p = NounP3 (personPol np1.p)
} ;
DetNPMasc det = { DetNPMasc det = {
s = \\role => let s = det.s ! False ! (AMasc Human) ! role s = \\role => let s = det.s ! False ! (AMasc Human) ! role
in case role of { in case role of {
RObj Dat => "на" ++ s; RObj c => linCase c det.p ++ s;
RObj WithPrep => with_Word ++ s; _ => s
_ => s } ;
} ; gn = gennum (AMasc Human) (numnnum det.nn);
a = {gn = gennum (AMasc Human) (numnnum det.nn); p = P3} ; p = NounP3 det.p
p = det.p
} ; } ;
DetNPFem det = { DetNPFem det = {
s = \\role => let s = det.s ! False ! AFem ! role s = \\role => let s = det.s ! False ! AFem ! role
in case role of { in case role of {
RObj Dat => "на" ++ s; RObj c => linCase c det.p ++ s;
RObj WithPrep => with_Word ++ s; _ => s
_ => s
} ; } ;
a = {gn = gennum AFem (numnnum det.nn); p = P3} ; gn = gennum AFem (numnnum det.nn);
p = det.p p = NounP3 det.p
} ; } ;
} }

View File

@@ -31,8 +31,8 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
role = RObj Acc role = RObj Acc
} ; } ;
i8fem_Pron = mkPron "àç" "ìåí" "ìå" "ìè" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Fem) P1 ; i8fem_Pron = mkPron "àç" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Fem) PronP1 ;
i8neut_Pron = mkPron "àç" "ìåí" "ìå" "ìè" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Neut) P1 ; i8neut_Pron = mkPron "àç" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Neut) PronP1 ;
whatSg8fem_IP = mkIP "êàêâà" "êàêâà" (GSg Fem) ; whatSg8fem_IP = mkIP "êàêâà" "êàêâà" (GSg Fem) ;
whatSg8neut_IP = mkIP "êàêâî" "êàêâî" (GSg Neut) ; whatSg8neut_IP = mkIP "êàêâî" "êàêâî" (GSg Neut) ;
@@ -40,8 +40,8 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
whoSg8fem_IP = mkIP "êîÿ" "êîãî" (GSg Fem) ; whoSg8fem_IP = mkIP "êîÿ" "êîãî" (GSg Fem) ;
whoSg8neut_IP = mkIP "êîå" "êîãî" (GSg Neut) ; whoSg8neut_IP = mkIP "êîå" "êîãî" (GSg Neut) ;
youSg8fem_Pron = mkPron "òè" "òåá" "òå" "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Fem) P2 ; youSg8fem_Pron = mkPron "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Fem) PronP2 ;
youSg8neut_Pron = mkPron "òè" "òåá" "òå" "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Neut) P2 ; youSg8neut_Pron = mkPron "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Neut) PronP2 ;
onePl_Num = {s = table { onePl_Num = {s = table {
CFMasc Indef _ | CFFem Indef | CFNeut Indef => "åäíè" ; CFMasc Indef _ | CFFem Indef | CFNeut Indef => "åäíè" ;
@@ -79,7 +79,7 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
BaseVPS x y = {s = \\d,t,a=>x.s!a++linCoord!t++y.s!a} ; BaseVPS x y = {s = \\d,t,a=>x.s!a++linCoord!t++y.s!a} ;
ConsVPS x xs = {s = \\d,t,a=>x.s!a++(linCoordSep bindComma)!d!t++xs.s!d!t!a} ; ConsVPS x xs = {s = \\d,t,a=>x.s!a++(linCoordSep bindComma)!d!t++xs.s!d!t!a} ;
PredVPS np vps = {s = np.s ! RSubj ++ vps.s ! np.a} ; PredVPS np vps = {s = np.s ! RSubj ++ vps.s ! personAgr np.gn np.p} ;
MkVPS t p vp = { MkVPS t p vp = {
s = \\a => s = \\a =>

View File

@@ -5,14 +5,14 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
flags optimize=all_subs ; flags optimize=all_subs ;
lin lin
ImpersCl vp = mkClause [] (agrP3 (GSg Neut)) Pos vp ; ImpersCl vp = mkClause [] (GSg Neut) (NounP3 Pos) vp ;
GenericCl vp = mkClause "íÿêîé" (agrP3 (GSg Neut)) Pos vp ; GenericCl vp = mkClause "íÿêîé" (GSg Neut) (NounP3 Pos) vp ;
CleftNP np rs = CleftNP np rs =
mkClause (np.s ! RSubj) mkClause (np.s ! RSubj)
{gn=GSg Neut; p=np.a.p} Pos (GSg Neut) np.p
(insertObj (\\_ => thisRP ! np.a.gn ++ rs.s ! np.a) np.p (predV verbBe)) ; (insertObj (\\_ => thisRP ! np.gn ++ rs.s ! personAgr np.gn np.p) (personPol np.p) (predV verbBe)) ;
CleftAdv ad s = {s = \\t,a,p,o => case p of {Pos=>[]; Neg=>"íå"} ++ ad.s ++ s.s } ; CleftAdv ad s = {s = \\t,a,p,o => case p of {Pos=>[]; Neg=>"íå"} ++ ad.s ++ s.s } ;
ExistNP np = ExistNPAdv np (lin Adv {s = ""}) ; ExistNP np = ExistNPAdv np (lin Adv {s = ""}) ;
@@ -20,7 +20,7 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
ExistNPAdv np adv = ExistNPAdv np adv =
{ s = \\t,a,p,o => { s = \\t,a,p,o =>
let verb = case orPol p np.p of { let verb = case orPol p (personPol np.p) of {
Pos => mkV186 "èìàì" ; Pos => mkV186 "èìàì" ;
Neg => mkV186 "íÿìàì" Neg => mkV186 "íÿìàì"
} ; } ;
@@ -56,11 +56,12 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
ExistIPAdv ip adv = ExistIPAdv ip adv =
mkQuestion {s = ip.s ! RSubj} mkQuestion {s = ip.s ! RSubj}
(mkClause "òóê" (agrP3 ip.gn) Pos (insertObj (\\_ => adv.s) Pos (predV verbBe))) ; (mkClause "òóê" ip.gn (NounP3 Pos) (insertObj (\\_ => adv.s) Pos (predV verbBe))) ;
ProgrVP vp = { ProgrVP vp = {
s = \\_ => vp.s ! Imperf ; s = \\_ => vp.s ! Imperf ;
ad = vp.ad ; ad = vp.ad ;
clitics = vp.clitics ;
compl = vp.compl ; compl = vp.compl ;
vtype = vp.vtype ; vtype = vp.vtype ;
p = vp.p ; p = vp.p ;

View File

@@ -231,12 +231,7 @@ oper
dualN : N -> Prep -> N dualN : N -> Prep -> N
= \n,p -> lin N { s = n.s; = \n,p -> lin N { s = n.s;
rel = \\_ => p.s ++ rel = \\_ => linPrep p ++
case p.c of {
Acc => "" ;
Dat => "íà" ;
WithPrep => with_Word
} ++
n.s ! NF Sg Def ; n.s ! NF Sg Def ;
relPost = True; relPost = True;
g = n.g g = n.g
@@ -267,13 +262,12 @@ oper
mkPrep = overload { mkPrep = overload {
mkPrep : Str -> Prep = mkPrep : Str -> Prep =
\p -> {s = p; c = Acc; lock_Prep = <>} ; \p -> {s = p; c = CPrep; lock_Prep = <>} ;
mkPrep : Str -> Case -> Prep = mkPrep : Str -> Case -> Prep =
\p,c -> {s = p; c = c; lock_Prep = <>} \p,c -> {s = p; c = c; lock_Prep = <>}
} ; } ;
noPrep : Prep = mkPrep [] Acc ; noPrep : Prep = mkPrep [] Acc ;
dat_Prep : Prep = mkPrep [] Dat ;
--2 Proper Names --2 Proper Names
-- --

View File

@@ -4,85 +4,84 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
lin lin
DetCN det cn = DetCN det cn =
{ s = \\role => let nf = case <det.nn,det.spec> of { { s = \\role => let nf = case <det.nn,det.spec> of {
<NNum Sg,Def> => case role of { <NNum Sg,Def> => case role of {
RSubj => NFSgDefNom ; RSubj => NFSgDefNom ;
RVoc => NFVocative ; RVoc => NFVocative ;
_ => NF Sg Def _ => NF Sg Def
} ; } ;
<NNum Sg,Indef> => case role of { <NNum Sg,Indef> => case role of {
RVoc => NFVocative ; RVoc => NFVocative ;
_ => NF Sg Indef _ => NF Sg Indef
} ; } ;
<NNum Pl,Def> => NF Pl Def ; <NNum Pl,Def> => NF Pl Def ;
<NNum Pl,Indef> => NF Pl Indef; <NNum Pl,Indef> => NF Pl Indef;
<NCountable,Def> => NF Pl det.spec ; <NCountable,Def> => NF Pl det.spec ;
<NCountable,Indef> => NFPlCount <NCountable,Indef> => NFPlCount
} ; } ;
s = det.s ! True ! cn.g ! role ++ cn.s ! nf s = det.s ! True ! cn.g ! role ++ cn.s ! nf
in case role of { in case role of {
RObj Dat => "íà" ++ s; RObj c => linCase c det.p ++ s;
RObj WithPrep => case det.p of { _ => s
Pos => with_Word ++ s ; } ;
Neg => "áåç" ++ s gn = gennum cn.g (numnnum det.nn);
} ; p = NounP3 det.p
_ => s
} ;
a = {gn = gennum cn.g (numnnum det.nn); p = P3} ;
p = det.p
} ; } ;
DetNP det = DetNP det =
{ s = \\role => let s = det.s ! False ! ANeut ! role { s = \\role => let s = det.s ! False ! ANeut ! role
in case role of { in case role of {
RObj Dat => "íà" ++ s; RObj c => linCase c det.p ++ s;
RObj WithPrep => with_Word ++ s; _ => s
_ => s } ;
} ; gn = gennum ANeut (numnnum det.nn);
a = {gn = gennum ANeut (numnnum det.nn); p = P3} ; p = NounP3 det.p
p = det.p
} ; } ;
UsePN pn = { s = table { UsePN pn = { s = table {
RObj Dat => "íà" ++ pn.s; RObj c => linCase c Pos ++ pn.s;
RObj WithPrep => with_Word ++ pn.s; _ => pn.s
_ => pn.s
} ; } ;
a = {gn = GSg pn.g; p = P3} ; gn = GSg pn.g ;
p = Pos p = NounP3 Pos
} ; } ;
UsePron p = {s = p.s; a=p.a; p=Pos} ; UsePron p = p ;
PredetNP pred np = { PredetNP pred np = {
s = \\c => case c of { s = \\c => case c of {
RObj Dat => "íà"; RObj c => linCase c (personPol np.p) ;
RObj WithPrep => case np.p of { _ => ""
Pos => with_Word ;
Neg => "áåç"
} ;
_ => ""
} ++ } ++
pred.s ! np.a.gn ++ np.s ! RObj Acc ; pred.s ! np.gn ++ np.s ! RObj CPrep ;
a = np.a ; gn = np.gn ;
p = np.p p = NounP3 (personPol np.p)
} ; } ;
PPartNP np v2 = { PPartNP np v2 = {
s = \\c => np.s ! c ++ v2.s ! Perf ! VPassive (aform np.a.gn Indef c) ; s = \\role => case role of {
a = np.a ; RObj c => linCase c (personPol np.p) ++ np.s ! RObj CPrep ;
p = np.p role => np.s ! role
} ++ v2.s ! Perf ! VPassive (aform np.gn Indef role) ;
gn = np.gn ;
p = NounP3 (personPol np.p)
} ; } ;
AdvNP np adv = { AdvNP np adv = {
s = \\c => np.s ! c ++ adv.s ; s = \\role => case role of {
a = np.a ; RObj c => linCase c (personPol np.p) ++ np.s ! RObj CPrep ;
p = np.p role => np.s ! role
} ++ adv.s ;
gn = np.gn ;
p = NounP3 (personPol np.p)
} ; } ;
ExtAdvNP np adv = { ExtAdvNP np adv = {
s = \\c => np.s ! c ++ bindComma ++ adv.s ; s = \\role => case role of {
a = np.a ; RObj c => linCase c (personPol np.p) ++ np.s ! RObj CPrep ;
p = np.p role => np.s ! role
} ++ bindComma ++ adv.s ;
gn = np.gn ;
p = NounP3 (personPol np.p)
} ; } ;
DetQuant quant num = { DetQuant quant num = {
@@ -160,13 +159,12 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
MassNP cn = { MassNP cn = {
s = table { s = table {
RVoc => cn.s ! NFVocative ; RVoc => cn.s ! NFVocative ;
RObj Dat => "íà" ++ cn.s ! (NF Sg Indef) ; RObj c => linCase c Pos ++ cn.s ! (NF Sg Indef) ;
RObj WithPrep => with_Word ++ cn.s ! (NF Sg Indef); _ => cn.s ! (NF Sg Indef)
_ => cn.s ! (NF Sg Indef)
} ; } ;
a = {gn = gennum cn.g Sg; p = P3} ; gn = gennum cn.g Sg;
p = Pos p = NounP3 Pos
} ; } ;
UseN noun = noun ; UseN noun = noun ;
@@ -204,21 +202,24 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
PartNP cn np = {s = \\nf => cn.s ! nf ++ "îò" ++ np.s ! (RObj Acc); g = cn.g} ; PartNP cn np = {s = \\nf => cn.s ! nf ++ "îò" ++ np.s ! (RObj Acc); g = cn.g} ;
CountNP det np = { CountNP det np = {
s = \\role => let g = case np.a.gn of { -- this is lossy s = \\role => let g = case np.gn of { -- this is lossy
GSg Masc => AMasc NonHuman ; GSg Masc => AMasc NonHuman ;
GSg Neut => ANeut ; GSg Neut => ANeut ;
GSg Fem => AFem ; GSg Fem => AFem ;
GPl => ANeut GPl => ANeut
} }
in det.s ! False ! g ! role ++ np.s ! (RObj Acc) ; in det.s ! False ! g ! role ++ np.s ! (RObj Acc) ;
a = {gn = gennum ANeut (numnnum det.nn); p = P3} ; gn = gennum ANeut (numnnum det.nn);
p = Pos p = NounP3 Pos
} ; } ;
RelNP np rs = { RelNP np rs = {
s = \\r => np.s ! r ++ rs.s ! np.a ; s = \\role => case role of {
a = np.a ; RObj c => linCase c (personPol np.p) ++ np.s ! RObj CPrep ;
p = np.p role => np.s ! role
} ++ rs.s ! personAgr np.gn np.p ;
gn = np.gn ;
p = NounP3 (personPol np.p)
} ; } ;
AdjDAP dap ap = {s = \\sp,g,role => let g' = case g of { AdjDAP dap ap = {s = \\sp,g,role => let g' = case g of {

View File

@@ -18,7 +18,7 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
QuestVP ip vp = { QuestVP ip vp = {
s = \\t,a,b,qform => s = \\t,a,b,qform =>
(mkClause (ip.s ! RSubj ! qform) {gn = ip.gn ; p = P3} Pos vp).s ! t ! a ! b ! Main (mkClause (ip.s ! RSubj ! qform) ip.gn (NounP3 Pos) vp).s ! t ! a ! b ! Main
} ; } ;
QuestSlash ip slash = QuestSlash ip slash =
@@ -28,7 +28,7 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
QuestIAdv iadv cl = mkQuestion iadv cl ; QuestIAdv iadv cl = mkQuestion iadv cl ;
QuestIComp icomp np = QuestIComp icomp np =
mkQuestion icomp (mkClause (np.s ! RSubj) np.a np.p (predV verbBe)) ; mkQuestion icomp (mkClause (np.s ! RSubj) np.gn np.p (predV verbBe)) ;
PrepIP p ip = {s = \\qform => p.s ++ case p.c of {Dat=>"íà";_=>[]} ++ ip.s ! RSubj ! qform} ; PrepIP p ip = {s = \\qform => p.s ++ case p.c of {Dat=>"íà";_=>[]} ++ ip.s ! RSubj ! qform} ;

View File

@@ -7,26 +7,28 @@ concrete RelativeBul of Relative = CatBul ** open ResBul in {
lin lin
RelCl cl = { RelCl cl = {
s = \\t,a,p,agr => suchRP ! agr.gn ++ "֌" ++ cl.s ! t ! a ! p ! Main ; s = \\t,a,p,agr => suchRP ! agr.gn ++ "֌" ++ cl.s ! t ! a ! p ! Main
role = RSubj
} ; } ;
RelVP rp vp = { RelVP rp vp = {
s = \\t,a,p,agr => s = \\t,a,p,agr =>
let let
cl = mkClause (rp.s ! agr.gn) agr Pos vp pp = case agr.p of {
P1 => PronP1 ;
P2 => PronP2 ;
P3 => PronP3
} ;
cl = mkClause (rp.s ! agr.gn) agr.gn pp vp
in in
cl.s ! t ! a ! p ! Main ; cl.s ! t ! a ! p ! Main
role = RSubj
} ; } ;
RelSlash rp slash = { RelSlash rp slash = {
s = \\t,a,p,agr => slash.c2.s ++ rp.s ! agr.gn ++ slash.s ! agr ! t ! a ! p ! Main ; s = \\t,a,p,agr => slash.c2.s ++ rp.s ! agr.gn ++ slash.s ! agr ! t ! a ! p ! Main
role = RObj Acc
} ; } ;
FunRP p np rp = { FunRP p np rp = {
s = \\gn => np.s ! RObj Acc ++ p.s ++ (case p.c of {Acc => []; Dat => "íà"; WithPrep => with_Word}) ++ rp.s ! gn ; s = \\gn => np.s ! RObj Acc ++ linPrep p ++ rp.s ! gn ;
} ; } ;
IdRP = { IdRP = {

View File

@@ -22,7 +22,7 @@ resource ResBul = ParamX ** open Prelude, Predef in {
param param
Role = RSubj | RObj Case | RVoc ; Role = RSubj | RObj Case | RVoc ;
Case = Acc | Dat | WithPrep ; Case = Acc | Dat | WithPrep | CPrep ;
NForm = NForm =
NF Number Species NF Number Species
@@ -38,7 +38,7 @@ resource ResBul = ParamX ** open Prelude, Predef in {
GenNum = GSg Gender | GPl ; GenNum = GSg Gender | GPl ;
-- Agreement of $NP$ is a record. We'll add $Gender$ later. PronPerson = PronP1 | PronP2 | PronP3 | NounP3 Polarity ;
oper oper
Agr = {gn : GenNum ; p : Person} ; Agr = {gn : GenNum ; p : Person} ;
@@ -120,11 +120,6 @@ resource ResBul = ParamX ** open Prelude, Predef in {
_ => GPl _ => GPl
} ; } ;
conjAgr : Agr -> Agr -> Agr = \a,b -> {
gn = conjGenNum a.gn b.gn ;
p = conjPerson a.p b.p
} ;
gennum : AGender -> Number -> GenNum = \g,n -> gennum : AGender -> Number -> GenNum = \g,n ->
case n of { case n of {
Sg => GSg (case g of { Sg => GSg (case g of {
@@ -147,6 +142,22 @@ resource ResBul = ParamX ** open Prelude, Predef in {
NCountable => Pl NCountable => Pl
} ; } ;
personPol : PronPerson -> Polarity = \p ->
case p of {
NounP3 pol => pol;
_ => Pos
} ;
personAgr : GenNum -> PronPerson -> Agr = \gn,p ->
{gn = gn;
p = case p of {
PronP1 => P1 ;
PronP2 => P2 ;
PronP3 => P3 ;
NounP3 _ => P3
}
} ;
orPol : Polarity -> Polarity -> Polarity = \p1,p2 -> orPol : Polarity -> Polarity -> Polarity = \p1,p2 ->
case p1 of { case p1 of {
Neg => Neg; Neg => Neg;
@@ -223,62 +234,68 @@ resource ResBul = ParamX ** open Prelude, Predef in {
} ; } ;
VP : Type = { VP : Type = {
s : Aspect => VTable ; s : Aspect => VTable ;
ad : {isEmpty : Bool; s : Str} ; -- sentential adverb ad : {isEmpty : Bool; s : Str} ; -- sentential adverb
compl : Agr => Str ; clitics : Str ;
vtype : VType ; compl : Agr => Str ;
p : Polarity ; vtype : VType ;
p : Polarity ;
isSimple : Bool -- regulates the place of participle used as adjective isSimple : Bool -- regulates the place of participle used as adjective
} ; } ;
VPSlash = { VPSlash = {
s : Aspect => VTable ; s : Aspect => VTable ;
ad : {isEmpty : Bool; s : Str} ; -- sentential adverb ad : {isEmpty : Bool; s : Str} ; -- sentential adverb
compl1 : Agr => Str ; clitics : Str ;
compl2 : Agr => Str ; compl1 : Agr => Str ;
vtype : VType ; compl2 : Agr => Str ;
p : Polarity ; vtype : VType ;
c2 : Preposition ; p : Polarity ;
c2 : Preposition ;
isSimple : Bool ; -- regulates the place of participle used as adjective isSimple : Bool ; -- regulates the place of participle used as adjective
subjCtrl : Bool -- the second complement agrees with the subject or with the first complement subjCtrl : Bool -- the second complement agrees with the subject or with the first complement
} ; } ;
predV : Verb -> VP = \verb -> { predV : Verb -> VP = \verb -> {
s = verb.s ; s = verb.s ;
ad = {isEmpty=True; s=[]} ; ad = {isEmpty=True; s=[]} ;
compl = \\_ => [] ; clitics = [] ;
vtype = verb.vtype ; compl = \\_ => [] ;
p = Pos ; vtype = verb.vtype ;
p = Pos ;
isSimple = True isSimple = True
} ; } ;
slashV : Verb -> Preposition -> Bool -> VPSlash = \verb,prep,subjCtrl -> { slashV : Verb -> Preposition -> Bool -> VPSlash = \verb,prep,subjCtrl -> {
s = verb.s ; s = verb.s ;
ad = {isEmpty=True; s=[]} ; ad = {isEmpty=True; s=[]} ;
compl1 = \\_ => [] ; clitics = [] ;
compl2 = \\_ => [] ; compl1 = \\_ => [] ;
vtype = verb.vtype ; compl2 = \\_ => [] ;
p = Pos ; vtype = verb.vtype ;
c2 = prep ; p = Pos ;
c2 = prep ;
isSimple = True ; isSimple = True ;
subjCtrl = subjCtrl subjCtrl = subjCtrl
} ; } ;
insertObj : (Agr => Str) -> Polarity -> VP -> VP = \obj,p,vp -> { insertObj : (Agr => Str) -> Polarity -> VP -> VP = \obj,p,vp -> {
s = vp.s ; s = vp.s ;
ad = vp.ad ; ad = vp.ad ;
compl = \\a => vp.compl ! a ++ obj ! a ; clitics= vp.clitics ;
vtype = vp.vtype ; compl = \\a => vp.compl ! a ++ obj ! a ;
p = case p of { vtype = vp.vtype ;
Neg => Neg; p = case p of {
_ => vp.p Neg => Neg;
} ; _ => vp.p
} ;
isSimple = False isSimple = False
} ; } ;
insertSlashObj1 : (Agr => Str) -> Polarity -> VPSlash -> VPSlash = \obj,p,slash -> { insertSlashObj1 : (Agr => Str) -> Polarity -> VPSlash -> VPSlash = \obj,p,slash -> {
s = slash.s ; s = slash.s ;
ad = slash.ad ; ad = slash.ad ;
clitics= slash.clitics ;
compl1 = \\a => slash.compl1 ! a ++ obj ! a ; compl1 = \\a => slash.compl1 ! a ++ obj ! a ;
compl2 = slash.compl2 ; compl2 = slash.compl2 ;
vtype = slash.vtype ; vtype = slash.vtype ;
@@ -294,6 +311,7 @@ resource ResBul = ParamX ** open Prelude, Predef in {
insertSlashObj2 : (Agr => Str) -> Polarity -> VPSlash -> VPSlash = \obj,p,slash -> { insertSlashObj2 : (Agr => Str) -> Polarity -> VPSlash -> VPSlash = \obj,p,slash -> {
s = slash.s ; s = slash.s ;
ad = slash.ad ; ad = slash.ad ;
clitics= slash.clitics ;
compl1 = slash.compl1 ; compl1 = slash.compl1 ;
compl2 = \\a => slash.compl2 ! a ++ obj ! a ; compl2 = \\a => slash.compl2 ! a ++ obj ! a ;
vtype = slash.vtype ; vtype = slash.vtype ;
@@ -377,12 +395,12 @@ resource ResBul = ParamX ** open Prelude, Predef in {
verbBe : Verb = {s=table Aspect [auxBe; auxWould] ; vtype=VNormal} ; verbBe : Verb = {s=table Aspect [auxBe; auxWould] ; vtype=VNormal} ;
reflClitics : Case => Str = table {Acc => "ñå"; Dat => "ñè"; WithPrep => with_Word ++ "ñåáå ñè"} ; reflClitics : Case => Str = table {Acc => "ñå"; Dat => "ñè"; WithPrep => with_Word ++ "ñåáå ñè"; CPrep => "ñåáå ñè"} ;
personalClitics : Case => GenNum => Person => Str = personalClitics : Agr -> Case => Str = \agr ->
table { table {
Acc => table { Acc => case agr.gn of {
GSg g => table { GSg g => case agr.p of {
P1 => "ìå" ; P1 => "ìå" ;
P2 => "òå" ; P2 => "òå" ;
P3 => case g of { P3 => case g of {
@@ -391,14 +409,14 @@ resource ResBul = ParamX ** open Prelude, Predef in {
Neut => "ãî" Neut => "ãî"
} }
} ; } ;
GPl => table { GPl => case agr.p of {
P1 => "íè" ; P1 => "íè" ;
P2 => "âè" ; P2 => "âè" ;
P3 => "ãè" P3 => "ãè"
} }
} ; } ;
Dat => table { Dat => case agr.gn of {
GSg g => table { GSg g => case agr.p of {
P1 => "ìè" ; P1 => "ìè" ;
P2 => "òè" ; P2 => "òè" ;
P3 => case g of { P3 => case g of {
@@ -407,14 +425,14 @@ resource ResBul = ParamX ** open Prelude, Predef in {
Neut => "ìó" Neut => "ìó"
} }
} ; } ;
GPl => table { GPl => case agr.p of {
P1 => "íè" ; P1 => "íè" ;
P2 => "âè" ; P2 => "âè" ;
P3 => "èì" P3 => "èì"
} }
} ; } ;
WithPrep => table { WithPrep => case agr.gn of {
GSg g => table { GSg g => case agr.p of {
P1 => with_Word ++ "ìåí" ; P1 => with_Word ++ "ìåí" ;
P2 => with_Word ++ "òåá" ; P2 => with_Word ++ "òåá" ;
P3 => case g of { P3 => case g of {
@@ -423,11 +441,27 @@ resource ResBul = ParamX ** open Prelude, Predef in {
Neut => with_Word ++ "íåãî" Neut => with_Word ++ "íåãî"
} }
} ; } ;
GPl => table { GPl => case agr.p of {
P1 => with_Word ++ "íàñ" ; P1 => with_Word ++ "íàñ" ;
P2 => with_Word ++ "âàñ" ; P2 => with_Word ++ "âàñ" ;
P3 => with_Word ++ "òÿõ" P3 => with_Word ++ "òÿõ"
} }
} ;
CPrep => case agr.gn of {
GSg g => case agr.p of {
P1 => "ìåí" ;
P2 => "òåá" ;
P3 => case g of {
Masc => "íåãî" ;
Fem => "íåÿ" ;
Neut => "íåãî"
}
} ;
GPl => case agr.p of {
P1 => "íàñ" ;
P2 => "âàñ" ;
P3 => "òÿõ"
}
} }
} ; } ;
@@ -463,17 +497,18 @@ resource ResBul = ParamX ** open Prelude, Predef in {
s : Tense => Anteriority => Polarity => Order => Str s : Tense => Anteriority => Polarity => Order => Str
} ; } ;
mkClause : Str -> Agr -> Polarity -> VP -> Clause = mkClause : Str -> GenNum -> PronPerson -> VP -> Clause =
\subj,agr,p1,vp -> { \subj,gn,p1,vp -> {
s = \\t,a,p2,o => s = \\t,a,p2,o =>
let let
p : Polarity p : Polarity
= case <p1,p2,vp.p> of { = case <personPol p1,p2,vp.p> of {
<Neg,_,_> => Neg ; <Neg,_,_> => Neg ;
<_,Neg,_> => Neg ; <_,Neg,_> => Neg ;
<_,_,Neg> => Neg ; <_,_,Neg> => Neg ;
_ => Pos _ => Pos
} ; } ;
agr = personAgr gn p1 ;
verb : Bool => Str verb : Bool => Str
= \\q => vpTenses vp ! t ! a ! p ! agr ! q ! Perf ; = \\q => vpTenses vp ! t ! a ! p ! agr ! q ! Perf ;
compl = vp.compl ! agr compl = vp.compl ! agr
@@ -487,9 +522,10 @@ resource ResBul = ParamX ** open Prelude, Predef in {
vpTenses : VP -> Tense => Anteriority => Polarity => Agr => Bool => Aspect => Str = vpTenses : VP -> Tense => Anteriority => Polarity => Agr => Bool => Aspect => Str =
\verb -> \\t,a,p,agr,q0,asp => \verb -> \\t,a,p,agr,q0,asp =>
let clitic = case verb.vtype of { let clitic = case verb.vtype of {
VNormal => {s=[]; agr=agr} ; VNormal => {s=verb.clitics; agr=agr} ;
VMedial c => {s=reflClitics ! c; agr=agr} ; VMedial c => {s=verb.clitics++reflClitics ! c; agr=agr} ;
VPhrasal c => {s=personalClitics ! c ! agr.gn ! agr.p; agr={gn=GSg Neut; p=P3}} VPhrasal Dat => {s=personalClitics agr ! Dat++verb.clitics; agr={gn=GSg Neut; p=P3}} ;
VPhrasal c => {s=verb.clitics++personalClitics agr ! c; agr={gn=GSg Neut; p=P3}}
} ; } ;
present = verb.s ! asp ! (VPres (numGenNum clitic.agr.gn) clitic.agr.p) ; present = verb.s ! asp ! (VPres (numGenNum clitic.agr.gn) clitic.agr.p) ;
@@ -524,8 +560,8 @@ resource ResBul = ParamX ** open Prelude, Predef in {
Pos => case q of {True => {s1=[]; s2="ëè"++s}; Pos => case q of {True => {s1=[]; s2="ëè"++s};
False => {s1=s; s2=[]}} ; False => {s1=s; s2=[]}} ;
Neg => case verb.vtype of Neg => case verb.vtype of
{VNormal => {s1="íå"; s2=li} ; {VNormal => {s1="íå"++s; s2=li} ;
_ => {s1="íå"++s++li; s2=[]}} _ => {s1="íå"++s++li; s2=[]}}
} ; } ;
vf3 : Str -> {s1 : Str; s2 : Str} = \s -> vf3 : Str -> {s1 : Str; s2 : Str} = \s ->
@@ -557,10 +593,11 @@ resource ResBul = ParamX ** open Prelude, Predef in {
daComplex : Anteriority -> Polarity -> VP -> Aspect => Agr => Str = daComplex : Anteriority -> Polarity -> VP -> Aspect => Agr => Str =
\a,p,vp -> \\asp,agr => \a,p,vp -> \\asp,agr =>
let clitic = case vp.vtype of { let clitic = case vp.vtype of {
VNormal => {s=[]; agr=agr} ; VNormal => {s=vp.clitics; agr=agr} ;
VMedial c => {s=reflClitics ! c; agr=agr} ; VMedial c => {s=vp.clitics++reflClitics ! c; agr=agr} ;
VPhrasal c => {s=personalClitics ! c ! agr.gn ! agr.p; agr={gn=GSg Neut; p=P3}} VPhrasal Dat => {s=personalClitics agr ! Dat++vp.clitics; agr={gn=GSg Neut; p=P3}} ;
} ; VPhrasal c => {s=vp.clitics++personalClitics agr ! c; agr={gn=GSg Neut; p=P3}}
} ;
pol = case p of {Pos => ""; Neg => "íå"} pol = case p of {Pos => ""; Neg => "íå"}
in vp.ad.s ++ "äà" ++ pol ++ clitic.s ++ in vp.ad.s ++ "äà" ++ pol ++ clitic.s ++
case a of { case a of {
@@ -576,21 +613,32 @@ resource ResBul = ParamX ** open Prelude, Predef in {
clitic = case vp.vtype of { clitic = case vp.vtype of {
VNormal => {s=[]; agr=agr} ; VNormal => {s=[]; agr=agr} ;
VMedial c => {s=reflClitics ! c; agr=agr} ; VMedial c => {s=reflClitics ! c; agr=agr} ;
VPhrasal c => {s=personalClitics ! c ! agr.gn ! agr.p; agr={gn=GSg Neut; p=P3}} VPhrasal c => {s=personalClitics agr ! c; agr={gn=GSg Neut; p=P3}}
} ; } ;
in vp.ad.s ++ in vp.ad.s ++
vp.s ! Imperf ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ++ clitic.s ++ vp.s ! Imperf ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ++ clitic.s ++
vp.compl ! agr ; vp.compl ! agr ;
linrefPrep : {s:Str; c:Case} -> Str = linCase : Case -> Polarity -> Str =
\p -> case p.c of {Acc=>""; Dat=>"íà"; WithPrep=>with_Word} ++ p.s ; \c,p -> case c of {
Acc => "" ;
Dat => "íà" ;
WithPrep => case p of {
Pos => with_Word ;
Neg => "áåç"
} ;
CPrep => ""
} ;
linPrep : {s:Str; c:Case} -> Str =
\p -> p.s ++ linCase p.c Pos ;
gerund : VP -> Aspect => Agr => Str = gerund : VP -> Aspect => Agr => Str =
\vp -> \\asp,agr => \vp -> \\asp,agr =>
let clitic = case vp.vtype of { let clitic = case vp.vtype of {
VNormal => {s=[]; agr=agr} ; VNormal => {s=[]; agr=agr} ;
VMedial c => {s=reflClitics ! c; agr=agr} ; VMedial c => {s=reflClitics ! c; agr=agr} ;
VPhrasal c => {s=personalClitics ! c ! agr.gn ! agr.p; agr={gn=GSg Neut; p=P3}} VPhrasal c => {s=personalClitics agr ! c; agr={gn=GSg Neut; p=P3}}
} }
in vp.ad.s ++ clitic.s ++ vp.s ! asp ! VGerund ++ vp.compl ! agr ; in vp.ad.s ++ clitic.s ++ vp.s ! asp ! VGerund ++ vp.compl ! agr ;
@@ -686,6 +734,7 @@ resource ResBul = ParamX ** open Prelude, Predef in {
RObj Acc => table QForm [kogo; kogo+"òî"] ; RObj Acc => table QForm [kogo; kogo+"òî"] ;
RObj Dat => table QForm ["íà" ++ kogo; "íà" ++ kogo+"òî"] ; RObj Dat => table QForm ["íà" ++ kogo; "íà" ++ kogo+"òî"] ;
RObj WithPrep => table QForm [with_Word ++ kogo; with_Word ++ kogo+"òî"] ; RObj WithPrep => table QForm [with_Word ++ kogo; with_Word ++ kogo+"òî"] ;
RObj CPrep => table QForm [kogo; kogo+"òî"] ;
RVoc => table QForm [koi; koi+"òî"] RVoc => table QForm [koi; koi+"òî"]
} ; } ;
gn = gn gn = gn
@@ -696,25 +745,18 @@ resource ResBul = ParamX ** open Prelude, Predef in {
"ñúñ" / strs {"ñ" ; "ç" ; "Ñ" ; "Ç"} "ñúñ" / strs {"ñ" ; "ç" ; "Ñ" ; "Ç"}
} ; } ;
mkPron : (az,men,me,mi,moj,moia,moiat,moia_,moiata,moe,moeto,moi,moite : Str) -> mkPron : (az,moj,moia,moiat,moia_,moiata,moe,moeto,moi,moite : Str) ->
GenNum -> Person -> {s : Role => Str; GenNum -> PronPerson -> {s : Role => Str;
clit : Case => Str; gen : AForm => Str;
gen : AForm => Str; gn : GenNum;
a : Agr p : PronPerson
} = } =
\az,men,me,mi,moj,moia,moiat,moia_,moiata,moe,moeto,moi,moite,gn,p -> { \az,moj,moia,moiat,moia_,moiata,moe,moeto,moi,moite,gn,p -> {
s = table { s = table {
RSubj => az ; RSubj => az ;
RObj Acc => men ; RObj c => personalClitics (personAgr gn p) ! c ;
RObj Dat => "íà" ++ men ; RVoc => az
RObj WithPrep => with_Word ++ men ;
RVoc => az
} ; } ;
clit = table {
Acc => me;
Dat => mi;
WithPrep => with_Word ++ men
} ;
gen = table { gen = table {
ASg Masc Indef => moj ; ASg Masc Indef => moj ;
ASg Masc Def => moia ; ASg Masc Def => moia ;
@@ -726,26 +768,19 @@ resource ResBul = ParamX ** open Prelude, Predef in {
APl Indef => moi ; APl Indef => moi ;
APl Def => moite APl Def => moite
} ; } ;
a = { gn = gn ;
gn = gn ; p = p
p = p
}
} ; } ;
mkNP : Str -> GenNum -> Person -> Polarity -> {s : Role => Str; a : Agr; p : Polarity} = mkNP : Str -> GenNum -> PronPerson -> {s : Role => Str; gn : GenNum; p : PronPerson} =
\s,gn,p,pol -> { \s,gn,p -> {
s = table { s = table {
RSubj => s ; RSubj => s ;
RObj Acc => s ; RObj c => linCase c (personPol p) ++ s ;
RObj Dat => "íà" ++ s ; RVoc => s
RObj WithPrep => with_Word ++ s ;
RVoc => s
} ; } ;
a = { gn = gn ;
gn = gn ; p = p
p = p
} ;
p = pol
} ; } ;
Preposition : Type = {s : Str; c : Case}; Preposition : Type = {s : Str; c : Case};

View File

@@ -9,9 +9,9 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
PredVP np vp = mkClause (np.s ! (case vp.vtype of { PredVP np vp = mkClause (np.s ! (case vp.vtype of {
VNormal => RSubj ; VNormal => RSubj ;
VMedial _ => RSubj ; VMedial _ => RSubj ;
VPhrasal c => RObj c})) np.a np.p vp ; VPhrasal c => RObj c})) np.gn np.p vp ;
PredSCVP sc vp = let agr = {gn=GSg Masc; p=P3} in mkClause (sc.s ! agr) agr Pos vp ; PredSCVP sc vp = mkClause (sc.s ! {gn=GSg Masc; p=P3}) (GSg Masc) (NounP3 Pos) vp ;
ImpVP vp = { ImpVP vp = {
s = \\p,gn => s = \\p,gn =>
@@ -20,21 +20,23 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
= \asp -> vp.s ! asp ! VImperative (numGenNum gn) ; = \asp -> vp.s ! asp ! VImperative (numGenNum gn) ;
compl = vp.compl ! agr ; compl = vp.compl ! agr ;
clitic = case vp.vtype of { clitic = case vp.vtype of {
VNormal => [] ; VNormal => vp.clitics;
VMedial c => reflClitics ! c ; VMedial c => vp.clitics++reflClitics ! c;
VPhrasal c => personalClitics ! c ! agr.gn ! agr.p VPhrasal Dat => personalClitics agr ! Dat++vp.clitics;
} ; VPhrasal c => vp.clitics++personalClitics agr ! c
}
in case p of {Pos => vp.ad.s ++ verb Perf ++ clitic ; in case p of {Pos => vp.ad.s ++ verb Perf ++ clitic ;
Neg => "íå" ++ vp.ad.s ++ clitic ++ verb Imperf} ++ compl ; Neg => "íå" ++ vp.ad.s ++ clitic ++ verb Imperf} ++ compl ;
} ; } ;
SlashVP np slash = { SlashVP np slash = {
s = \\agr => (mkClause (np.s ! RSubj) np.a np.p {s = slash.s ; s = \\agr => (mkClause (np.s ! RSubj) np.gn np.p {s = slash.s ;
ad = slash.ad ; ad = slash.ad ;
compl = \\_ => slash.compl1 ! np.a ++ slash.compl2 ! agr ; clitics= slash.clitics ;
vtype = slash.vtype ; compl = \\_ => slash.compl1 ! personAgr np.gn np.p ++ slash.compl2 ! agr ;
p = Pos ; vtype = slash.vtype ;
isSimple = slash.isSimple}).s ; p = Pos ;
isSimple = slash.isSimple}).s ;
c2 = slash.c2 c2 = slash.c2
} ; } ;
@@ -46,7 +48,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
SlashPrep cl prep = {s = \\_ => cl.s; c2 = prep} ; SlashPrep cl prep = {s = \\_ => cl.s; c2 = prep} ;
SlashVS np vs slash = { SlashVS np vs slash = {
s = \\agr => (mkClause (np.s ! RSubj) np.a np.p s = \\agr => (mkClause (np.s ! RSubj) np.gn np.p
(insertObj (\\_ => "֌" ++ slash.s ! agr) Pos (predV vs))).s ; (insertObj (\\_ => "֌" ++ slash.s ! agr) Pos (predV vs))).s ;
c2 = slash.c2 c2 = slash.c2
} ; } ;

View File

@@ -7,8 +7,8 @@ concrete StructuralBul of Structural = CatBul **
flags optimize=all ; flags optimize=all ;
lin lin
above_Prep = mkPrep "íàä" Acc ; above_Prep = mkPrep "íàä" ;
after_Prep = mkPrep "ñëåä" Acc ; after_Prep = mkPrep "ñëåä" ;
all_Predet = {s = table GenNum ["âñè÷êèÿ";"âñè÷êàòà";"âñè÷êîòî";"âñè÷êèòå"]} ; all_Predet = {s = table GenNum ["âñè÷êèÿ";"âñè÷êàòà";"âñè÷êîòî";"âñè÷êèòå"]} ;
almost_AdA, almost_AdN = ss "ïî÷òè" ; almost_AdA, almost_AdN = ss "ïî÷òè" ;
at_least_AdN, at_most_AdN = ss "ïî÷òè" ; ---- AR at_least_AdN, at_most_AdN = ss "ïî÷òè" ; ---- AR
@@ -16,25 +16,25 @@ concrete StructuralBul of Structural = CatBul **
always_AdV = mkAdV "âèíàãè" ; always_AdV = mkAdV "âèíàãè" ;
and_Conj = {s=[]; conj=0; distr=False; n = Pl} ; and_Conj = {s=[]; conj=0; distr=False; n = Pl} ;
because_Subj = ss "çàùîòî" ; because_Subj = ss "çàùîòî" ;
before_Prep = mkPrep "ïðåäè" Acc ; before_Prep = mkPrep "ïðåäè" ;
behind_Prep = mkPrep "çàä" Acc ; behind_Prep = mkPrep "çàä" ;
between_Prep = mkPrep "ìåæäó" Acc ; between_Prep = mkPrep "ìåæäó" ;
both7and_DConj = {s=[]; conj=0; distr=True; n = Pl} ; both7and_DConj = {s=[]; conj=0; distr=True; n = Pl} ;
but_PConj = ss "íî" ; but_PConj = ss "íî" ;
by8agent_Prep = mkPrep "÷ðåç" Acc ; by8agent_Prep = mkPrep "÷ðåç" ;
by8means_Prep = mkPrep "÷ðåç" Acc ; by8means_Prep = mkPrep "÷ðåç" ;
can8know_VV, can_VV = mkVV (stateV (mkV166 "ìîãà")) ; can8know_VV, can_VV = mkVV (stateV (mkV166 "ìîãà")) ;
during_Prep = mkPrep ["ïî âðåìå íà"] Acc ; during_Prep = mkPrep ["ïî âðåìå íà"] ;
either7or_DConj = {s=[]; conj=1; distr=True; n = Sg} ; either7or_DConj = {s=[]; conj=1; distr=True; n = Sg} ;
everybody_NP = mkNP "âñåêè" (GSg Masc) P3 Pos; everybody_NP = mkNP "âñåêè" (GSg Masc) (NounP3 Pos);
every_Det = mkDeterminerSg "âñåêè" "âñÿêà" "âñÿêî"; every_Det = mkDeterminerSg "âñåêè" "âñÿêà" "âñÿêî";
everything_NP = mkNP "âñè÷êî" (GSg Neut) P3 Pos; everything_NP = mkNP "âñè÷êî" (GSg Neut) (NounP3 Pos);
everywhere_Adv = ss "íàâñÿêúäå" ; everywhere_Adv = ss "íàâñÿêúäå" ;
few_Det = {s = \\_,_,_ => "íÿêîëêî"; nn = NCountable; spec = Indef; p = Pos} ; few_Det = {s = \\_,_,_ => "íÿêîëêî"; nn = NCountable; spec = Indef; p = Pos} ;
--- first_Ord = ss "first" ; DEPRECATED --- first_Ord = ss "first" ; DEPRECATED
for_Prep = mkPrep "çà" Acc ; for_Prep = mkPrep "çà" ;
from_Prep = mkPrep "îò" Acc ; from_Prep = mkPrep "îò" ;
he_Pron = mkPron "òîé" "íåãî" "ãî" "ìó" "íåãîâ" "íåãîâèÿ" "íåãîâèÿò" "íåãîâà" "íåãîâàòà" "íåãîâî" "íåãîâîòî" "íåãîâè" "íåãîâèòå" (GSg Masc) P3 ; he_Pron = mkPron "òîé" "íåãîâ" "íåãîâèÿ" "íåãîâèÿò" "íåãîâà" "íåãîâàòà" "íåãîâî" "íåãîâîòî" "íåãîâè" "íåãîâèòå" (GSg Masc) PronP3 ;
here_Adv = ss "òóê" ; here_Adv = ss "òóê" ;
here7to_Adv = ss ["äî òóê"] ; here7to_Adv = ss ["äî òóê"] ;
here7from_Adv = ss ["îò òóê"] ; here7from_Adv = ss ["îò òóê"] ;
@@ -42,12 +42,12 @@ concrete StructuralBul of Structural = CatBul **
how8much_IAdv = mkIAdv "êîëêî" ; how8much_IAdv = mkIAdv "êîëêî" ;
how8many_IDet = {s = \\_ => table QForm ["êîëêî";"êîëêîòî"]; n = Pl; nonEmpty = False} ; how8many_IDet = {s = \\_ => table QForm ["êîëêî";"êîëêîòî"]; n = Pl; nonEmpty = False} ;
if_Subj = ss "àêî" ; if_Subj = ss "àêî" ;
in8front_Prep = mkPrep "ïðåä" Acc ; in8front_Prep = mkPrep "ïðåä" ;
i_Pron = mkPron "àç" "ìåí" "ìå" "ìè" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Masc) P1 ; i_Pron = mkPron "àç" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Masc) PronP1 ;
in_Prep = mkPrep (pre { "â" ; in_Prep = mkPrep (pre { "â" ;
"âúâ" / strs {"â" ; "ô" ; "Â" ; "Ô"} "âúâ" / strs {"â" ; "ô" ; "Â" ; "Ô"}
}) Acc ; }) ;
it_Pron = mkPron "òî" "íåãî" "ãî" "ìó" "íåãîâ" "íåãîâèÿ" "íåãîâèÿò" "íåãîâà" "íåãîâàòà" "íåãîâî" "íåãîâîòî" "íåãîâè" "íåãîâèòå" (GSg Neut) P3 ; it_Pron = mkPron "òî" "íåãîâ" "íåãîâèÿ" "íåãîâèÿò" "íåãîâà" "íåãîâàòà" "íåãîâî" "íåãîâîòî" "íåãîâè" "íåãîâèòå" (GSg Neut) PronP3 ;
less_CAdv = {s="íå"; sn="ïî-ìàëêî"} ; less_CAdv = {s="íå"; sn="ïî-ìàëêî"} ;
many_Det = mkDeterminerPl "ìíîãî" ; many_Det = mkDeterminerPl "ìíîãî" ;
more_CAdv = {s=[]; sn="ïîâå÷å"} ; more_CAdv = {s=[]; sn="ïîâå÷å"} ;
@@ -72,21 +72,21 @@ concrete StructuralBul of Structural = CatBul **
lock_V=<> lock_V=<>
} ; } ;
no_Utt = ss "íå" ; no_Utt = ss "íå" ;
on_Prep = mkPrep "íà" Acc ; on_Prep = mkPrep "íà" ;
---- one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED ---- one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED
only_Predet = {s = \\_ => "ñàìî"} ; only_Predet = {s = \\_ => "ñàìî"} ;
or_Conj = {s=[]; conj=1; distr=False; n = Sg} ; or_Conj = {s=[]; conj=1; distr=False; n = Sg} ;
otherwise_PConj = ss "èíà÷å" ; otherwise_PConj = ss "èíà÷å" ;
part_Prep = mkPrep "îò" Acc ; part_Prep = mkPrep "îò" ;
please_Voc = ss "ìîëÿ" ; please_Voc = ss "ìîëÿ" ;
possess_Prep = mkPrep [] Dat ; possess_Prep = mkPrep [] Dat ;
quite_Adv = ss "äîñòà" ; quite_Adv = ss "äîñòà" ;
she_Pron = mkPron "òÿ" "íåÿ" "ÿ" "è" "íåèí" "íåéíèÿ" "íåéíèÿò" "íåéíà" "íåéíàòà" "íåéíî" "íåéíîòî" "íåéíè" "íåéíèòå" (GSg Fem) P3 ; she_Pron = mkPron "òÿ" "íåèí" "íåéíèÿ" "íåéíèÿò" "íåéíà" "íåéíàòà" "íåéíî" "íåéíîòî" "íåéíè" "íåéíèòå" (GSg Fem) PronP3 ;
so_AdA = ss "òîëêîâà" ; so_AdA = ss "òîëêîâà" ;
somebody_NP = mkNP "íÿêîé" (GSg Masc) P3 Pos; somebody_NP = mkNP "íÿêîé" (GSg Masc) (NounP3 Pos);
someSg_Det = mkDeterminerSg "íÿêîé" "íÿêîÿ" "íÿêîå" ; someSg_Det = mkDeterminerSg "íÿêîé" "íÿêîÿ" "íÿêîå" ;
somePl_Det = mkDeterminerPl "íÿêîè" ; somePl_Det = mkDeterminerPl "íÿêîè" ;
something_NP = mkNP "íåùî" (GSg Neut) P3 Pos; something_NP = mkNP "íåùî" (GSg Neut) (NounP3 Pos);
somewhere_Adv = ss "íÿêúäå" ; somewhere_Adv = ss "íÿêúäå" ;
that_Quant = mkQuant "îíçè" "îíàçè" "îíîâà" "îíåçè" ; that_Quant = mkQuant "îíçè" "îíàçè" "îíîâà" "îíåçè" ;
that_Subj = ss "֌" ; that_Subj = ss "֌" ;
@@ -94,15 +94,15 @@ concrete StructuralBul of Structural = CatBul **
there7to_Adv = ss ["äî òàì"] ; there7to_Adv = ss ["äî òàì"] ;
there7from_Adv = ss ["îò òàì"] ; there7from_Adv = ss ["îò òàì"] ;
therefore_PConj = ss ["òàêà ÷å"] ; therefore_PConj = ss ["òàêà ÷å"] ;
they_Pron = mkPron "òå" "òÿõ" "ãè" "èì" "òåõåí" "òåõíèÿ" "òåõíèÿò" "òÿõíà" "òÿõíàòà" "òÿõíî" "òÿõíîòî" "òåõíè" "òåõíèòå" GPl P3 ; they_Pron = mkPron "òå" "òåõåí" "òåõíèÿ" "òåõíèÿò" "òÿõíà" "òÿõíàòà" "òÿõíî" "òÿõíîòî" "òåõíè" "òåõíèòå" GPl PronP3 ;
this_Quant = mkQuant "òîçè" "òàçè" "òîâà" "òåçè" ; this_Quant = mkQuant "òîçè" "òàçè" "òîâà" "òåçè" ;
through_Prep = mkPrep "ïðåç" Acc ; through_Prep = mkPrep "ïðåç" ;
too_AdA = ss "ïðåêàëåíî" ; too_AdA = ss "ïðåêàëåíî" ;
to_Prep = mkPrep "äî" Acc ; to_Prep = mkPrep "äî" ;
under_Prep = mkPrep "ïîä" Acc ; under_Prep = mkPrep "ïîä" ;
very_AdA = ss "ìíîãî" ; very_AdA = ss "ìíîãî" ;
want_VV = mkVV (stateV (mkV186 "èñêàì")) ; want_VV = mkVV (stateV (mkV186 "èñêàì")) ;
we_Pron = mkPron "íèå" "íàñ" "íè" "íè" "íàø" "íàøèÿ" "íàøèÿò" "íàøà" "íàøàòà" "íàøå" "íàøåòî" "íàøè" "íàøèòå" GPl P1 ; we_Pron = mkPron "íèå" "íàø" "íàøèÿ" "íàøèÿò" "íàøà" "íàøàòà" "íàøå" "íàøåòî" "íàøè" "íàøèòå" GPl PronP1 ;
whatPl_IP = mkIP "êàêâè" "êàêâè" GPl ; whatPl_IP = mkIP "êàêâè" "êàêâè" GPl ;
whatSg_IP = mkIP "êàêúâ" "êàêúâ" (GSg Masc) ; whatSg_IP = mkIP "êàêúâ" "êàêúâ" (GSg Masc) ;
when_IAdv = mkIAdv "êîãà" ; when_IAdv = mkIAdv "êîãà" ;
@@ -115,12 +115,12 @@ concrete StructuralBul of Structural = CatBul **
whoSg_IP = mkIP "êîé" "êîãî" (GSg Masc) ; whoSg_IP = mkIP "êîé" "êîãî" (GSg Masc) ;
whoPl_IP = mkIP "êîè" "êîè" GPl ; whoPl_IP = mkIP "êîè" "êîè" GPl ;
why_IAdv = mkIAdv "çàùî" ; why_IAdv = mkIAdv "çàùî" ;
without_Prep = mkPrep "áåç" Acc ; without_Prep = mkPrep "áåç" ;
with_Prep = mkPrep "" WithPrep ; with_Prep = mkPrep "" WithPrep ;
yes_Utt = ss "äà" ; yes_Utt = ss "äà" ;
youSg_Pron = mkPron "òè" "òåá" "òå" "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Masc) P2 ; youSg_Pron = mkPron "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Masc) PronP2 ;
youPl_Pron = mkPron "âèå" "âàñ" "âè" "âè" "âàø" "âàøèÿ" "âàøèÿò" "âàøà" "âàøàòà" "âàøå" "âàøåòî" "âàøè" "âàøèòå" GPl P2 ; youPl_Pron = mkPron "âèå" "âàø" "âàøèÿ" "âàøèÿò" "âàøà" "âàøàòà" "âàøå" "âàøåòî" "âàøè" "âàøèòå" GPl PronP2 ;
youPol_Pron = mkPron "âèå" "âàñ" "âè" "âè" "âàø" "âàøèÿ" "âàøèÿò" "âàøà" "âàøàòà" "âàøå" "âàøåòî" "âàøè" "âàøèòå" GPl P2 ; youPol_Pron = mkPron "âèå" "âàø" "âàøèÿ" "âàøèÿò" "âàøà" "âàøàòà" "âàøå" "âàøåòî" "âàøè" "âàøèòå" GPl PronP2 ;
have_V2 = dirV2 (stateV (mkV186 "èìàì")) ; have_V2 = dirV2 (stateV (mkV186 "èìàì")) ;

View File

@@ -12,19 +12,19 @@ lin
FloatPN i = {s = i.s ; g = Neut} ; FloatPN i = {s = i.s ; g = Neut} ;
NumPN i = {s = i.s ! CFNeut Indef ; g = Neut} ; NumPN i = {s = i.s ! CFNeut Indef ; g = Neut} ;
CNIntNP cn i = { CNIntNP cn i = {
s = \\c => cn.s ! NF Sg Indef ++ i.s ; s = \\c => cn.s ! NF Sg Indef ++ i.s ;
a = agrP3 (gennum cn.g Sg) ; gn = gennum cn.g Sg ;
p = Pos p = NounP3 Pos
} ; } ;
CNSymbNP det cn xs = { CNSymbNP det cn xs = {
s = \\c => det.s ! False ! cn.g ! RSubj ++ cn.s ! NF (numnnum det.nn) Indef ++ xs.s ; s = \\c => det.s ! False ! cn.g ! RSubj ++ cn.s ! NF (numnnum det.nn) Indef ++ xs.s ;
a = agrP3 (gennum cn.g (numnnum det.nn)) ; gn = gennum cn.g (numnnum det.nn) ;
p = Pos p = NounP3 Pos
} ; } ;
CNNumNP cn i = { CNNumNP cn i = {
s = \\c => (cn.s ! NF Sg Indef ++ i.s ! CFNeut Indef) ; s = \\c => (cn.s ! NF Sg Indef ++ i.s ! CFNeut Indef) ;
a = agrP3 (gennum cn.g Sg) ; gn = gennum cn.g Sg ;
p = Pos p = NounP3 Pos
} ; } ;
SymbS sy = sy ; SymbS sy = sy ;

View File

@@ -10,11 +10,27 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
SlashV2a v = slashV v v.c2 False ; SlashV2a v = slashV v v.c2 False ;
Slash2V3 v np = Slash2V3 v np =
insertSlashObj1 (\\_ => v.c2.s ++ np.s ! RObj v.c2.c) np.p (slashV v v.c3 False) ; let arg : {obj,clitics : Str}
= case <v.c2.c,np.p> of {
<c, NounP3 _> => {obj=np.s ! RObj c; clitics=[]; } ;
<Acc,_ > => {obj=[]; clitics=np.s ! RObj Acc} ;
<Dat,_ > => {obj=[]; clitics=np.s ! RObj Dat} ;
<c, _ > => {obj=np.s ! RObj c; clitics=[]; }
}
in insertSlashObj1 (\\_ => v.c2.s ++ arg.obj) (personPol np.p) (slashV v v.c3 False)
** {clitics = arg.clitics};
Slash3V3 v np = Slash3V3 v np =
insertSlashObj2 (\\_ => v.c3.s ++ np.s ! RObj v.c3.c) np.p (slashV v v.c2 False) ; let arg : {obj,clitics : Str}
= case <v.c3.c,np.p> of {
<c, NounP3 _> => {obj=np.s ! RObj c; clitics=[]; } ;
<Acc,_ > => {obj=[]; clitics=np.s ! RObj Acc} ;
<Dat,_ > => {obj=[]; clitics=np.s ! RObj Dat} ;
<c, _ > => {obj=np.s ! RObj c; clitics=[]; }
}
in insertSlashObj2 (\\_ => v.c3.s ++ arg.obj) (personPol np.p) (slashV v v.c2 False)
** {clitics = arg.clitics};
ComplVV vv vp = ComplVV vv vp =
insertObj (case vv.typ of { insertObj (case vv.typ of {
@@ -47,7 +63,8 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
SlashVV vv slash = { SlashVV vv slash = {
s = vv.s ; s = vv.s ;
ad = {isEmpty=True; s=[]}; ad = {isEmpty=True; s=[]};
compl1 = daComplex Simul Pos {s=slash.s; ad=slash.ad; compl=slash.compl1; vtype=slash.vtype; p = Pos; isSimple = slash.isSimple} ! Perf ; clitics = [] ;
compl1 = daComplex Simul Pos {s=slash.s; ad=slash.ad; clitics=slash.clitics; compl=slash.compl1; vtype=slash.vtype; p = Pos; isSimple = slash.isSimple} ! Perf ;
compl2 = slash.compl2 ; compl2 = slash.compl2 ;
vtype = vv.vtype ; vtype = vv.vtype ;
p = slash.p ; p = slash.p ;
@@ -60,8 +77,9 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
SlashV2VNP vv np slash = { SlashV2VNP vv np slash = {
s = vv.s ; s = vv.s ;
ad = {isEmpty=True; s=[]}; ad = {isEmpty=True; s=[]};
clitics = [] ;
compl1 = \\agr => vv.c2.s ++ np.s ! RObj vv.c2.c ++ compl1 = \\agr => vv.c2.s ++ np.s ! RObj vv.c2.c ++
daComplex Simul np.p {s=slash.s; ad=slash.ad; compl=slash.compl1; vtype=slash.vtype; p=Pos; isSimple = slash.isSimple} ! Perf ! np.a ; daComplex Simul (personPol np.p) {s=slash.s; ad=slash.ad; clitics=slash.clitics; compl=slash.compl1; vtype=slash.vtype; p=Pos; isSimple = slash.isSimple} ! Perf ! (personAgr np.gn np.p) ;
compl2 = slash.compl2 ; compl2 = slash.compl2 ;
vtype = vv.vtype ; vtype = vv.vtype ;
p = Pos ; p = Pos ;
@@ -70,15 +88,23 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
subjCtrl = slash.subjCtrl subjCtrl = slash.subjCtrl
} ; } ;
ComplSlash slash np = { ComplSlash slash np =
s = slash.s ; let arg : {obj,acc,dat : Str}
ad = slash.ad ; = case <slash.c2.c,np.p> of {
compl = \\a => let a2 = case slash.subjCtrl of {True => a; False => np.a} <c, NounP3 _> => {obj=np.s ! RObj c; acc=[]; dat=[] } ;
in slash.compl1 ! a ++ slash.c2.s ++ np.s ! RObj slash.c2.c ++ slash.compl2 ! a2 ; <Acc,_ > => {obj=[]; acc=np.s ! RObj Acc; dat=[] } ;
vtype = slash.vtype ; <Dat,_ > => {obj=[]; acc=[]; dat=np.s ! RObj Dat} ;
p = orPol np.p slash.p ; <c, _ > => {obj=np.s ! RObj c; acc=[]; dat=[] }
isSimple = False }
} ; in {s = slash.s ;
ad = slash.ad ;
clitics = arg.dat++slash.clitics++arg.acc ;
compl = \\a => let a2 = case slash.subjCtrl of {True => a; False => personAgr np.gn np.p}
in slash.compl1 ! a ++ slash.c2.s ++ arg.obj ++ slash.compl2 ! a2 ;
vtype = slash.vtype ;
p = orPol (personPol np.p) slash.p ;
isSimple = False
} ;
UseComp comp = insertObj comp.s comp.p (predV verbBe) ; UseComp comp = insertObj comp.s comp.p (predV verbBe) ;
@@ -92,6 +118,7 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
AdVVP adv vp = { AdVVP adv vp = {
s = vp.s ; s = vp.s ;
ad = {isEmpty=False; s=vp.ad.s ++ adv.s} ; ad = {isEmpty=False; s=vp.ad.s ++ adv.s} ;
clitics = vp.clitics ;
compl = vp.compl ; compl = vp.compl ;
vtype = vp.vtype ; vtype = vp.vtype ;
p = orPol adv.p vp.p ; p = orPol adv.p vp.p ;
@@ -100,6 +127,7 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
AdVVPSlash adv vp = { AdVVPSlash adv vp = {
s = vp.s ; s = vp.s ;
ad = {isEmpty=False; s=vp.ad.s ++ adv.s} ; ad = {isEmpty=False; s=vp.ad.s ++ adv.s} ;
clitics = vp.clitics ;
compl1 = vp.compl1 ; compl1 = vp.compl1 ;
compl2 = vp.compl2 ; compl2 = vp.compl2 ;
vtype = vp.vtype ; vtype = vp.vtype ;
@@ -112,6 +140,7 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
ReflVP slash = { ReflVP slash = {
s = slash.s ; s = slash.s ;
ad = slash.ad ; ad = slash.ad ;
clitics = slash.clitics ;
compl = \\agr => slash.compl1 ! agr ++ slash.compl2 ! agr ; compl = \\agr => slash.compl1 ! agr ++ slash.compl2 ! agr ;
vtype = VMedial slash.c2.c ; vtype = VMedial slash.c2.c ;
p = slash.p ; p = slash.p ;
@@ -121,7 +150,7 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
PassV2 v = insertObj (\\a => v.s ! Perf ! VPassive (aform a.gn Indef (RObj Acc))) Pos (predV verbBe) ; PassV2 v = insertObj (\\a => v.s ! Perf ! VPassive (aform a.gn Indef (RObj Acc))) Pos (predV verbBe) ;
CompAP ap = {s = \\agr => ap.s ! aform agr.gn Indef (RObj Acc) ! agr.p; p = Pos} ; CompAP ap = {s = \\agr => ap.s ! aform agr.gn Indef (RObj Acc) ! agr.p; p = Pos} ;
CompNP np = {s = \\_ => np.s ! RObj Acc; p = np.p} ; CompNP np = {s = \\_ => np.s ! RObj Acc; p = personPol np.p} ;
CompAdv a = {s = \\_ => a.s; p = Pos} ; CompAdv a = {s = \\_ => a.s; p = Pos} ;
CompCN cn = {s = \\agr => cn.s ! (NF (numGenNum agr.gn) Indef); p = Pos} ; CompCN cn = {s = \\agr => cn.s ! (NF (numGenNum agr.gn) Indef); p = Pos} ;