1
0
forked from GitHub/gf-core

Scandinavian conjunction

This commit is contained in:
aarne
2005-12-07 22:22:29 +00:00
parent 5a9db982dc
commit 59d1b1271b
7 changed files with 77 additions and 51 deletions

View File

@@ -1,4 +1,4 @@
resource Coordination = { resource Coordination = open Prelude in {
param param
ListSize = TwoElem | ManyElem ; ListSize = TwoElem | ManyElem ;
@@ -27,6 +27,12 @@ oper
conjunctDistrX : ConjunctionDistr -> ListX -> Str = \or,xs -> conjunctDistrX : ConjunctionDistr -> ListX -> Str = \or,xs ->
or.s1 ++ xs.s1 ++ or.s2 ++ xs.s2 ; or.s1 ++ xs.s1 ++ or.s2 ++ xs.s2 ;
conjunctSS : Conjunction -> ListX -> SS = \or,xs ->
ss (xs.s1 ++ or.s ++ xs.s2) ;
conjunctDistrSS : ConjunctionDistr -> ListX -> SS = \or,xs ->
ss (or.s1 ++ xs.s1 ++ or.s2 ++ xs.s2) ;
-- all this lifted to tables -- all this lifted to tables
ListTable : Type -> Type = \P -> {s1,s2 : P => Str} ; ListTable : Type -> Type = \P -> {s1,s2 : P => Str} ;

View File

@@ -1,13 +1,15 @@
concrete ConjunctionEng of Conjunction = concrete ConjunctionEng of Conjunction =
CatEng ** open ResEng, Coordination, Prelude in { CatEng ** open ResEng, Coordination, Prelude in {
flags optimize=all_subs ;
lin lin
ConjS conj ss = {s = conjunctX conj ss} ; ConjS = conjunctSS ;
DConjS conj ss = {s = conjunctDistrX conj ss} ; DConjS = conjunctDistrSS ;
ConjAdv conj ss = {s = conjunctX conj ss} ; ConjAdv = conjunctSS ;
DConjAdv conj ss = {s = conjunctDistrX conj ss} ; DConjAdv = conjunctDistrSS ;
ConjNP conj ss = conjunctTable Case conj ss ** { ConjNP conj ss = conjunctTable Case conj ss ** {
a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p} a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p}

View File

@@ -23,4 +23,4 @@ concrete ExtEng of ExtEngAbs = CatEng ** open ResEng in {
can_Aux = {s = \\p => posneg p "can"} ; ---- cannt can_Aux = {s = \\p => posneg p "can"} ; ---- cannt
must_Aux = {s = \\p => posneg p "must"} ; must_Aux = {s = \\p => posneg p "must"} ;
} }

View File

@@ -1,43 +1,45 @@
--concrete ConjunctionScand of Conjunction = incomplete concrete ConjunctionScand of Conjunction =
-- CatScand ** open ResScand, Coordination, Prelude in { CatScand ** open ResScand, Coordination, Prelude in {
--
-- lin flags optimize=all_subs ;
--
-- ConjS conj ss = {s = conjunctX conj ss} ; lin
-- DConjS conj ss = {s = conjunctDistrX conj ss} ;
-- ConjS conj ss = conjunctTable Order conj ss ;
-- ConjAdv conj ss = {s = conjunctX conj ss} ; DConjS conj ss = conjunctDistrTable Order conj ss ;
-- DConjAdv conj ss = {s = conjunctDistrX conj ss} ;
-- ConjAdv conj ss = conjunctSS conj ss ;
-- ConjNP conj ss = conjunctTable Case conj ss ** { DConjAdv conj ss = conjunctDistrSS conj ss ;
-- a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p}
-- } ; ConjNP conj ss = conjunctTable NPForm conj ss ** {
-- DConjNP conj ss = conjunctDistrTable Case conj ss ** { a = {gn = conjGenNum (gennum utrum conj.n) ss.a.gn ; p = ss.a.p}
-- a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p} } ;
-- } ; DConjNP conj ss = conjunctDistrTable NPForm conj ss ** {
-- a = {gn = conjGenNum (gennum utrum conj.n) ss.a.gn ; p = ss.a.p}
-- ConjAP conj ss = conjunctTable Agr conj ss ** { } ;
-- isPre = ss.isPre
-- } ; ConjAP conj ss = conjunctTable AFormPos conj ss ** {
-- DConjAP conj ss = conjunctDistrTable Agr conj ss ** { isPre = ss.isPre
-- isPre = ss.isPre } ;
-- } ; DConjAP conj ss = conjunctDistrTable AFormPos conj ss ** {
-- isPre = ss.isPre
---- These fun's are generated from the list cat's. } ;
--
-- BaseS = twoSS ; -- These fun's are generated from the list cat's.
-- ConsS = consrSS comma ;
-- BaseAdv = twoSS ; BaseS = twoTable Order ;
-- ConsAdv = consrSS comma ; ConsS = consrTable Order comma ;
-- BaseNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ; BaseAdv = twoSS ;
-- ConsNP xs x = consrTable Case comma xs x ** {a = conjAgr xs.a x.a} ; ConsAdv = consrSS comma ;
-- BaseAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ; BaseNP x y = twoTable NPForm x y ** {a = conjAgr x.a y.a} ;
-- ConsAP xs x = consrTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ; 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} ;
-- lincat ConsAP xs x = consrTable AFormPos comma xs x ** {isPre = andB xs.isPre x.isPre} ;
-- [S] = {s1,s2 : Str} ;
-- [Adv] = {s1,s2 : Str} ; lincat
-- [NP] = {s1,s2 : Case => Str ; a : Agr} ; [S] = {s1,s2 : Order => Str} ;
-- [AP] = {s1,s2 : Agr => Str ; isPre : Bool} ; [Adv] = {s1,s2 : Str} ;
-- [NP] = {s1,s2 : NPForm => Str ; a : Agr} ;
--} [AP] = {s1,s2 : AFormPos => Str ; isPre : Bool} ;
}

View File

@@ -80,6 +80,20 @@ oper
Pres => VF (VPres v) ; Pres => VF (VPres v) ;
Past => VF (VPret v) ; Past => VF (VPret v) ;
_ => VI (VInfin v) --- not to be used? _ => VI (VInfin v) --- not to be used?
} ; } ;
-- Used in $ConjunctionScand$.
conjGenNum : (_,_ : GenNum) -> GenNum = \g,h -> case <g,h> of {
<SgUtr,SgUtr> => SgUtr ;
<Plg, _> => Plg ;
<_, Plg> => Plg ;
_ => SgNeutr
} ;
conjAgr : (_,_ : Agr) -> Agr = \a,b -> {
gn = conjGenNum a.gn b.gn ;
p = conjPerson a.p b.p
} ;
} }

View File

@@ -0,0 +1,2 @@
concrete ConjunctionSwe of Conjunction = CatSwe ** ConjunctionScand with
(DiffScand = DiffSwe) ;

View File

@@ -9,7 +9,7 @@ concrete TestSwe of Test =
SentenceSwe, SentenceSwe,
QuestionSwe, QuestionSwe,
-- RelativeSwe, -- RelativeSwe,
-- ConjunctionSwe, ConjunctionSwe,
PhraseSwe, PhraseSwe,
UntensedSwe, UntensedSwe,
-- -- TensedSwe, -- -- TensedSwe,