forked from GitHub/gf-core
double negation in Bulgarian
This commit is contained in:
@@ -36,7 +36,7 @@ concrete CatBul of Cat = CommonX - [IAdv,CAdv] ** open ResBul, Prelude, Predef,
|
||||
VP = ResBul.VP ;
|
||||
VPSlash = ResBul.VPSlash ;
|
||||
|
||||
Comp = {s : Agr => Str} ;
|
||||
Comp = {s : Agr => Str; p : Polarity} ;
|
||||
|
||||
-- Adjective
|
||||
|
||||
@@ -50,14 +50,14 @@ concrete CatBul of Cat = CommonX - [IAdv,CAdv] ** open ResBul, Prelude, Predef,
|
||||
-- Noun
|
||||
|
||||
CN = {s : NForm => Str; g : AGender} ;
|
||||
NP = {s : Role => Str; a : Agr} ;
|
||||
NP = {s : Role => Str; a : Agr; p : Polarity} ;
|
||||
Pron = {s : Role => Str; gen : AForm => Str; a : Agr} ;
|
||||
Det = {s : Bool => AGender => Role => Str; nn : NNumber; spec : Species} ;
|
||||
Det = {s : Bool => AGender => Role => Str; nn : NNumber; spec : Species; p : Polarity} ;
|
||||
Predet = {s : GenNum => Str} ;
|
||||
Ord = {s : AForm => Str} ;
|
||||
Num = {s : CardForm => Str; nn : NNumber; nonEmpty : Bool} ;
|
||||
Card = {s : CardForm => Str; n : Number} ;
|
||||
Quant = {s : Bool => AForm => Str; nonEmpty : Bool; spec : Species} ;
|
||||
Quant = {s : Bool => AForm => Str; nonEmpty : Bool; spec : Species; p : Polarity} ;
|
||||
|
||||
-- Numeral
|
||||
|
||||
@@ -115,7 +115,8 @@ concrete CatBul of Cat = CommonX - [IAdv,CAdv] ** open ResBul, Prelude, Predef,
|
||||
= {s = vps.s ;
|
||||
ad = vps.ad ;
|
||||
compl = \\a => vps.compl1 ! a ++ vps.c2.s ++ vps.compl2 ! a ;
|
||||
vtype = vps.vtype
|
||||
vtype = vps.vtype ;
|
||||
p = Pos
|
||||
}
|
||||
in linrefVP vp;
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ concrete ConjunctionBul of Conjunction =
|
||||
|
||||
ConjNP conj ss = {
|
||||
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}
|
||||
a = {gn = conjGenNum (gennum (AMasc NonHuman) conj.n) ss.a.gn; p = ss.a.p};
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
ConjAP conj ss = {
|
||||
|
||||
@@ -2817,12 +2817,12 @@ lin anxiousness_N = variants {};
|
||||
lin anyPl_Det = mkDeterminerPl "кои да са";
|
||||
lin anySg_Det = mkDeterminerSg "кой да е" "коя да е" "кое да е";
|
||||
lin any_Adv = variants {};
|
||||
lin anybody_NP = mkNP "някой" (GSg Masc) P3;
|
||||
lin anybody_NP = mkNP "някой" (GSg Masc) P3 Pos;
|
||||
lin anyhow_Adv = variants {};
|
||||
lin anymore_Adv = variants {};
|
||||
lin anyone_NP = mkNP "някой" (GSg Masc) P3;
|
||||
lin anyone_NP = mkNP "някой" (GSg Masc) P3 Pos;
|
||||
lin anyplace_Adv = variants {};
|
||||
lin anything_NP = mkNP "нещо" (GSg Masc) P3;
|
||||
lin anything_NP = mkNP "нещо" (GSg Masc) P3 Pos;
|
||||
lin anyway_Adv = variants {};
|
||||
lin anywhere_Adv = variants {};
|
||||
lin aorist_N = variants {};
|
||||
@@ -19146,12 +19146,12 @@ lin everlastingness_N = variants {};
|
||||
lin evermore_Adv = {s="дори повече"};
|
||||
lin eversion_N = variants {};
|
||||
lin every_Det = mkDeterminerSg "всеки" "всяка" "всяко";
|
||||
lin everybody_NP = mkNP "всеки" (GSg Masc) P3;
|
||||
lin everybody_NP = mkNP "всеки" (GSg Masc) P3 Pos;
|
||||
lin everyday_A = mkA079 "ежедневен";
|
||||
lin everyman_N = variants {};
|
||||
lin everyone_NP = mkNP "всеки" (GSg Masc) P3;
|
||||
lin everyone_NP = mkNP "всеки" (GSg Masc) P3 Pos;
|
||||
lin everyplace_Adv = variants {};
|
||||
lin everything_NP = mkNP "всичко" (GSg Neut) P3;
|
||||
lin everything_NP = mkNP "всичко" (GSg Neut) P3 Pos;
|
||||
lin everywhere_Adv = ss "навсякъде";
|
||||
lin evesham_PN = variants {};
|
||||
lin evict_V2 = variants {};
|
||||
@@ -36339,7 +36339,18 @@ lin nitwitted_A = variants {};
|
||||
lin nix_N = variants {};
|
||||
lin nix_V2 = variants {};
|
||||
lin no_Interj = ss "не";
|
||||
lin no_Quant = {s = \\_,_=>""; post = ""; nonEmpty = False; spec = Indef; pol = Neg};
|
||||
lin no_Quant = {s = \\_=> table {
|
||||
ASg Masc _ => "никой";
|
||||
ASgMascDefNom => "никой";
|
||||
ASg Fem _ => "никоя";
|
||||
ASg Neut _ => "никое";
|
||||
APl _ => "никои"
|
||||
} ;
|
||||
post = "";
|
||||
nonEmpty = True;
|
||||
spec = Indef;
|
||||
p = Neg
|
||||
};
|
||||
lin no_ball_N = variants {};
|
||||
lin no_fewer_than_AdN = ss "не по-малко от";
|
||||
lin no_go_A = variants {};
|
||||
@@ -36358,7 +36369,7 @@ lin noble_mindedness_N = variants {};
|
||||
lin nobleman_N = variants {};
|
||||
lin noblesse_N = variants {};
|
||||
lin noblesse_oblige_N = variants {};
|
||||
lin nobody_NP = mkNP "никой" (GSg Masc) P3;
|
||||
lin nobody_NP = mkNP "никой" (GSg Masc) P3 Neg;
|
||||
lin nocent_A = variants {};
|
||||
lin nociceptive_A = variants {};
|
||||
lin noctambulist_N = variants {};
|
||||
@@ -36825,7 +36836,7 @@ lin notepaper_N = variants {};
|
||||
lin noteworthy_A = variants {};
|
||||
lin nothing_Adv = variants {};
|
||||
lin nothing_N = variants {};
|
||||
lin nothing_NP = mkNP "нищо" (GSg Neut) P3;
|
||||
lin nothing_NP = mkNP "нищо" (GSg Neut) P3 Neg;
|
||||
lin nothingness_N = variants {};
|
||||
lin nothings_N = variants {};
|
||||
lin nothosaur_N = variants {};
|
||||
@@ -50995,18 +51006,18 @@ lin sombreness_N = variants {};
|
||||
lin sombrero_N = variants {};
|
||||
lin some_A = variants {};
|
||||
lin some_Quant = mkQuant "някой" "някоя" "някое" "някои";
|
||||
lin somebody_NP = mkNP "някой" (GSg Masc) P3;
|
||||
lin somebody_NP = mkNP "някой" (GSg Masc) P3 Pos;
|
||||
lin someday_Adv = mkAdv "някой ден";
|
||||
lin somehow_AdV = mkAdV "някак си";
|
||||
lin somehow_Adv = mkAdv "някак си";
|
||||
lin someone_NP = mkNP "някой" (GSg Masc) P3;
|
||||
lin someone_NP = mkNP "някой" (GSg Masc) P3 Pos;
|
||||
lin someplace_Adv = mkAdv "някъде";
|
||||
lin somercotes_PN = variants {};
|
||||
lin somersault_N = variants {};
|
||||
lin somersault_V = variants {};
|
||||
lin somerset_PN = variants {};
|
||||
lin somesthesia_N = variants {};
|
||||
lin something_NP = mkNP "нещо" (GSg Neut) P3;
|
||||
lin something_NP = mkNP "нещо" (GSg Neut) P3 Pos;
|
||||
lin sometime_Adv = mkAdv "някога";
|
||||
lin sometimes_Adv = mkAdv "понякога";
|
||||
lin someway_Adv = mkAdv "някак си";
|
||||
|
||||
@@ -8,19 +8,22 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
|
||||
PossIndefPron p = {
|
||||
s = \\_,aform => p.gen ! (indefAForm aform) ;
|
||||
nonEmpty = True;
|
||||
spec = Indef
|
||||
spec = Indef;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
ReflQuant = {
|
||||
s = \\_,aform => reflPron ! aform ;
|
||||
nonEmpty = True;
|
||||
spec = Indef
|
||||
spec = Indef;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
ReflIndefQuant = {
|
||||
s = \\_,aform => reflPron ! (indefAForm aform) ;
|
||||
nonEmpty = True;
|
||||
spec = Indef
|
||||
spec = Indef;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
EmptyRelSlash slash = {
|
||||
@@ -80,7 +83,7 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
|
||||
s = \\a => conj.s++(linCoordSep [])!conj.distr!conj.conj++vpi.s!conj.distr!conj.conj!a;
|
||||
} ;
|
||||
ComplVPIVV vv vpi =
|
||||
insertObj (\\a => vpi.s ! a) (predV vv) ;
|
||||
insertObj (\\a => vpi.s ! a) Pos (predV vv) ;
|
||||
|
||||
lincat
|
||||
VPS = {s : Agr => Str} ;
|
||||
@@ -104,6 +107,6 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
|
||||
} ;
|
||||
|
||||
PassVPSlash vp = insertObj (\\a => vp.s ! Perf ! VPassive (aform a.gn Indef (RObj Acc)) ++
|
||||
vp.compl1 ! a ++ vp.compl2 ! a) (predV verbBe) ;
|
||||
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe) ;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
ImpersCl vp = mkClause [] (agrP3 (GSg Neut)) vp ;
|
||||
GenericCl vp = mkClause "íÿêîé" (agrP3 (GSg Neut)) vp ;
|
||||
ImpersCl vp = mkClause [] (agrP3 (GSg Neut)) Pos vp ;
|
||||
GenericCl vp = mkClause "íÿêîé" (agrP3 (GSg Neut)) Pos vp ;
|
||||
|
||||
CleftNP np rs =
|
||||
mkClause (np.s ! RSubj)
|
||||
{gn=GSg Neut; p=np.a.p}
|
||||
(insertObj (\\_ => thisRP ! np.a.gn ++ rs.s ! np.a) (predV verbBe)) ;
|
||||
{gn=GSg Neut; p=np.a.p} Pos
|
||||
(insertObj (\\_ => thisRP ! np.a.gn ++ rs.s ! np.a) np.p (predV verbBe)) ;
|
||||
|
||||
CleftAdv ad s = {s = \\t,a,p,o => case p of {Pos=>[]; Neg=>"íå"} ++ ad.s ++ s.s } ;
|
||||
|
||||
@@ -53,13 +53,14 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
|
||||
|
||||
ExistIP ip =
|
||||
mkQuestion {s = ip.s ! RSubj}
|
||||
(mkClause "òóê" (agrP3 ip.gn) (predV verbBe)) ;
|
||||
(mkClause "òóê" (agrP3 ip.gn) Pos (predV verbBe)) ;
|
||||
|
||||
ProgrVP vp = {
|
||||
s = \\_ => vp.s ! Imperf ;
|
||||
ad = vp.ad ;
|
||||
compl = vp.compl ;
|
||||
vtype = vp.vtype
|
||||
vtype = vp.vtype ;
|
||||
p = vp.p
|
||||
} ;
|
||||
|
||||
ImpPl1 vp = {s = "íåêà" ++ daComplex Simul Pos vp ! Perf ! {gn = GPl ; p = P1}} ;
|
||||
|
||||
@@ -22,12 +22,12 @@ resource MorphoBul = ResBul ** open
|
||||
oper
|
||||
--2 Determiners
|
||||
|
||||
mkDeterminerSg : Str -> Str -> Str -> {s : Bool => AGender => Role => Str; nn : NNumber; spec : Species} = \vseki,vsiaka,vsiako ->
|
||||
{s = \\_,g,_ => table AGender [vseki;vseki;vsiaka;vsiako] ! g; nn = NNum Sg; spec = Indef} ;
|
||||
mkDeterminerPl : Str -> {s : Bool => AGender => Role => Str ; nn : NNumber ; spec : Species} = \vsicki ->
|
||||
{s = \\_,_,_ => vsicki; sp = \\_,_ => vsicki; nn = NNum Pl; spec = Indef} ;
|
||||
mkDeterminerSg : Str -> Str -> Str -> {s : Bool => AGender => Role => Str; nn : NNumber; spec : Species; p : Polarity} = \vseki,vsiaka,vsiako ->
|
||||
{s = \\_,g,_ => table AGender [vseki;vseki;vsiaka;vsiako] ! g; nn = NNum Sg; spec = Indef; p = Pos} ;
|
||||
mkDeterminerPl : Str -> {s : Bool => AGender => Role => Str ; nn : NNumber ; spec : Species; p : Polarity} = \vsicki ->
|
||||
{s = \\_,_,_ => vsicki; sp = \\_,_ => vsicki; nn = NNum Pl; spec = Indef; p = Pos} ;
|
||||
|
||||
mkQuant : Str -> Str -> Str -> Str -> {s : Bool => AForm => Str; nonEmpty : Bool; spec : Species} = \tozi,tazi,towa,tezi ->
|
||||
mkQuant : Str -> Str -> Str -> Str -> {s : Bool => AForm => Str; nonEmpty : Bool; spec : Species; p : Polarity} = \tozi,tazi,towa,tezi ->
|
||||
{ s = \\_ => table {
|
||||
ASg Masc _ => tozi ;
|
||||
ASgMascDefNom => tozi ;
|
||||
@@ -36,7 +36,8 @@ oper
|
||||
APl _ => tezi
|
||||
} ;
|
||||
nonEmpty = True ;
|
||||
spec = Indef
|
||||
spec = Indef ;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
--2 Verbs
|
||||
|
||||
@@ -28,6 +28,7 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||
_ => s
|
||||
} ;
|
||||
a = {gn = gennum cn.g (numnnum det.nn); p = P3} ;
|
||||
p = det.p
|
||||
} ;
|
||||
|
||||
DetNP det =
|
||||
@@ -37,34 +38,40 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||
_ => s
|
||||
} ;
|
||||
a = {gn = gennum ANeut (numnnum det.nn); p = P3} ;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
UsePN pn = { s = table {
|
||||
RObj Dat => "íà" ++ pn.s;
|
||||
_ => pn.s
|
||||
} ;
|
||||
a = {gn = GSg pn.g; p = P3}
|
||||
a = {gn = GSg pn.g; p = P3} ;
|
||||
p = Pos
|
||||
} ;
|
||||
UsePron p = {s = p.s; a=p.a} ;
|
||||
UsePron p = {s = p.s; a=p.a; p=Pos} ;
|
||||
|
||||
PredetNP pred np = {
|
||||
s = \\c => pred.s ! np.a.gn ++ np.s ! c ;
|
||||
a = np.a
|
||||
a = np.a ;
|
||||
p = np.p
|
||||
} ;
|
||||
|
||||
PPartNP np v2 = {
|
||||
s = \\c => np.s ! c ++ v2.s ! Perf ! VPassive (aform np.a.gn Indef c) ;
|
||||
a = np.a
|
||||
a = np.a ;
|
||||
p = np.p
|
||||
} ;
|
||||
|
||||
AdvNP np adv = {
|
||||
s = \\c => np.s ! c ++ adv.s ;
|
||||
a = np.a
|
||||
a = np.a ;
|
||||
p = np.p
|
||||
} ;
|
||||
|
||||
ExtAdvNP np adv = {
|
||||
s = \\c => np.s ! c ++ comma ++ adv.s ;
|
||||
a = np.a
|
||||
a = np.a ;
|
||||
p = np.p
|
||||
} ;
|
||||
|
||||
DetQuant quant num = {
|
||||
@@ -73,7 +80,8 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||
in quant.s ! sp' ! aform (gennum g (numnnum num.nn)) (case c of {RVoc=>Indef; _=>Def}) c ++
|
||||
num.s ! dgenderSpecies g quant.spec c ;
|
||||
nn = num.nn ;
|
||||
spec = case num.nonEmpty of {True=>Indef; _=>quant.spec}
|
||||
spec = case num.nonEmpty of {True=>Indef; _=>quant.spec} ;
|
||||
p = quant.p
|
||||
} ;
|
||||
|
||||
DetQuantOrd = \quant, num, ord -> {
|
||||
@@ -81,13 +89,15 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||
num.s ! dgenderSpecies g quant.spec c ++
|
||||
ord.s ! aform (gennum g (numnnum num.nn)) (case num.nonEmpty of {True=>Indef; _=>quant.spec}) c ;
|
||||
nn = num.nn ;
|
||||
spec=Indef
|
||||
spec=Indef ;
|
||||
p = quant.p
|
||||
} ;
|
||||
|
||||
PossPron p = {
|
||||
s = \\_ => p.gen ;
|
||||
nonEmpty = True ;
|
||||
spec = ResBul.Indef
|
||||
spec = ResBul.Indef ;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
NumSg = {s = \\_ => []; nn = NNum Sg; nonEmpty = False} ;
|
||||
@@ -117,7 +127,8 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||
}
|
||||
} ;
|
||||
nonEmpty = False ;
|
||||
spec = ResBul.Def
|
||||
spec = ResBul.Def ;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
IndefArt = {
|
||||
@@ -132,7 +143,8 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||
}
|
||||
} ;
|
||||
nonEmpty = False ;
|
||||
spec = ResBul.Indef
|
||||
spec = ResBul.Indef ;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
MassNP cn = {
|
||||
@@ -142,6 +154,7 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||
_ => cn.s ! (NF Sg Indef)
|
||||
} ;
|
||||
a = {gn = gennum cn.g Sg; p = P3} ;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
UseN noun = noun ;
|
||||
@@ -186,11 +199,13 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||
GPl => ANeut
|
||||
}
|
||||
in det.s ! False ! g ! role ++ np.s ! (RObj Acc) ;
|
||||
a = {gn = gennum ANeut (numnnum det.nn); p = P3}
|
||||
a = {gn = gennum ANeut (numnnum det.nn); p = P3} ;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
RelNP np rs = {
|
||||
s = \\r => np.s ! r ++ rs.s ! np.a ;
|
||||
a = np.a
|
||||
a = np.a ;
|
||||
p = np.p
|
||||
} ;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,8 @@ lin
|
||||
RObj Dat => "на" ++ pn.s;
|
||||
_ => pn.s
|
||||
} ;
|
||||
a = {gn = GSg pn.g; p = P3}
|
||||
a = {gn = GSg pn.g; p = P3};
|
||||
p = q.p
|
||||
} ;
|
||||
|
||||
PastPartRS ant pol vp = {
|
||||
@@ -102,7 +103,8 @@ lin
|
||||
|
||||
SlashV2V vv ant p vp =
|
||||
insertSlashObj2 (\\agr => ant.s ++ p.s ++ vv.c3.s ++
|
||||
daComplex ant.a p.p vp ! Perf ! agr)
|
||||
daComplex ant.a (orPol p.p vp.p) vp ! Perf ! agr)
|
||||
Pos
|
||||
(slashV vv vv.c2) ;
|
||||
|
||||
ComplVV vv ant p vp =
|
||||
@@ -110,7 +112,7 @@ lin
|
||||
case vv.typ of {
|
||||
VVInf => daComplex ant.a p.p vp ! Perf ! agr;
|
||||
VVGerund => gerund vp ! Imperf ! agr
|
||||
})
|
||||
}) vp.p
|
||||
(predV vv) ;
|
||||
|
||||
PredVPosv np vp = {
|
||||
@@ -130,24 +132,32 @@ lin
|
||||
}
|
||||
} ;
|
||||
|
||||
CompS s = {s = \\_ => "че" ++ s.s} ;
|
||||
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
|
||||
CompVP ant p vp = {s = \\agr => ant.s ++ p.s ++
|
||||
daComplex ant.a p.p vp ! Perf ! agr} ;
|
||||
CompS s = {s = \\_ => "че" ++ s.s; p = Pos} ;
|
||||
CompQS qs = {s = \\_ => qs.s ! QIndir; p = Pos} ;
|
||||
CompVP ant p vp = {s = let p' = case vp.p of {
|
||||
Neg => Neg;
|
||||
Pos => p.p
|
||||
}
|
||||
in \\agr => ant.s ++ p.s ++
|
||||
daComplex ant.a p' vp ! Perf ! agr;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
VPSlashVS vs vp =
|
||||
let vp = insertObj (daComplex Simul Pos vp ! Perf) (predV vs)
|
||||
let vp = insertObj (daComplex Simul Pos vp ! Perf) vp.p (predV vs)
|
||||
in { s = vp.s;
|
||||
ad = vp.ad;
|
||||
compl1 = \\_ => "";
|
||||
compl2 = vp.compl;
|
||||
vtype = vp.vtype;
|
||||
p = vp.p;
|
||||
c2 = {s=""; c=Acc}
|
||||
} ;
|
||||
|
||||
ApposNP np1 np2 = {
|
||||
s = \\role => np1.s ! role ++ comma ++ np2.s ! RSubj ;
|
||||
a = np1.a
|
||||
a = np1.a ;
|
||||
p = np1.p
|
||||
} ;
|
||||
|
||||
UncNeg = {s = ""; p = Neg} ;
|
||||
|
||||
@@ -18,7 +18,7 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
|
||||
|
||||
QuestVP ip vp = {
|
||||
s = \\t,a,b,qform =>
|
||||
(mkClause (ip.s ! RSubj ! qform) {gn = ip.gn ; p = P3} vp).s ! t ! a ! b ! Main
|
||||
(mkClause (ip.s ! RSubj ! qform) {gn = ip.gn ; p = P3} Pos vp).s ! t ! a ! b ! Main
|
||||
} ;
|
||||
|
||||
QuestSlash ip slash =
|
||||
@@ -28,7 +28,7 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
|
||||
QuestIAdv iadv cl = mkQuestion iadv cl ;
|
||||
|
||||
QuestIComp icomp np =
|
||||
mkQuestion icomp (mkClause (np.s ! RSubj) np.a (predV verbBe)) ;
|
||||
mkQuestion icomp (mkClause (np.s ! RSubj) np.a np.p (predV verbBe)) ;
|
||||
|
||||
PrepIP p ip = {s = \\qform => p.s ++ case p.c of {Dat=>"íà";_=>[]} ++ ip.s ! RSubj ! qform} ;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ concrete RelativeBul of Relative = CatBul ** open ResBul in {
|
||||
RelVP rp vp = {
|
||||
s = \\t,a,p,agr =>
|
||||
let
|
||||
cl = mkClause (rp.s ! agr.gn) agr vp
|
||||
cl = mkClause (rp.s ! agr.gn) agr Pos vp
|
||||
in
|
||||
cl.s ! t ! a ! p ! Main ;
|
||||
role = RSubj
|
||||
|
||||
@@ -147,6 +147,12 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
||||
NCountable => Pl
|
||||
} ;
|
||||
|
||||
orPol : Polarity -> Polarity -> Polarity = \p1,p2 ->
|
||||
case p1 of {
|
||||
Neg => Neg;
|
||||
Pos => p2
|
||||
} ;
|
||||
|
||||
aform : GenNum -> Species -> Role -> AForm = \gn,spec,role ->
|
||||
case gn of {
|
||||
GSg g => case <g,spec,role> of {
|
||||
@@ -213,7 +219,8 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
||||
s : Aspect => VTable ;
|
||||
ad : {isEmpty : Bool; s : Str} ; -- sentential adverb
|
||||
compl : Agr => Str ;
|
||||
vtype : VType
|
||||
vtype : VType ;
|
||||
p : Polarity
|
||||
} ;
|
||||
|
||||
VPSlash = {
|
||||
@@ -222,6 +229,7 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
||||
compl1 : Agr => Str ;
|
||||
compl2 : Agr => Str ;
|
||||
vtype : VType ;
|
||||
p : Polarity ;
|
||||
c2 : Preposition
|
||||
} ;
|
||||
|
||||
@@ -230,6 +238,7 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
||||
ad = {isEmpty=True; s=[]} ;
|
||||
compl = \\_ => [] ;
|
||||
vtype = verb.vtype ;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
slashV : Verb -> Preposition -> VPSlash = \verb,prep -> {
|
||||
@@ -238,31 +247,44 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
||||
compl1 = \\_ => [] ;
|
||||
compl2 = \\_ => [] ;
|
||||
vtype = verb.vtype ;
|
||||
p = Pos ;
|
||||
c2 = prep ;
|
||||
} ;
|
||||
|
||||
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> {
|
||||
insertObj : (Agr => Str) -> Polarity -> VP -> VP = \obj,p,vp -> {
|
||||
s = vp.s ;
|
||||
ad = vp.ad ;
|
||||
compl = \\a => vp.compl ! a ++ obj ! a ;
|
||||
vtype = vp.vtype
|
||||
vtype = vp.vtype ;
|
||||
p = case p of {
|
||||
Neg => Neg;
|
||||
_ => vp.p
|
||||
}
|
||||
} ;
|
||||
|
||||
insertSlashObj1 : (Agr => Str) -> VPSlash -> VPSlash = \obj,slash -> {
|
||||
insertSlashObj1 : (Agr => Str) -> Polarity -> VPSlash -> VPSlash = \obj,p,slash -> {
|
||||
s = slash.s ;
|
||||
ad = slash.ad ;
|
||||
compl1 = \\a => slash.compl1 ! a ++ obj ! a ;
|
||||
compl2 = slash.compl2 ;
|
||||
vtype = slash.vtype ;
|
||||
p = case p of {
|
||||
Neg => Neg ;
|
||||
Pos => slash.p
|
||||
} ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
insertSlashObj2 : (Agr => Str) -> VPSlash -> VPSlash = \obj,slash -> {
|
||||
insertSlashObj2 : (Agr => Str) -> Polarity -> VPSlash -> VPSlash = \obj,p,slash -> {
|
||||
s = slash.s ;
|
||||
ad = slash.ad ;
|
||||
compl1 = slash.compl1 ;
|
||||
compl2 = \\a => slash.compl2 ! a ++ obj ! a ;
|
||||
vtype = slash.vtype ;
|
||||
p = case p of {
|
||||
Neg => Neg ;
|
||||
Pos => slash.p
|
||||
} ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
@@ -395,10 +417,17 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
||||
s : Tense => Anteriority => Polarity => Order => Str
|
||||
} ;
|
||||
|
||||
mkClause : Str -> Agr -> VP -> Clause =
|
||||
\subj,agr,vp -> {
|
||||
s = \\t,a,p,o =>
|
||||
mkClause : Str -> Agr -> Polarity -> VP -> Clause =
|
||||
\subj,agr,p1,vp -> {
|
||||
s = \\t,a,p2,o =>
|
||||
let
|
||||
p : Polarity
|
||||
= case <p1,p2,vp.p> of {
|
||||
<Neg,_,_> => Neg ;
|
||||
<_,Neg,_> => Neg ;
|
||||
<_,_,Neg> => Neg ;
|
||||
_ => Pos
|
||||
} ;
|
||||
verb : Bool => Str
|
||||
= \\q => vpTenses vp ! t ! a ! p ! agr ! q ! Perf ;
|
||||
compl = vp.compl ! agr
|
||||
@@ -637,8 +666,8 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
||||
}
|
||||
} ;
|
||||
|
||||
mkNP : Str -> GenNum -> Person -> {s : Role => Str; a : Agr} =
|
||||
\s,gn,p -> {
|
||||
mkNP : Str -> GenNum -> Person -> Polarity -> {s : Role => Str; a : Agr; p : Polarity} =
|
||||
\s,gn,p,pol -> {
|
||||
s = table {
|
||||
RSubj => s ;
|
||||
RObj Acc => s ;
|
||||
@@ -648,9 +677,10 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
||||
a = {
|
||||
gn = gn ;
|
||||
p = p
|
||||
}
|
||||
} ;
|
||||
p = pol
|
||||
} ;
|
||||
|
||||
|
||||
Preposition : Type = {s : Str; c : Case};
|
||||
|
||||
mkQuestion :
|
||||
|
||||
@@ -9,9 +9,9 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
||||
PredVP np vp = mkClause (np.s ! (case vp.vtype of {
|
||||
VNormal => RSubj ;
|
||||
VMedial _ => RSubj ;
|
||||
VPhrasal c => RObj c})) np.a vp ;
|
||||
VPhrasal c => RObj c})) np.a np.p vp ;
|
||||
|
||||
PredSCVP sc vp = mkClause sc.s {gn=GSg Masc; p=P3} vp ;
|
||||
PredSCVP sc vp = mkClause sc.s {gn=GSg Masc; p=P3} Pos vp ;
|
||||
|
||||
ImpVP vp = {
|
||||
s = \\p,gn =>
|
||||
@@ -28,10 +28,11 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
||||
} ;
|
||||
|
||||
SlashVP np slash = {
|
||||
s = \\agr => (mkClause (np.s ! RSubj) np.a {s = slash.s ;
|
||||
ad = slash.ad ;
|
||||
compl = \\_ => slash.compl1 ! np.a ++ slash.compl2 ! agr ;
|
||||
vtype = slash.vtype}).s ;
|
||||
s = \\agr => (mkClause (np.s ! RSubj) np.a np.p {s = slash.s ;
|
||||
ad = slash.ad ;
|
||||
compl = \\_ => slash.compl1 ! np.a ++ slash.compl2 ! agr ;
|
||||
vtype = slash.vtype ;
|
||||
p = Pos}).s ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
@@ -43,8 +44,8 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
||||
SlashPrep cl prep = {s = \\_ => cl.s; c2 = prep} ;
|
||||
|
||||
SlashVS np vs slash = {
|
||||
s = \\agr => (mkClause (np.s ! RSubj) np.a
|
||||
(insertObj (\\_ => "֌" ++ slash.s ! agr) (predV vs))).s ;
|
||||
s = \\agr => (mkClause (np.s ! RSubj) np.a np.p
|
||||
(insertObj (\\_ => "֌" ++ slash.s ! agr) Pos (predV vs))).s ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
|
||||
@@ -13,15 +13,18 @@ lin
|
||||
NumPN i = {s = i.s ! CFNeut Indef ; g = Neut} ;
|
||||
CNIntNP cn i = {
|
||||
s = \\c => cn.s ! NF Sg Indef ++ i.s ;
|
||||
a = agrP3 (gennum cn.g Sg)
|
||||
a = agrP3 (gennum cn.g Sg) ;
|
||||
p = Pos
|
||||
} ;
|
||||
CNSymbNP det cn xs = {
|
||||
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))
|
||||
a = agrP3 (gennum cn.g (numnnum det.nn)) ;
|
||||
p = Pos
|
||||
} ;
|
||||
CNNumNP cn i = {
|
||||
s = \\c => (cn.s ! NF Sg Indef ++ i.s ! CFNeut Indef) ;
|
||||
a = agrP3 (gennum cn.g Sg)
|
||||
a = agrP3 (gennum cn.g Sg) ;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
SymbS sy = sy ;
|
||||
|
||||
@@ -11,45 +11,46 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
||||
SlashV2a v = slashV v v.c2 ;
|
||||
|
||||
Slash2V3 v np =
|
||||
insertSlashObj1 (\\_ => v.c2.s ++ np.s ! RObj v.c2.c) (slashV v v.c3) ;
|
||||
insertSlashObj1 (\\_ => v.c2.s ++ np.s ! RObj v.c2.c) np.p (slashV v v.c3) ;
|
||||
|
||||
Slash3V3 v np =
|
||||
insertSlashObj2 (\\_ => v.c3.s ++ np.s ! RObj v.c3.c) (slashV v v.c2) ;
|
||||
insertSlashObj2 (\\_ => v.c3.s ++ np.s ! RObj v.c3.c) np.p (slashV v v.c2) ;
|
||||
|
||||
ComplVV vv vp =
|
||||
insertObj (case vv.typ of {
|
||||
VVInf => daComplex Simul Pos vp ! Perf;
|
||||
VVGerund => gerund vp ! Imperf
|
||||
})
|
||||
}) vp.p
|
||||
(predV vv) ;
|
||||
|
||||
ComplVS v s = insertObj (\\_ => comma ++ "֌" ++ s.s) (predV v) ;
|
||||
ComplVQ v q = insertObj (\\_ => q.s ! QDir) (predV v) ;
|
||||
ComplVS v s = insertObj (\\_ => comma ++ "֌" ++ s.s) Pos (predV v) ;
|
||||
ComplVQ v q = insertObj (\\_ => q.s ! QDir) Pos (predV v) ;
|
||||
|
||||
ComplVA v ap =
|
||||
insertObj (\\agr => ap.s ! aform agr.gn Indef (RObj Acc)) (predV v) ;
|
||||
insertObj (\\agr => ap.s ! aform agr.gn Indef (RObj Acc)) Pos (predV v) ;
|
||||
|
||||
|
||||
SlashV2A v ap =
|
||||
insertSlashObj2 (\\a => ap.s ! aform a.gn Indef (RObj Acc)) (slashV v v.c2) ;
|
||||
insertSlashObj2 (\\a => ap.s ! aform a.gn Indef (RObj Acc)) Pos (slashV v v.c2) ;
|
||||
|
||||
-- test: I saw a boy to whom she said that they are here
|
||||
SlashV2S v s = insertSlashObj2 (\\_ => comma ++ "֌" ++ s.s) (slashV v v.c2) ;
|
||||
SlashV2S v s = insertSlashObj2 (\\_ => comma ++ "֌" ++ s.s) Pos (slashV v v.c2) ;
|
||||
|
||||
-- test: I saw a boy whom she asked who is here
|
||||
SlashV2Q v q = insertSlashObj2 (\\_ => q.s ! QDir) (slashV v v.c2) ;
|
||||
SlashV2Q v q = insertSlashObj2 (\\_ => q.s ! QDir) Pos (slashV v v.c2) ;
|
||||
|
||||
-- test: I saw a boy whom she begged to walk
|
||||
SlashV2V vv vp =
|
||||
insertSlashObj2 (\\agr => vv.c3.s ++ daComplex Simul Pos vp ! Perf ! agr) (slashV vv vv.c2) ;
|
||||
insertSlashObj2 (\\agr => vv.c3.s ++ daComplex Simul vp.p vp ! Perf ! agr) Pos (slashV vv vv.c2) ;
|
||||
|
||||
-- test: I saw a car whom she wanted to buy
|
||||
SlashVV vv slash = {
|
||||
s = vv.s ;
|
||||
ad = {isEmpty=True; s=[]};
|
||||
compl1 = daComplex Simul Pos {s=slash.s; ad=slash.ad; compl=slash.compl1; vtype=slash.vtype} ! Perf ;
|
||||
compl1 = daComplex Simul Pos {s=slash.s; ad=slash.ad; compl=slash.compl1; vtype=slash.vtype; p = Pos} ! Perf ;
|
||||
compl2 = slash.compl2 ;
|
||||
vtype = vv.vtype ;
|
||||
p = slash.p ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
@@ -58,9 +59,10 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
||||
s = vv.s ;
|
||||
ad = {isEmpty=True; s=[]};
|
||||
compl1 = \\agr => vv.c2.s ++ np.s ! RObj vv.c2.c ++
|
||||
daComplex Simul Pos {s=slash.s; ad=slash.ad; compl=slash.compl1; vtype=slash.vtype} ! Perf ! np.a ;
|
||||
daComplex Simul np.p {s=slash.s; ad=slash.ad; compl=slash.compl1; vtype=slash.vtype; p=Pos} ! Perf ! np.a ;
|
||||
compl2 = slash.compl2 ;
|
||||
vtype = vv.vtype ;
|
||||
p = Pos ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
@@ -68,21 +70,23 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
||||
s = slash.s ;
|
||||
ad = slash.ad ;
|
||||
compl = \\a => slash.compl1 ! a ++ slash.c2.s ++ np.s ! RObj slash.c2.c ++ slash.compl2 ! a ;
|
||||
vtype = slash.vtype
|
||||
vtype = slash.vtype ;
|
||||
p = orPol np.p slash.p
|
||||
} ;
|
||||
|
||||
UseComp comp = insertObj comp.s (predV verbBe) ;
|
||||
UseComp comp = insertObj comp.s comp.p (predV verbBe) ;
|
||||
|
||||
UseCopula = predV verbBe ;
|
||||
|
||||
AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
|
||||
AdvVPSlash vp adv = insertSlashObj1 (\\_ => adv.s) vp ;
|
||||
AdvVP vp adv = insertObj (\\_ => adv.s) Pos vp ;
|
||||
AdvVPSlash vp adv = insertSlashObj1 (\\_ => adv.s) Pos vp ;
|
||||
|
||||
AdVVP adv vp = {
|
||||
s = vp.s ;
|
||||
ad = {isEmpty=False; s=vp.ad.s ++ adv.s} ;
|
||||
compl = vp.compl ;
|
||||
vtype = vp.vtype
|
||||
vtype = vp.vtype ;
|
||||
p = vp.p
|
||||
} ;
|
||||
AdVVPSlash adv vp = {
|
||||
s = vp.s ;
|
||||
@@ -90,6 +94,7 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
||||
compl1 = vp.compl1 ;
|
||||
compl2 = vp.compl2 ;
|
||||
vtype = vp.vtype ;
|
||||
p = vp.p ;
|
||||
c2 = vp.c2
|
||||
} ;
|
||||
|
||||
@@ -98,14 +103,15 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
||||
ad = slash.ad ;
|
||||
compl = \\agr => slash.compl1 ! agr ++ slash.compl2 ! agr ;
|
||||
vtype = VMedial slash.c2.c ;
|
||||
p = slash.p
|
||||
} ;
|
||||
|
||||
PassV2 v = insertObj (\\a => v.s ! Perf ! VPassive (aform a.gn Indef (RObj Acc))) (predV verbBe) ;
|
||||
|
||||
CompAP ap = {s = \\agr => ap.s ! aform agr.gn Indef (RObj Acc)} ;
|
||||
CompNP np = {s = \\_ => np.s ! RObj Acc} ;
|
||||
CompAdv a = {s = \\_ => a.s} ;
|
||||
CompCN cn = {s = \\agr => cn.s ! (NF (numGenNum agr.gn) Indef)} ;
|
||||
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); p = Pos} ;
|
||||
CompNP np = {s = \\_ => np.s ! RObj Acc; p = np.p} ;
|
||||
CompAdv a = {s = \\_ => a.s; p = Pos} ;
|
||||
CompCN cn = {s = \\agr => cn.s ! (NF (numGenNum agr.gn) Indef); p = Pos} ;
|
||||
|
||||
VPSlashPrep vp prep = vp ** {c2 = prep ; compl1 = vp.compl ; compl2 = \\_ => []} ; ---- AR
|
||||
|
||||
|
||||
Reference in New Issue
Block a user