mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
added ConjRS and things needed for it
This commit is contained in:
@@ -17,15 +17,11 @@ abstract Conjunction = Cat ** {
|
||||
--2 Rules
|
||||
|
||||
fun
|
||||
ConjS : Conj -> [S] -> S ; -- "he walks and she runs"
|
||||
ConjAP : Conj -> [AP] -> AP ; -- "cold and warm"
|
||||
ConjNP : Conj -> [NP] -> NP ; -- "she or we"
|
||||
ConjAdv : Conj -> [Adv] -> Adv ; -- "here or there"
|
||||
|
||||
---b DConjS : DConj -> [S] -> S ; -- "either he walks or she runs"
|
||||
---b DConjAP : DConj -> [AP] -> AP ; -- "both warm and cold"
|
||||
---b DConjNP : DConj -> [NP] -> NP ; -- "either he or she"
|
||||
---b DConjAdv : DConj -> [Adv] -> Adv; -- "both here and there"
|
||||
ConjS : Conj -> [S] -> S ; -- "he walks and she runs"
|
||||
ConjRS : Conj -> [RS] -> RS ; -- "who walks and whose mother runs"
|
||||
ConjAP : Conj -> [AP] -> AP ; -- "cold and warm"
|
||||
ConjNP : Conj -> [NP] -> NP ; -- "she or we"
|
||||
ConjAdv : Conj -> [Adv] -> Adv ; -- "here or there"
|
||||
|
||||
--2 Categories
|
||||
|
||||
@@ -33,6 +29,7 @@ abstract Conjunction = Cat ** {
|
||||
|
||||
cat
|
||||
[S]{2} ;
|
||||
[RS]{2} ;
|
||||
[Adv]{2} ;
|
||||
[NP]{2} ;
|
||||
[AP]{2} ;
|
||||
@@ -46,7 +43,3 @@ abstract Conjunction = Cat ** {
|
||||
-- ConsC : C -> [C] -> [C] ;
|
||||
}
|
||||
|
||||
--.
|
||||
-- *Note*. This module uses right-recursive lists. If backward
|
||||
-- compatibility with API 0.9 is needed, use
|
||||
-- [SeqConjunction SeqConjunction.html].
|
||||
|
||||
@@ -17,28 +17,9 @@ concrete ConjunctionEng of Conjunction =
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
|
||||
{---b
|
||||
|
||||
ConjS = conjunctSS ;
|
||||
DConjS = conjunctDistrSS ;
|
||||
|
||||
ConjAdv = conjunctSS ;
|
||||
DConjAdv = conjunctDistrSS ;
|
||||
|
||||
ConjNP conj ss = conjunctTable Case conj ss ** {
|
||||
a = conjAgr (agrP3 conj.n) ss.a
|
||||
ConjRS conj ss = conjunctDistrTable Agr conj ss ** {
|
||||
c = ss.c
|
||||
} ;
|
||||
DConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
||||
a = conjAgr (agrP3 conj.n) ss.a
|
||||
} ;
|
||||
|
||||
ConjAP conj ss = conjunctTable Agr conj ss ** {
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
DConjAP conj ss = conjunctDistrTable Agr conj ss ** {
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
-}
|
||||
|
||||
-- These fun's are generated from the list cat's.
|
||||
|
||||
@@ -50,11 +31,14 @@ concrete ConjunctionEng of Conjunction =
|
||||
ConsNP xs x = consrTable Case comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||
BaseAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ;
|
||||
ConsAP xs x = consrTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
||||
BaseRS x y = twoTable Agr x y ** {c = y.c} ;
|
||||
ConsRS xs x = consrTable Agr comma xs x ** {c = xs.c} ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[NP] = {s1,s2 : Case => Str ; a : Agr} ;
|
||||
[AP] = {s1,s2 : Agr => Str ; isPre : Bool} ;
|
||||
[RS] = {s1,s2 : Agr => Str ; c : Case} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,10 @@ concrete ConjunctionFin of Conjunction =
|
||||
|
||||
ConjAP conj ss = conjunctDistrTable2 Bool NForm conj ss ;
|
||||
|
||||
ConjRS conj ss = conjunctDistrTable Agr conj ss ** {
|
||||
c = ss.c
|
||||
} ;
|
||||
|
||||
-- These fun's are generated from the list cat's.
|
||||
|
||||
BaseS = twoSS ;
|
||||
@@ -26,11 +30,14 @@ concrete ConjunctionFin of Conjunction =
|
||||
ConsNP xs x = consrTable NPForm comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||
BaseAP x y = twoTable2 Bool NForm x y ;
|
||||
ConsAP xs x = consrTable2 Bool NForm comma xs x ;
|
||||
BaseRS x y = twoTable Agr x y ** {c = y.c} ;
|
||||
ConsRS xs x = consrTable Agr comma xs x ** {c = xs.c} ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[NP] = {s1,s2 : NPForm => Str ; a : Agr} ;
|
||||
[AP] = {s1,s2 : Bool => NForm => Str} ;
|
||||
[RS] = {s1,s2 : Agr => Str ; c : NPForm} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -17,27 +17,10 @@ concrete ConjunctionGer of Conjunction =
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
|
||||
{- ---b
|
||||
ConjS conj ss = conjunctTable Order conj ss ;
|
||||
DConjS conj ss = conjunctDistrTable Order conj ss ;
|
||||
|
||||
ConjAdv conj ss = conjunctSS conj ss ;
|
||||
DConjAdv conj ss = conjunctDistrSS conj ss ;
|
||||
|
||||
ConjNP conj ss = conjunctTable Case conj ss ** {
|
||||
a = {g = Fem ; n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
} ;
|
||||
DConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
||||
a = {g = Fem ; n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
ConjRS conj ss = conjunctDistrTable GenNum conj ss ** {
|
||||
c = ss.c
|
||||
} ;
|
||||
|
||||
ConjAP conj ss = conjunctTable AForm conj ss ** {
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
DConjAP conj ss = conjunctDistrTable AForm conj ss ** {
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
-}
|
||||
|
||||
-- These fun's are generated from the list cat's.
|
||||
|
||||
@@ -49,11 +32,14 @@ concrete ConjunctionGer of Conjunction =
|
||||
ConsNP xs x = consrTable Case comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||
BaseAP x y = twoTable AForm x y ** {isPre = andB x.isPre y.isPre} ;
|
||||
ConsAP xs x = consrTable AForm comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
||||
BaseRS x y = twoTable GenNum x y ** {c = y.c} ;
|
||||
ConsRS xs x = consrTable GenNum comma xs x ** {c = xs.c} ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Order => Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[NP] = {s1,s2 : Case => Str ; a : Agr} ;
|
||||
[AP] = {s1,s2 : AForm => Str ; isPre : Bool} ;
|
||||
[RS] = {s1,s2 : GenNum => Str ; c : Case} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,9 @@ incomplete concrete ConjunctionRomance of Conjunction =
|
||||
ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
ConjRS conj ss = conjunctDistrTable2 Mood Agr conj ss ** {
|
||||
c = ss.c
|
||||
} ;
|
||||
|
||||
|
||||
-- These fun's are generated from the list cat's.
|
||||
@@ -36,11 +39,14 @@ incomplete concrete ConjunctionRomance of Conjunction =
|
||||
} ;
|
||||
BaseAP x y = twoTable AForm x y ** {isPre = andB x.isPre y.isPre} ;
|
||||
ConsAP xs x = consrTable AForm comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
||||
BaseRS x y = twoTable2 Mood Agr x y ** {c = y.c} ;
|
||||
ConsRS xs x = consrTable2 Mood Agr comma xs x ** {c = xs.c} ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Mood => Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[NP] = {s1,s2 : Case => Str ; a : Agr} ;
|
||||
[AP] = {s1,s2 : AForm => Str ; isPre : Bool} ;
|
||||
[RS] = {s1,s2 : Mood => Agr => Str ; c : Case} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -17,6 +17,10 @@ incomplete concrete ConjunctionScand of Conjunction =
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
|
||||
ConjRS conj ss = conjunctDistrTable Agr conj ss ** {
|
||||
c = ss.c
|
||||
} ;
|
||||
|
||||
-- These fun's are generated from the list cat's.
|
||||
|
||||
BaseS = twoTable Order ;
|
||||
@@ -27,11 +31,14 @@ incomplete concrete ConjunctionScand of Conjunction =
|
||||
ConsNP xs x = consrTable NPForm comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||
BaseAP x y = twoTable AFormPos x y ** {isPre = andB x.isPre y.isPre} ;
|
||||
ConsAP xs x = consrTable AFormPos comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
||||
BaseRS x y = twoTable Agr x y ** {c = y.c} ;
|
||||
ConsRS xs x = consrTable Agr comma xs x ** {c = xs.c} ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Order => Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[NP] = {s1,s2 : NPForm => Str ; a : Agr} ;
|
||||
[AP] = {s1,s2 : AFormPos => Str ; isPre : Bool} ;
|
||||
[RS] = {s1,s2 : Agr => Str ; c : NPForm} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user