1
0
forked from GitHub/gf-core

future tense 'komma att' in scandinavian

This commit is contained in:
malin
2011-11-09 19:23:46 +00:00
parent 18ca88f9ed
commit 1ba9ffcff7
21 changed files with 82 additions and 50 deletions

View File

@@ -1,2 +1,2 @@
concrete CatDan of Cat = CommonX ** CatScand with concrete CatDan of Cat = CommonX -[Tense, Temp] ** CatScand with
(ResScand = ResDan) ; (ResScand = ResDan) ;

View File

@@ -47,6 +47,8 @@ instance DiffDan of DiffScand = open CommonScand, Prelude in {
{part = [] ; isVaere = True} ; {part = [] ; isVaere = True} ;
auxFut = "vil" ; -- "skal" in ExtDan auxFut = "vil" ; -- "skal" in ExtDan
auxFutKommer = "vil" ;
auxFutPart = "" ;
auxCond = "ville" ; auxCond = "ville" ;
negation : Polarity => Str = table { negation : Polarity => Str = table {

View File

@@ -8,7 +8,7 @@ concrete IdiomDan of Idiom = CatDan **
GenericCl vp = mkClause "man" (agrP3 MorphoDan.utrum Sg) vp ; GenericCl vp = mkClause "man" (agrP3 MorphoDan.utrum Sg) vp ;
CleftNP np rs = mkClause "det" (agrP3 MorphoDan.neutrum Sg) CleftNP np rs = mkClause "det" (agrP3 MorphoDan.neutrum Sg)
(insertObj (\\_ => np.s ! rs.c ++ rs.s ! np.a) (predV verbBe)) ; (insertObj (\\_ => np.s ! rs.c ++ rs.s ! np.a ! RNom) (predV verbBe)) ;
CleftAdv ad s = mkClause "det" (agrP3 MorphoDan.neutrum Sg) CleftAdv ad s = mkClause "det" (agrP3 MorphoDan.neutrum Sg)
(insertObj (\\_ => ad.s ++ s.s ! Sub) (predV verbBe)) ; (insertObj (\\_ => ad.s ++ s.s ! Sub) (predV verbBe)) ;

View File

@@ -1,2 +1,2 @@
concrete CatNor of Cat = CommonX ** CatScand with concrete CatNor of Cat = CommonX - [Tense, Temp] ** CatScand with
(ResScand = ResNor) ; (ResScand = ResNor) ;

View File

@@ -57,6 +57,8 @@ instance DiffNor of DiffScand = open CommonScand, Prelude in {
noPart = {part = []} ; noPart = {part = []} ;
auxFut = "vil" ; -- "skal" in ExtNor auxFut = "vil" ; -- "skal" in ExtNor
auxFutKommer = "kommer" ;
auxFutPart = "til" ;
auxCond = "ville" ; auxCond = "ville" ;
negation : Polarity => Str = table { negation : Polarity => Str = table {

View File

@@ -6,4 +6,6 @@ concrete ExtraNor of ExtraNorAbs = ExtraScandNor ** open CommonScand, ResNor, Pr
a = np.a a = np.a
} ; } ;
TFutKommer = {s = []} ** {t = SFutKommer} ; --# notpresent
} }

View File

@@ -9,7 +9,7 @@ concrete IdiomNor of Idiom = CatNor **
GenericCl vp = mkClause "man" (agrP3 Utr Sg) vp ; GenericCl vp = mkClause "man" (agrP3 Utr Sg) vp ;
CleftNP np rs = mkClause "det" (agrP3 Neutr Sg) CleftNP np rs = mkClause "det" (agrP3 Neutr Sg)
(insertObj (\\_ => np.s ! rs.c ++ rs.s ! np.a) (predV verbBe)) ; (insertObj (\\_ => np.s ! rs.c ++ rs.s ! np.a ! RNom) (predV verbBe)) ;
CleftAdv ad s = mkClause "det" (agrP3 Neutr Sg) CleftAdv ad s = mkClause "det" (agrP3 Neutr Sg)
(insertObj (\\_ => ad.s ++ s.s ! Sub) (predV verbBe)) ; (insertObj (\\_ => ad.s ++ s.s ! Sub) (predV verbBe)) ;

View File

@@ -1,5 +1,5 @@
incomplete concrete CatScand of Cat = incomplete concrete CatScand of Cat =
CommonX ** open ResScand, Prelude, CommonScand, (R = ParamX) in { CommonX -[Tense,Temp] ** open (RS = ResScand), Prelude, CommonScand, (R = ParamX) in {
flags optimize=all_subs ; flags optimize=all_subs ;
@@ -9,14 +9,14 @@ incomplete concrete CatScand of Cat =
S = {s : Order => Str} ; S = {s : Order => Str} ;
QS = {s : QForm => Str} ; QS = {s : QForm => Str} ;
RS = {s : Agr => Str ; c : NPForm} ; RS = {s : Agr => RCase => Str ; c : NPForm} ;
SSlash = {s : Order => Str ; n3 : Agr => Str ; c2 : Complement} ; SSlash = {s : Order => Str ; n3 : Agr => Str ; c2 : Complement} ;
-- Sentence -- Sentence
Cl = {s : R.Tense => Anteriority => Polarity => Order => Str} ; Cl = {s : STense => Anteriority => Polarity => Order => Str} ;
ClSlash = { ClSlash = {
s : R.Tense => Anteriority => Polarity => Order => Str ; s : STense => Anteriority => Polarity => Order => Str ;
n3 : Agr => Str ; n3 : Agr => Str ;
c2 : Complement c2 : Complement
} ; } ;
@@ -24,7 +24,7 @@ incomplete concrete CatScand of Cat =
-- Question -- Question
QCl = {s : R.Tense => Anteriority => Polarity => QForm => Str} ; QCl = {s : STense => Anteriority => Polarity => QForm => Str} ;
IP = {s : NPForm => Str ; g : Gender ; n : Number} ; IP = {s : NPForm => Str ; g : Gender ; n : Number} ;
IComp = {s : AFormPos => Str} ; IComp = {s : AFormPos => Str} ;
IDet = {s : NGender => Str ; n : Number ; det : DetSpecies} ; IDet = {s : NGender => Str ; n : Number ; det : DetSpecies} ;
@@ -32,7 +32,7 @@ incomplete concrete CatScand of Cat =
-- Relative; the case $c$ is for "det" clefts. -- Relative; the case $c$ is for "det" clefts.
RCl = {s : R.Tense => Anteriority => Polarity => Agr => Str ; c : NPForm} ; RCl = {s : STense => Anteriority => Polarity => Agr => RCase => Str ; c : NPForm} ;
RP = {s : Gender => Number => RCase => Str ; a : RAgr} ; RP = {s : Gender => Number => RCase => Str ; a : RAgr} ;
-- Verb -- Verb
@@ -102,4 +102,9 @@ incomplete concrete CatScand of Cat =
N3 = Noun ** {c2,c3 : Complement} ; N3 = Noun ** {c2,c3 : Complement} ;
PN = {s : Case => Str ; g : Gender} ; PN = {s : Case => Str ; g : Gender} ;
lincat
Temp = {s : Str ; t : STense ; a : Anteriority} ;
Tense = {s : Str ; t : STense} ;
} }

View File

@@ -59,7 +59,7 @@ param
; ;
VPForm = VPForm =
VPFinite Tense Anteriority VPFinite STense Anteriority
| VPImperat | VPImperat
| VPInfinit Anteriority ; | VPInfinit Anteriority ;
@@ -73,6 +73,17 @@ param
PredetAgr = PNoAg | PAg Number ; PredetAgr = PNoAg | PAg Number ;
STense =
SPres
| SPast --# notpresent
| SFut --# notpresent
| SFutKommer --# notpresent -- komma att
| SCond --# notpresent
;
oper oper
Complement : Type = {s : Str ; hasPrep : Bool} ; Complement : Type = {s : Str ; hasPrep : Bool} ;
@@ -121,10 +132,10 @@ oper
-- Used in $DiffScand.predV$. -- Used in $DiffScand.predV$.
vFin : Tense -> Voice -> VForm = \t,v -> case t of { vFin : STense -> Voice -> VForm = \t,v -> case t of {
Pres => VF (VPres v) SPres => VF (VPres v)
; --# notpresent ; --# notpresent
Past => VF (VPret v) ; --# notpresent SPast => VF (VPret v) ; --# notpresent
_ => VI (VInfin v) --# notpresent _ => VI (VInfin v) --# notpresent
} ; } ;
@@ -315,7 +326,7 @@ oper
-- For $Sentence$. -- For $Sentence$.
Clause : Type = { Clause : Type = {
s : Tense => Anteriority => Polarity => Order => Str s : STense => Anteriority => Polarity => Order => Str
} ; } ;
mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> { mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> {

View File

@@ -17,7 +17,7 @@ incomplete concrete ConjunctionScand of Conjunction =
isPre = ss.isPre isPre = ss.isPre
} ; } ;
ConjRS conj ss = conjunctDistrTable Agr conj ss ** { ConjRS conj ss = conjunctDistrTable2 Agr RCase conj ss ** {
c = ss.c c = ss.c
} ; } ;
@@ -43,8 +43,8 @@ incomplete concrete ConjunctionScand of Conjunction =
ConsNP xs x = consrTable NPForm comma xs x ** {a = conjAgr xs.a x.a} ; 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} ; 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} ; ConsAP xs x = consrTable AFormPos comma xs x ** {isPre = andB xs.isPre x.isPre} ;
BaseRS x y = twoTable Agr x y ** {c = y.c} ; BaseRS x y = twoTable2 Agr RCase x y ** {c = y.c} ;
ConsRS xs x = consrTable Agr comma xs x ** {c = xs.c} ; ConsRS xs x = consrTable2 Agr RCase comma xs x ** {c = xs.c} ;
BaseIAdv = twoSS ; BaseIAdv = twoSS ;
ConsIAdv = consrSS comma ; ConsIAdv = consrSS comma ;
BaseCN = twoTable3 Number DetSpecies Case ; BaseCN = twoTable3 Number DetSpecies Case ;
@@ -56,7 +56,7 @@ incomplete concrete ConjunctionScand of Conjunction =
[IAdv] = {s1,s2 : Str} ; [IAdv] = {s1,s2 : Str} ;
[NP] = {s1,s2 : NPForm => Str ; a : Agr} ; [NP] = {s1,s2 : NPForm => Str ; a : Agr} ;
[AP] = {s1,s2 : AFormPos => Str ; isPre : Bool} ; [AP] = {s1,s2 : AFormPos => Str ; isPre : Bool} ;
[RS] = {s1,s2 : Agr => Str ; c : NPForm} ; [RS] = {s1,s2 : Agr => RCase => Str ; c : NPForm} ;
[CN] = {s1,s2 : Number => DetSpecies => Case => Str} ; --- g : NGender ; isMod : Bool} ; [CN] = {s1,s2 : Number => DetSpecies => Case => Str} ; --- g : NGender ; isMod : Bool} ;
} }

View File

@@ -42,7 +42,9 @@ interface DiffScand = open CommonScand, Prelude in {
verbBecome : Verb ; verbBecome : Verb ;
auxFut : Str ; auxFut : Str ; -- ska
auxFutKommer : Str ; -- "kommer"
auxFutPart : Str ; -- "til"
auxCond : Str ; auxCond : Str ;
negation : Polarity => Str ; negation : Polarity => Str ;

View File

@@ -1,3 +1,5 @@
abstract ExtraScandAbs = Extra ** { abstract ExtraScandAbs = Extra ** {
fun
TFutKommer : Tense ; --# notpresent
} }

View File

@@ -176,13 +176,13 @@ incomplete concrete NounScand of Noun =
} ; } ;
RelCN cn rs = let g = cn.g in { RelCN cn rs = let g = cn.g in {
s = \\n,d,c => cn.s ! n ! d ! c ++ rs.s ! agrP3 (ngen2gen g) n ; s = \\n,d,c => cn.s ! n ! d ! c ++ rs.s ! agrP3 (ngen2gen g) n ! RNom ;
g = g ; g = g ;
isMod = cn.isMod isMod = cn.isMod
} ; } ;
RelNP np rs = { RelNP np rs = {
s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ; s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ! RNom ;
a = np.a ; a = np.a ;
isMod = np.isMod isMod = np.isMod
} ; } ;

View File

@@ -6,19 +6,19 @@ incomplete concrete RelativeScand of Relative =
lin lin
RelCl cl = { RelCl cl = {
s = \\t,a,p,ag => s = \\t,a,p,ag,_ =>
pronSuch ! gennumAgr ag ++ conjThat ++ cl.s ! t ! a ! p ! Sub ; pronSuch ! gennumAgr ag ++ conjThat ++ cl.s ! t ! a ! p ! Sub ;
c = NPAcc c = NPAcc
} ; } ;
RelVP rp vp = { RelVP rp vp = {
s = \\t,ant,b,ag => s = \\t,ant,b,ag,rc =>
let let
agr = case rp.a of { agr = case rp.a of {
RNoAg => ag ; RNoAg => ag ;
RAg g n p => {g = g ; n = n ; p = p} RAg g n p => {g = g ; n = n ; p = p}
} ; } ;
cl = mkClause (rp.s ! ag.g ! ag.n ! RNom) agr vp cl = mkClause (rp.s ! ag.g ! ag.n ! rc) agr vp
in in
cl.s ! t ! ant ! b ! Sub ; cl.s ! t ! ant ! b ! Sub ;
c = NPNom c = NPNom
@@ -29,7 +29,7 @@ incomplete concrete RelativeScand of Relative =
-- and the empty relative ("huset hon bor i") are defined in $ExtraScand$. -- and the empty relative ("huset hon bor i") are defined in $ExtraScand$.
RelSlash rp slash = { RelSlash rp slash = {
s = \\t,a,p,ag => s = \\t,a,p,ag,_ =>
let let
agr = case rp.a of { agr = case rp.a of {
RNoAg => ag ; RNoAg => ag ;

View File

@@ -16,15 +16,20 @@ interface ResScand = DiffScand ** open CommonScand, Prelude in {
Noun = {s : Number => Species => Case => Str ; g : NGender} ; Noun = {s : Number => Species => Case => Str ; g : NGender} ;
-- This function is here because it depends on $verbHave, auxFut, auxCond$. -- needed for VP conjunction
param
VPIForm = VPIInf | VPISup ; ---- sup not yet used
predV : Verb -> VP = \verb ->
-- This function is here because it depends on $verbHave, auxFut, auxCond$.
oper
predV : Verb -> VP = \verb ->
let let
diath = case verb.vtype of { diath = case verb.vtype of {
VPass => Pass ; VPass => Pass ;
_ => Act _ => Act
} ; } ;
vfin : Tense -> Str = \t -> verb.s ! vFin t diath ; vfin : STense -> Str = \t -> verb.s ! vFin t diath ;
vsup = verb.s ! VI (VSupin diath) ; --# notpresent vsup = verb.s ! VI (VSupin diath) ; --# notpresent
vinf = verb.s ! VI (VInfin diath) ; vinf = verb.s ! VI (VInfin diath) ;
@@ -32,8 +37,9 @@ interface ResScand = DiffScand ** open CommonScand, Prelude in {
True => verbBe.s ; True => verbBe.s ;
_ => verbHave.s _ => verbHave.s
} ; } ;
har : Tense -> Str = \t -> auxv ! vFin t Act ; har : STense -> Str = \t -> auxv ! vFin t Act ;
ha : Str = auxv ! VI (VInfin Act) ; ha : Str = auxv ! VI (VInfin Act) ;
vf : Str -> Str -> {fin,inf : Str} = \fin,inf -> { vf : Str -> Str -> {fin,inf : Str} = \fin,inf -> {
@@ -43,16 +49,18 @@ interface ResScand = DiffScand ** open CommonScand, Prelude in {
in { in {
s = table { s = table {
VPFinite t Simul => case t of { VPFinite t Simul => case t of {
-- Pres | Past => vf (vfin t) [] ; -- the general rule -- SPres | SPast => vf (vfin t) [] ; -- the general rule
Past => vf (vfin t) [] ; --# notpresent SPast => vf (vfin t) [] ; --# notpresent
Fut => vf auxFut vinf ; --# notpresent SFut => vf auxFut vinf ; --# notpresent
Cond => vf auxCond vinf ; --# notpresent SFutKommer => vf auxFutKommer (auxFutPart ++ infMark ++ vinf) ; --# notpresent
Pres => vf (vfin t) [] SCond => vf auxCond vinf ; --# notpresent
SPres => vf (vfin t) []
} ; } ;
VPFinite t Anter => case t of { --# notpresent VPFinite t Anter => case t of { --# notpresent
Pres | Past => vf (har t) vsup ; --# notpresent SPres | SPast => vf (har t) vsup ; --# notpresent
Fut => vf auxFut (ha ++ vsup) ; --# notpresent SFut => vf auxFut (ha ++ vsup) ; --# notpresent
Cond => vf auxCond (ha ++ vsup) --# notpresent SFutKommer => vf auxFutKommer (auxFutPart ++ infMark ++ ha ++ vsup) ; --# notpresent
SCond => vf auxCond (ha ++ vsup) --# notpresent
} ; --# notpresent } ; --# notpresent
VPImperat => vf (verb.s ! VF (VImper diath)) [] ; VPImperat => vf (verb.s ! VF (VImper diath)) [] ;
VPInfinit Anter => vf [] (ha ++ vsup) ; --# notpresent VPInfinit Anter => vf [] (ha ++ vsup) ; --# notpresent
@@ -68,9 +76,5 @@ interface ResScand = DiffScand ** open CommonScand, Prelude in {
en2,ea2,eext : Bool = False -- indicate if the field exists en2,ea2,eext : Bool = False -- indicate if the field exists
} ; } ;
-- needed for VP conjunction
param
VPIForm = VPIInf | VPISup ; ---- sup not yet used
} }

View File

@@ -48,7 +48,7 @@ incomplete concrete SentenceScand of Sentence =
s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! q s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! q
} ; } ;
UseRCl t p cl = { UseRCl t p cl = {
s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! r ; s = \\r,rc => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! r ! rc ;
c = cl.c c = cl.c
} ; } ;
UseSlash t p cl = { UseSlash t p cl = {
@@ -60,6 +60,6 @@ incomplete concrete SentenceScand of Sentence =
AdvS a s = {s = \\o => a.s ++ s.s ! Inv} ; AdvS a s = {s = \\o => a.s ++ s.s ! Inv} ;
ExtAdvS a s = {s = \\o => a.s ++ "," ++ s.s ! Inv} ; ExtAdvS a s = {s = \\o => a.s ++ "," ++ s.s ! Inv} ;
RelS s r = {s = \\o => s.s ! o ++ "," ++ r.s ! agrP3 Neutr Sg} ; --- vilket RelS s r = {s = \\o => s.s ! o ++ "," ++ r.s ! agrP3 Neutr Sg ! RPrep True } ; --- vilket
} }

View File

@@ -1,2 +1,2 @@
concrete CatSwe of Cat = CommonX ** CatScand with concrete CatSwe of Cat = CommonX - [Tense,Temp] ** CatScand with
(ResScand = ResSwe) ; (ResScand = ResSwe) ;

View File

@@ -19,6 +19,7 @@ instance DiffSwe of DiffScand = open CommonScand, Prelude in {
hasAuxBe _ = False ; hasAuxBe _ = False ;
-- Strings. -- Strings.
conjThat = "att" ; conjThat = "att" ;
@@ -48,6 +49,8 @@ instance DiffSwe of DiffScand = open CommonScand, Prelude in {
noPart = {part = []} ; noPart = {part = []} ;
auxFut = "ska" ; -- "skall" in ExtSwe auxFut = "ska" ; -- "skall" in ExtSwe
auxFutKommer = "kommer" ;
auxFutPart = "" ;
auxCond = "skulle" ; auxCond = "skulle" ;
negation : Polarity => Str = table { negation : Polarity => Str = table {

View File

@@ -12,7 +12,7 @@ concrete IdiomSwe of Idiom = CatSwe **
GenericCl vp = mkClause "man" (agrP3 utr Sg) vp ; GenericCl vp = mkClause "man" (agrP3 utr Sg) vp ;
CleftNP np rs = mkClause "det" (agrP3 neutr Sg) CleftNP np rs = mkClause "det" (agrP3 neutr Sg)
(insertObj (\\_ => np.s ! rs.c ++ rs.s ! np.a) (predV verbBe)) ; (insertObj (\\_ => np.s ! rs.c ++ rs.s ! np.a ! RNom) (predV verbBe)) ;
CleftAdv ad s = mkClause "det" (agrP3 neutr Sg) CleftAdv ad s = mkClause "det" (agrP3 neutr Sg)
(insertObj (\\_ => ad.s ++ s.s ! Sub) (predV verbBe)) ; (insertObj (\\_ => ad.s ++ s.s ! Sub) (predV verbBe)) ;

View File

@@ -1,3 +1,2 @@
instance ResSwe of ResScand = DiffSwe ** open CommonScand, Prelude in { instance ResSwe of ResScand = DiffSwe ** open CommonScand, Prelude in {
} ; } ;

View File

@@ -28,7 +28,7 @@ concrete StructuralSwe of Structural = CatSwe **
everybody_NP = regNP "alla" "allas" Utr Pl ; everybody_NP = regNP "alla" "allas" Utr Pl ;
every_Det = { every_Det = {
s = \\_,_ => "varje" ; s = \\_,_ => "varje" ;
sp = \\_,_ => "var och en" ; ---- sp = \\_ => genderForms ["var och en"] ["vart och ett"] ; ----
n = Sg ; n = Sg ;
det = DIndef det = DIndef
} ; } ;