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