mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
fixed the linearization for both7and_Conj and either7or_Conj
This commit is contained in:
@@ -96,7 +96,7 @@ concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in {
|
||||
|
||||
-- Structural
|
||||
|
||||
Conj = {s1,s2 : Str ; n : Number} ;
|
||||
Conj = {s : Str; distr : Bool; conj : Bool; n : Number} ;
|
||||
Subj = {s : Str} ;
|
||||
Prep = {s : Str; c : Case} ;
|
||||
|
||||
|
||||
@@ -4,46 +4,51 @@ concrete ConjunctionBul of Conjunction =
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
ConjS conj ss = {
|
||||
s = (linCoordSep [])!conj.distr!conj.conj++ss.s!conj.distr!conj.conj;
|
||||
} ;
|
||||
|
||||
ConjS = conjunctDistrSS ;
|
||||
ConjAdv conj ss = {
|
||||
s = (linCoordSep [])!conj.distr!conj.conj++ss.s!conj.distr!conj.conj;
|
||||
} ;
|
||||
|
||||
ConjAdv = conjunctDistrSS ;
|
||||
|
||||
ConjNP conj ss = conjunctDistrTable Role conj ss ** {
|
||||
ConjNP conj ss = {
|
||||
s = \\role => (linCoordSep [])!conj.distr!conj.conj++ss.s!conj.distr!conj.conj!role;
|
||||
a = {gn = conjGenNum (gennum DMasc conj.n) ss.a.gn; p = ss.a.p}
|
||||
} ;
|
||||
|
||||
ConjAP conj ss = {
|
||||
s = \\aform => conj.s1++ ss.s1.s ! aform ++ conj.s2 ++ ss.s2.s ! aform;
|
||||
adv = conj.s1++ ss.s1.adv ++ conj.s2 ++ ss.s2.adv;
|
||||
s = \\aform => (linCoordSep [])!conj.distr!conj.conj++ss.s!conj.distr!conj.conj!aform;
|
||||
adv = (linCoordSep [])!conj.distr!conj.conj++ss.adv!conj.distr!conj.conj;
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
|
||||
-- These fun's are generated from the list cat's.
|
||||
BaseS x y = {s = \\d,t=>x.s++linCoord!t++ y.s} ;
|
||||
ConsS x xs = {s = \\d,t=>x.s++(linCoordSep comma)!d!t++xs.s!d!t} ;
|
||||
|
||||
BaseS = twoSS ;
|
||||
ConsS = consrSS comma ;
|
||||
BaseAdv x y = {s = \\d,t=>x.s++linCoord!t++ y.s} ;
|
||||
ConsAdv x xs = {s = \\d,t=>x.s++(linCoordSep comma)!d!t++xs.s!d!t} ;
|
||||
|
||||
BaseAdv = twoSS ;
|
||||
ConsAdv = consrSS comma ;
|
||||
|
||||
BaseNP x y = twoTable Role x y ** {a = conjAgr x.a y.a} ;
|
||||
ConsNP xs x = consrTable Role comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||
BaseNP x y =
|
||||
{s = \\d,t,role=>x.s!role++linCoord!t++y.s!role;
|
||||
a = conjAgr x.a y.a} ;
|
||||
ConsNP x xs =
|
||||
{s = \\d,t,role=>x.s!role++(linCoordSep comma)!d!t++xs.s!d!t!role;
|
||||
a = conjAgr xs.a x.a} ;
|
||||
|
||||
BaseAP x y =
|
||||
{s1 = {s=x.s; adv=x.adv};
|
||||
s2 = {s=y.s; adv=y.adv};
|
||||
{s = \\d,t,aform=>x.s!aform++linCoord!t++y.s!aform;
|
||||
adv= \\d,t =>x.adv ++linCoord!t++y.adv;
|
||||
isPre = andB x.isPre y.isPre} ;
|
||||
|
||||
ConsAP x xs =
|
||||
{s1 = {s = \\aform => x.s ! aform ++ comma ++ xs.s1.s ! aform;
|
||||
adv = x.adv ++ comma ++ xs.s1.adv};
|
||||
s2 = xs.s2;
|
||||
{s = \\d,t,aform=>x.s!aform++(linCoordSep comma)!d!t++xs.s!d!t!aform;
|
||||
adv= \\d,t =>x.adv ++(linCoordSep comma)!d!t++xs.adv!d!t;
|
||||
isPre = andB x.isPre xs.isPre} ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[NP] = {s1,s2 : Role => Str ; a : Agr} ;
|
||||
[AP] = {s1,s2 : {s : AForm => Str; adv : Str}; isPre : Bool} ;
|
||||
[S] = {s : Bool => Bool => Str} ;
|
||||
[Adv] = {s : Bool => Bool => Str} ;
|
||||
[NP] = {s : Bool => Bool => Role => Str; a : Agr} ;
|
||||
[AP] = {s : Bool => Bool => AForm => Str; adv : Bool => Bool => Str; isPre : Bool} ;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ concrete PhraseBul of Phrase = CatBul ** open Prelude, ResBul in {
|
||||
UttAdv adv = adv ;
|
||||
|
||||
NoPConj = {s = []} ;
|
||||
PConjConj conj = {s = conj.s2} ; ---- AR
|
||||
PConjConj conj = {s = conj.s ++ linCoord!conj.conj} ;
|
||||
|
||||
NoVoc = {s = []} ;
|
||||
VocNP np = {s = "," ++ np.s ! RVoc} ;
|
||||
|
||||
@@ -578,4 +578,10 @@ resource ResBul = ParamX ** open Prelude in {
|
||||
GSg Neut => "òîâà" ;
|
||||
GPl => "òåçè"
|
||||
} ;
|
||||
|
||||
linCoord : Bool => Str ;
|
||||
linCoord = table {True => "è"; False=>"èëè"} ;
|
||||
|
||||
linCoordSep : Str -> Bool => Bool => Str ;
|
||||
linCoordSep s = table {True => linCoord; False=> \\_ => s} ;
|
||||
}
|
||||
|
||||
@@ -10,18 +10,18 @@ concrete StructuralBul of Structural = CatBul **
|
||||
almost_AdA, almost_AdN = ss "ïî÷òè" ;
|
||||
although_Subj = ss ["âúïðåêè ÷å"] ;
|
||||
always_AdV = ss "âèíàãè" ;
|
||||
and_Conj = {s1 = [] ; s2 = "è" ; n = Pl} ;
|
||||
and_Conj = {s=[]; conj=True; distr=False; n = Pl} ;
|
||||
because_Subj = ss "çàùîòî" ;
|
||||
before_Prep = mkPrep "ïðåäè" Acc ;
|
||||
behind_Prep = mkPrep "çàä" Acc ;
|
||||
between_Prep = mkPrep "ìåæäó" Acc ;
|
||||
both7and_DConj = sd2 "è" "è" ** {n = Pl} ;
|
||||
both7and_DConj = {s=[]; conj=True; distr=True; n = Pl} ;
|
||||
but_PConj = ss "íî" ;
|
||||
by8agent_Prep = mkPrep "÷ðåç" Acc ;
|
||||
by8means_Prep = mkPrep "÷ðåç" Acc ;
|
||||
can8know_VV, can_VV = mkVV (stateV (mkV166 "ìîãà")) ;
|
||||
during_Prep = mkPrep ["ïî âðåìå íà"] Acc ;
|
||||
either7or_DConj = sd2 "èëè" "èëè" ** {n = Sg} ;
|
||||
either7or_DConj = {s=[]; conj=False; distr=True; n = Sg} ;
|
||||
everybody_NP = mkNP "âñåêè" (GSg Masc) P3 ;
|
||||
every_Det = mkDeterminerSg "âñåêè" "âñÿêà" "âñÿêî";
|
||||
everything_NP = mkNP "âñè÷êî" (GSg Neut) P3 ;
|
||||
@@ -69,7 +69,7 @@ concrete StructuralBul of Structural = CatBul **
|
||||
on_Prep = mkPrep "íà" Acc ;
|
||||
---- one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED
|
||||
only_Predet = {s = \\_ => "ñàìî"} ;
|
||||
or_Conj = {s1 = [] ; s2 = "èëè" ; n = Sg} ;
|
||||
or_Conj = {s=[]; conj=False; distr=False; n = Sg} ;
|
||||
otherwise_PConj = ss "èíà÷å" ;
|
||||
part_Prep = mkPrep "îò" Acc ;
|
||||
please_Voc = ss "ìîëÿ" ;
|
||||
|
||||
Reference in New Issue
Block a user