mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
fix conjunction for np and s
This commit is contained in:
@@ -11,15 +11,16 @@ concrete ConjunctionLat of Conjunction =
|
|||||||
ConjS conj ss = {
|
ConjS conj ss = {
|
||||||
-- s = \\apos => coord conj.c { init = (ss.s ! conj.c).init ! SPreS ! apos ! CPreV ! SOV ;
|
-- s = \\apos => coord conj.c { init = (ss.s ! conj.c).init ! SPreS ! apos ! CPreV ! SOV ;
|
||||||
-- last = (ss.s ! conj.c).last ! SPreS ! apos ! CPreV ! SOV} ;
|
-- last = (ss.s ! conj.c).last ! SPreS ! apos ! CPreV ! SOV} ;
|
||||||
s = \\apos => conj.s1 ++ (ss.s ! conj.c).init ! SPreS ! apos ! CPreV ! SOV ++ conj.s2 ++
|
s = \\apos => conj.s1 ++ (ss.s ! conj.c).init ! SAPreS ! apos ! DPreN ! VReg ! CPreV ! SOV ++ conj.s2 ++
|
||||||
(ss.s ! conj.c).last ! SPreS ! apos ! CPreV ! SOV ++ conj.s3 ;
|
(ss.s ! conj.c).last ! SAPreS ! apos ! DPreN ! VReg ! CPreV ! SOV ++ conj.s3 ;
|
||||||
o = \\_ => [] ;
|
o = \\_ => [] ;
|
||||||
v = \\_,_ => [] ;
|
v = \\_ => [] ;
|
||||||
neg = \\_ => [] ;
|
neg = \\_ => [] ;
|
||||||
vcompl = [] ;
|
compl = [] ;
|
||||||
p = ss.p ;
|
p = ss.p ;
|
||||||
sadv = [] ;
|
sadv = [] ;
|
||||||
t = ss.t
|
t = ss.t ;
|
||||||
|
det = { s, sp = \\_ => [] } ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- ConjAdv : Conj -> ListAdv -> Adv ; -- here or there
|
-- ConjAdv : Conj -> ListAdv -> Adv ; -- here or there
|
||||||
@@ -35,14 +36,13 @@ concrete ConjunctionLat of Conjunction =
|
|||||||
-- } ;
|
-- } ;
|
||||||
-- c => (conjunctDistrTable Case conj (nps.l ! Et)).s
|
-- c => (conjunctDistrTable Case conj (nps.l ! Et)).s
|
||||||
-- } ;
|
-- } ;
|
||||||
s = \\pd,ca => conj.s1 ++ (nps.s ! conj.c).init ! pd ! ca ++ conj.s2 ++ (nps.s ! conj.c).last ! pd ! ca ++ conj.s3 ;
|
s = \\pd,ca => conj.s1 ++ (nps.s ! conj.c).init ! pd ! APreN ! DPreN ! ca ++ conj.s2 ++ (nps.s ! conj.c).last ! pd ! APreN ! DPreN ! ca ++ conj.s3;
|
||||||
n = case conj.c of { Et => Pl ; _ => nps.n } ;
|
n = case conj.c of { Et => Pl ; _ => nps.n } ;
|
||||||
g = nps.g ;
|
g = nps.g ;
|
||||||
p = nps.p ;
|
p = nps.p ;
|
||||||
adv = nps.adv ;
|
adv = "" ;
|
||||||
preap = nps.preap ;
|
preap , postap = { s = \\_ => "" };
|
||||||
postap = nps.postap ;
|
det = { s , sp = \\_ => ""} ;
|
||||||
det = nps.det
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- ConjAP : Conj -> ListAP -> AP ;
|
-- ConjAP : Conj -> ListAP -> AP ;
|
||||||
@@ -82,7 +82,7 @@ concrete ConjunctionLat of Conjunction =
|
|||||||
-- ConsS x xs = { l = \\_ => consrSS bindComma (ss (x.s ! PreS)) (xs.l ! Comma) };
|
-- ConsS x xs = { l = \\_ => consrSS bindComma (ss (x.s ! PreS)) (xs.l ! Comma) };
|
||||||
ConsS s ss = {
|
ConsS s ss = {
|
||||||
s = \\co =>
|
s = \\co =>
|
||||||
{ init = \\s,a,c,o => coord co { init = (ss.s ! co).init ! s ! a ! c ! o ; last = (ss.s ! co).last ! s ! a ! c ! o } ;
|
{ init = \\s,a,d,v,c,o => coord co { init = (ss.s ! co).init ! s ! a ! d ! v ! c ! o ; last = (ss.s ! co).last ! s ! a ! d ! v ! c ! o } ;
|
||||||
last = combineSentence s } ;
|
last = combineSentence s } ;
|
||||||
p = s.p ;
|
p = s.p ;
|
||||||
t = s.t
|
t = s.t
|
||||||
@@ -104,29 +104,21 @@ concrete ConjunctionLat of Conjunction =
|
|||||||
-- -- BaseNP : NP -> NP -> ListNP ; -- John, Mary
|
-- -- BaseNP : NP -> NP -> ListNP ; -- John, Mary
|
||||||
BaseNP x y = {
|
BaseNP x y = {
|
||||||
-- s = \\c => twoTable Case x y ;
|
-- s = \\c => twoTable Case x y ;
|
||||||
s = \\c => { init = x.s ; last = y.s } ;
|
s = \\c => { init = combineNounPhrase x ; last = combineNounPhrase y } ;
|
||||||
g = Masc ; -- Just guessing (but maybe sexist bullshit)
|
g = Neutr ; -- Trying to avoid trouble by choosing a gender
|
||||||
n = matchNumber x.n y.n ;
|
n = matchNumber x.n y.n ;
|
||||||
p = P3 ;
|
p = P3 ;
|
||||||
adv = x.adv ++ y.adv ;
|
|
||||||
preap = lin AP { s = \\a => x.preap.s ! a ++ y.preap.s ! a } ;
|
|
||||||
postap = lin AP { s = \\a => x.postap.s ! a ++ y.postap.s ! a } ;
|
|
||||||
isBase = True ;
|
isBase = True ;
|
||||||
det = lin Det { s = \\g,c => x.det.s ! g ! c ++ y.det.s ! g ! c ; sp = \\g,c => x.det.sp ! g ! c ++ y.det.sp ! g ! c ; n = matchNumber x.det.n y.det.n } ;
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- -- ConsNP : NP -> ListNP -> ListNP ; -- John, Mary, Bill
|
-- -- ConsNP : NP -> ListNP -> ListNP ; -- John, Mary, Bill
|
||||||
ConsNP x xs = {
|
ConsNP x xs = {
|
||||||
-- s = \\_ => consrTable Case bindComma x ( xs.s ! Comma );
|
-- s = \\_ => consrTable Case bindComma x ( xs.s ! Comma );
|
||||||
s = \\co => { init = \\pd,ca => coord co { init = (xs.s ! co).init ! pd ! ca ; last = (xs.s ! co).last ! pd ! ca} ; last = x.s } ;
|
s = \\co => { init = \\pd,ap,dp,ca => coord co { init = (xs.s ! co).init ! pd ! ap ! dp ! ca ; last = (xs.s ! co).last ! pd ! ap ! dp ! ca} ; last = combineNounPhrase x } ;
|
||||||
n = matchNumber x.n xs.n ;
|
n = matchNumber x.n xs.n ;
|
||||||
g = xs.g ;
|
g = xs.g ;
|
||||||
p = xs.p ;
|
p = xs.p ;
|
||||||
adv = x.adv ++ xs.adv ;
|
|
||||||
preap = lin AP { s = \\a => x.preap.s ! a ++ xs.preap.s ! a } ;
|
|
||||||
postap = lin AP { s = \\a => x.postap.s ! a ++ xs.postap.s ! a } ;
|
|
||||||
isBase = False ;
|
isBase = False ;
|
||||||
det = lin Det { s = \\g,c => x.det.s ! g ! c ++ xs.det.s ! g ! c ; sp = \\g,c => x.det.sp ! g ! c ++ xs.det.sp ! g ! c ; n = matchNumber x.det.n xs.det.n } ; -- try to combine the determiners, probably not what we want
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- -- BaseAP : AP -> AP -> ListAP
|
-- -- BaseAP : AP -> AP -> ListAP
|
||||||
@@ -145,9 +137,9 @@ concrete ConjunctionLat of Conjunction =
|
|||||||
|
|
||||||
--
|
--
|
||||||
lincat
|
lincat
|
||||||
[S] = { s : Coordinator => {init,last : SAdvPos => AdvPos => ComplPos => Order => Str} ; p : Pol ; t : Tense } ; -- TO FIX
|
[S] = { s : Coordinator => {init,last : SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str} ; p : Pol ; t : Tense } ; -- TO FIX
|
||||||
[Adv] = { s: Coordinator => {init,last : Str}} ;
|
[Adv] = { s: Coordinator => {init,last : Str}} ;
|
||||||
[NP] = { s : Coordinator => {init,last : PronDropForm => Case => Str} ; g : Gender ; n : Number ; p : Person ; adv : Str ; preap : AP ; postap : AP ; isBase : Bool ; det : Det } ;
|
[NP] = { s : Coordinator => {init,last : PronDropForm => AdvPos => DetPos => Case => Str} ; g : Gender ; n : Number ; p : Person ; isBase : Bool } ;
|
||||||
[AP] = {s : Coordinator => {init,last : Agr => Str } } ;
|
[AP] = {s : Coordinator => {init,last : Agr => Str } } ;
|
||||||
[RS] = { s : Coordinator => { init, last : Gender => Number => Str }} ;
|
[RS] = { s : Coordinator => { init, last : Gender => Number => Str }} ;
|
||||||
oper
|
oper
|
||||||
|
|||||||
Reference in New Issue
Block a user