From f2a5937120e4c9d0e633f252b50a008746422a07 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 14 Nov 2008 15:42:09 +0000 Subject: [PATCH] added ConjRS and things needed for it --- next-lib/src/abstract/Conjunction.gf | 19 +++++--------- next-lib/src/english/ConjunctionEng.gf | 26 ++++--------------- next-lib/src/finnish/ConjunctionFin.gf | 7 +++++ next-lib/src/german/ConjunctionGer.gf | 24 ++++------------- next-lib/src/romance/ConjunctionRomance.gf | 6 +++++ next-lib/src/scandinavian/ConjunctionScand.gf | 7 +++++ 6 files changed, 36 insertions(+), 53 deletions(-) diff --git a/next-lib/src/abstract/Conjunction.gf b/next-lib/src/abstract/Conjunction.gf index 4c2183919..3c40fe1f0 100644 --- a/next-lib/src/abstract/Conjunction.gf +++ b/next-lib/src/abstract/Conjunction.gf @@ -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]. diff --git a/next-lib/src/english/ConjunctionEng.gf b/next-lib/src/english/ConjunctionEng.gf index 269ae5f80..758041c0c 100644 --- a/next-lib/src/english/ConjunctionEng.gf +++ b/next-lib/src/english/ConjunctionEng.gf @@ -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} ; } diff --git a/next-lib/src/finnish/ConjunctionFin.gf b/next-lib/src/finnish/ConjunctionFin.gf index 8e7f7a3c8..a11d9c596 100644 --- a/next-lib/src/finnish/ConjunctionFin.gf +++ b/next-lib/src/finnish/ConjunctionFin.gf @@ -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} ; } diff --git a/next-lib/src/german/ConjunctionGer.gf b/next-lib/src/german/ConjunctionGer.gf index d46a32839..3aea69d1d 100644 --- a/next-lib/src/german/ConjunctionGer.gf +++ b/next-lib/src/german/ConjunctionGer.gf @@ -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} ; } diff --git a/next-lib/src/romance/ConjunctionRomance.gf b/next-lib/src/romance/ConjunctionRomance.gf index 219ce5c58..521d2ed4b 100644 --- a/next-lib/src/romance/ConjunctionRomance.gf +++ b/next-lib/src/romance/ConjunctionRomance.gf @@ -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} ; } diff --git a/next-lib/src/scandinavian/ConjunctionScand.gf b/next-lib/src/scandinavian/ConjunctionScand.gf index b98f04ae9..6a85a74cb 100644 --- a/next-lib/src/scandinavian/ConjunctionScand.gf +++ b/next-lib/src/scandinavian/ConjunctionScand.gf @@ -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} ; }