forked from GitHub/gf-core
Swedish 1.4 complete
This commit is contained in:
@@ -65,11 +65,3 @@ concrete SentenceEng of Sentence = CatEng ** open Prelude, ResEng in {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{-
|
|
||||||
--- todo: tense of embedded Slash
|
|
||||||
|
|
||||||
SlashVSS np vs s =
|
|
||||||
mkClause (np.s ! Nom) np.a
|
|
||||||
(insertObj (\\_ => conjThat ++ s.s) (predV vs)) **
|
|
||||||
{c2 = s.c2} ;
|
|
||||||
-}
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ incomplete concrete CatScand of Cat =
|
|||||||
ext : Str ; -- S-Ext att hon går ---s7
|
ext : Str ; -- S-Ext att hon går ---s7
|
||||||
en2,ea2,eext : Bool -- indicate if the field exists
|
en2,ea2,eext : Bool -- indicate if the field exists
|
||||||
} ;
|
} ;
|
||||||
|
VPSlash = CommonScand.VP ** {c2 : Str} ;
|
||||||
Comp = {s : AFormPos => Str} ;
|
Comp = {s : AFormPos => Str} ;
|
||||||
|
|
||||||
|
|
||||||
@@ -61,14 +62,12 @@ incomplete concrete CatScand of Cat =
|
|||||||
CN = {s : Number => DetSpecies => Case => Str ; g : Gender ; isMod : Bool} ;
|
CN = {s : Number => DetSpecies => Case => Str ; g : Gender ; isMod : Bool} ;
|
||||||
NP,Pron = {s : NPForm => Str ; a : Agr} ;
|
NP,Pron = {s : NPForm => Str ; a : Agr} ;
|
||||||
Det = {s : Bool => Gender => Str ; n : Number ; det : DetSpecies} ;
|
Det = {s : Bool => Gender => Str ; n : Number ; det : DetSpecies} ;
|
||||||
--- QuantSg = {s : Bool => Gender => Str ; det : DetSpecies} ;
|
|
||||||
--- QuantPl = {s : Bool => Gender => Str ; n : Number ; det : DetSpecies} ;
|
|
||||||
Quant = {s : Number => Bool => Gender => Str ; det : DetSpecies} ;
|
Quant = {s : Number => Bool => Gender => Str ; det : DetSpecies} ;
|
||||||
Art = {s : Number => Bool => Gender => Str ; det : DetSpecies} ;
|
Art = {s : Number => Bool => Gender => Str ; det : DetSpecies} ;
|
||||||
Predet = {s : GenNum => Str} ;
|
Predet = {s : GenNum => Str} ;
|
||||||
Num = {s : Gender => Str ; isDet : Bool ; n : Number} ;
|
Num = {s : Gender => Str ; isDet : Bool ; n : Number} ;
|
||||||
Card = {s : Gender => Str ; n : Number} ;
|
Card = {s : Gender => Str ; n : Number} ;
|
||||||
Ord = {s : Str ; isDet : Bool} ;
|
Ord = {s : Str} ;
|
||||||
|
|
||||||
-- Numeral
|
-- Numeral
|
||||||
|
|
||||||
|
|||||||
@@ -231,6 +231,17 @@ oper
|
|||||||
|
|
||||||
|
|
||||||
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> {
|
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> {
|
||||||
|
s = vp.s ;
|
||||||
|
a1 = vp.a1 ;
|
||||||
|
n2 = \\a => obj ! a ++ vp.n2 ! a ;
|
||||||
|
a2 = vp.a2 ;
|
||||||
|
ext = vp.ext ;
|
||||||
|
en2 = True ;
|
||||||
|
ea2 = vp.ea2 ;
|
||||||
|
eext = vp.eext
|
||||||
|
} ;
|
||||||
|
|
||||||
|
insertObjPost : (Agr => Str) -> VP -> VP = \obj,vp -> {
|
||||||
s = vp.s ;
|
s = vp.s ;
|
||||||
a1 = vp.a1 ;
|
a1 = vp.a1 ;
|
||||||
n2 = \\a => vp.n2 ! a ++ obj ! a ;
|
n2 = \\a => vp.n2 ! a ++ obj ! a ;
|
||||||
|
|||||||
@@ -46,25 +46,87 @@ incomplete concrete NounScand of Noun =
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuantOrd quant num ord = {
|
DetQuantOrd quant num ord = {
|
||||||
s = \\b,g => quant.s ! num.n ! (orB b (orB num.isDet ord.isDet)) ! g ++
|
s = \\b,g => quant.s ! num.n ! (orB b num.isDet) ! g ++
|
||||||
num.s ! g ++ ord.s ;
|
num.s ! g ++ ord.s ;
|
||||||
n = num.n ;
|
n = num.n ;
|
||||||
det = quant.det
|
det = quant.det
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
DetQuant quant num = {
|
||||||
|
s = \\b,g => quant.s ! num.n ! (orB b num.isDet) ! g ++
|
||||||
|
num.s ! g ;
|
||||||
|
n = num.n ;
|
||||||
|
det = quant.det
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetNP det =
|
||||||
|
let
|
||||||
|
g = Neutr ; ----
|
||||||
|
m = True ; ---- is this needed for other than Art?
|
||||||
|
in {
|
||||||
|
s = \\c => det.s ! m ! g ;
|
||||||
|
a = agrP3 g det.n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetArtOrd quant num ord = {
|
||||||
|
s = \\b,g => quant.s ! num.n ! (orB b num.isDet) ! g ++
|
||||||
|
num.s ! g ++ ord.s ;
|
||||||
|
n = num.n ;
|
||||||
|
det = quant.det
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetArtCard quant num = {
|
||||||
|
s = \\b,g => quant.s ! num.n ! b ! g ++ num.s ! g ;
|
||||||
|
n = num.n ;
|
||||||
|
det = quant.det
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetArtSg det cn =
|
||||||
|
let
|
||||||
|
g = cn.g ;
|
||||||
|
n = Sg ;
|
||||||
|
m = cn.isMod ;
|
||||||
|
dd = case <det.det,detDef,m> of {
|
||||||
|
<DDef Def, Indef, True> => DDef Indef ;
|
||||||
|
<d,_,_> => d
|
||||||
|
}
|
||||||
|
in {
|
||||||
|
s = \\c => det.s ! n ! cn.isMod ! cn.g ++
|
||||||
|
cn.s ! n ! dd ! caseNP c ;
|
||||||
|
a = agrP3 g n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetArtPl det cn =
|
||||||
|
let
|
||||||
|
g = cn.g ;
|
||||||
|
n = Pl ;
|
||||||
|
m = cn.isMod ;
|
||||||
|
dd = case <det.det,detDef,m> of {
|
||||||
|
<DDef Def, Indef, True> => DDef Indef ;
|
||||||
|
<d,_,_> => d
|
||||||
|
}
|
||||||
|
in {
|
||||||
|
s = \\c => det.s ! n ! cn.isMod ! cn.g ++
|
||||||
|
cn.s ! n ! dd ! caseNP c ;
|
||||||
|
a = agrP3 g n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
PossPron p = {
|
PossPron p = {
|
||||||
s = \\n,_,g => p.s ! NPPoss (gennum g n) ;
|
s = \\n,_,g => p.s ! NPPoss (gennum g n) ;
|
||||||
det = DDef Indef
|
det = DDef Indef
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
NumCard c = c ** {isDet = True} ;
|
||||||
|
|
||||||
NumSg = {s = \\_ => [] ; isDet = False ; n = Sg} ;
|
NumSg = {s = \\_ => [] ; isDet = False ; n = Sg} ;
|
||||||
NumPl = {s = \\_ => [] ; isDet = False ; n = Pl} ;
|
NumPl = {s = \\_ => [] ; isDet = False ; n = Pl} ;
|
||||||
|
|
||||||
NumDigits nu = {s = \\g => nu.s ! NCard g ; isDet = True ; n = nu.n} ;
|
NumDigits nu = {s = \\g => nu.s ! NCard g ; n = nu.n} ;
|
||||||
OrdDigits nu = {s = nu.s ! NOrd SupWeak ; isDet = True} ;
|
OrdDigits nu = {s = nu.s ! NOrd SupWeak} ;
|
||||||
|
|
||||||
NumNumeral nu = {s = \\g => nu.s ! NCard g ; isDet = True ; n = nu.n} ;
|
NumNumeral nu = {s = \\g => nu.s ! NCard g ; n = nu.n} ;
|
||||||
OrdNumeral nu = {s = nu.s ! NOrd SupWeak ; isDet = True} ;
|
OrdNumeral nu = {s = nu.s ! NOrd SupWeak} ;
|
||||||
|
|
||||||
AdNum adn num = {s = \\g => adn.s ++ num.s ! g ; isDet = True ; n = num.n} ;
|
AdNum adn num = {s = \\g => adn.s ++ num.s ! g ; isDet = True ; n = num.n} ;
|
||||||
|
|
||||||
@@ -88,9 +150,12 @@ incomplete concrete NounScand of Noun =
|
|||||||
} ;
|
} ;
|
||||||
det = DIndef
|
det = DIndef
|
||||||
} ;
|
} ;
|
||||||
{-
|
|
||||||
MassDet = {s = \\_,_,_ => [] ; n = Sg ; det = DIndef} ;
|
MassNP cn = {
|
||||||
-}
|
s = \\c => cn.s ! Sg ! DIndef ! caseNP c ;
|
||||||
|
a = agrP3 cn.g Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
UseN, UseN2 = \noun -> {
|
UseN, UseN2 = \noun -> {
|
||||||
s = \\n,d,c => noun.s ! n ! specDet d ! c ;
|
s = \\n,d,c => noun.s ! n ! specDet d ! c ;
|
||||||
---- part app wo c shows editor bug. AR 8/7/2007
|
---- part app wo c shows editor bug. AR 8/7/2007
|
||||||
@@ -98,6 +163,20 @@ incomplete concrete NounScand of Noun =
|
|||||||
isMod = False
|
isMod = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
Use2N3 f = {
|
||||||
|
s = \\n,d,c => f.s ! n ! d ! Nom ;
|
||||||
|
g = f.g ;
|
||||||
|
c2 = f.c2 ;
|
||||||
|
isMod = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Use3N3 f = {
|
||||||
|
s = \\n,d,c => f.s ! n ! d ! Nom ;
|
||||||
|
g = f.g ;
|
||||||
|
c2 = f.c3 ;
|
||||||
|
isMod = False
|
||||||
|
} ;
|
||||||
|
|
||||||
-- The genitive of this $NP$ is not correct: "sonen till mig" (not "migs").
|
-- The genitive of this $NP$ is not correct: "sonen till mig" (not "migs").
|
||||||
|
|
||||||
ComplN2 f x = {
|
ComplN2 f x = {
|
||||||
@@ -126,6 +205,13 @@ incomplete concrete NounScand of Noun =
|
|||||||
g = g ;
|
g = g ;
|
||||||
isMod = cn.isMod
|
isMod = cn.isMod
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
RelNP np rs = {
|
||||||
|
s = \\c => np.s ! c ++ rs.s ! np.a ;
|
||||||
|
a = np.a ;
|
||||||
|
isMod = np.isMod
|
||||||
|
} ;
|
||||||
|
|
||||||
AdvCN cn sc = let g = cn.g in {
|
AdvCN cn sc = let g = cn.g in {
|
||||||
s = \\n,d,c => cn.s ! n ! d ! c ++ sc.s ;
|
s = \\n,d,c => cn.s ! n ! d ! c ++ sc.s ;
|
||||||
g = g ;
|
g = g ;
|
||||||
|
|||||||
@@ -69,13 +69,27 @@ incomplete concrete QuestionScand of Question =
|
|||||||
gn = ip.gn
|
gn = ip.gn
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
{-
|
IdetCN idet cn = let g = cn.g in {
|
||||||
IDetCN idet num ord cn = let g = cn.g in {
|
|
||||||
s = \\c =>
|
s = \\c =>
|
||||||
idet.s ! g ++ num.s ! g ++ ord.s ++ cn.s !idet.n ! idet.det ! caseNP c ;
|
idet.s ! g ++ cn.s ! idet.n ! idet.det ! caseNP c ;
|
||||||
gn = gennum g idet.n
|
gn = gennum g idet.n
|
||||||
} ;
|
} ;
|
||||||
-}
|
|
||||||
|
IdetIP idet =
|
||||||
|
let
|
||||||
|
g = Neutr ;
|
||||||
|
in {
|
||||||
|
s = \\c => idet.s ! g ;
|
||||||
|
gn = (agrP3 g idet.n).gn
|
||||||
|
} ;
|
||||||
|
|
||||||
|
IdetQuant idet num = {
|
||||||
|
s = \\g => idet.s ! num.n ! g ++ num.s ! g ;
|
||||||
|
n = num.n ;
|
||||||
|
det = idet.det
|
||||||
|
} ;
|
||||||
|
|
||||||
CompIAdv a = {s = \\_ => a.s} ;
|
CompIAdv a = {s = \\_ => a.s} ;
|
||||||
|
CompIP ip = {s = \\_ => ip.s ! nominative} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,19 +16,13 @@ incomplete concrete SentenceScand of Sentence =
|
|||||||
in
|
in
|
||||||
verb.fin ++ vp.a1 ! pol ++ verb.inf ++ vp.n2 ! agr ++ vp.a2 ++ vp.ext
|
verb.fin ++ vp.a1 ! pol ++ verb.inf ++ vp.n2 ! agr ++ vp.a2 ++ vp.ext
|
||||||
} ;
|
} ;
|
||||||
{-
|
|
||||||
SlashV2 np v2 =
|
SlashVP np vp =
|
||||||
mkClause
|
mkClause
|
||||||
(np.s ! nominative) np.a
|
(np.s ! nominative) np.a
|
||||||
(predV v2) **
|
vp **
|
||||||
{c2 = v2.c2} ;
|
{c2 = vp.c2} ;
|
||||||
|
|
||||||
SlashVVV2 np vv v2 =
|
|
||||||
mkClause
|
|
||||||
(np.s ! nominative) np.a
|
|
||||||
(insertObj (\\_ => vv.c2 ++ infVP (predV v2) np.a) (predV vv)) **
|
|
||||||
{c2 = v2.c2} ;
|
|
||||||
-}
|
|
||||||
AdvSlash slash adv = {
|
AdvSlash slash adv = {
|
||||||
s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
|
s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
|
||||||
c2 = slash.c2
|
c2 = slash.c2
|
||||||
@@ -62,4 +56,7 @@ 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} ;
|
||||||
|
|
||||||
|
RelS s r = {s = \\o => s.s ! o ++ "," ++ r.s ! agrP3 Neutr Sg} ; --- vilket
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,36 +4,38 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand i
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
UseV = predV ;
|
UseV = predV ;
|
||||||
{-
|
|
||||||
ComplV2 v np = insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v) ;
|
SlashV2a v = predV v ** {c2 = v.c2} ;
|
||||||
ComplV3 v np np2 =
|
|
||||||
insertObj
|
Slash2V3 v np =
|
||||||
(\\_ => v.c2 ++ np.s ! accusative ++ v.c3 ++ np2.s ! accusative)
|
insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v) ** {c2 = v.c3} ;
|
||||||
(predV v) ;
|
Slash3V3 v np =
|
||||||
-}
|
insertObj (\\_ => v.c3 ++ np.s ! accusative) (predV v) ** {c2 = v.c2} ;
|
||||||
|
|
||||||
ComplVV v vp = insertObj (\\a => v.c2 ++ infVP vp a) (predV v) ;
|
ComplVV v vp = insertObj (\\a => v.c2 ++ infVP vp a) (predV v) ;
|
||||||
ComplVS v s = insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ;
|
ComplVS v s = insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ;
|
||||||
ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
||||||
ComplVA v ap =
|
ComplVA v ap = insertObj (\\a => ap.s ! agrAdj a.gn DIndef) (predV v) ;
|
||||||
insertObj (\\a => ap.s ! agrAdj a.gn DIndef) (predV v) ;
|
|
||||||
{-
|
SlashV2V v vp =
|
||||||
ComplV2V v np vp =
|
insertObj (\\a => v.c3 ++ infVP vp a) (predV v) ** {c2 = v.c2} ;
|
||||||
insertObj
|
SlashV2S v s =
|
||||||
(\\a => v.c3 ++ infVP vp a)
|
insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ** {c2 = v.c2} ;
|
||||||
(insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v)) ;
|
SlashV2Q v q =
|
||||||
ComplV2S v np s =
|
insertObj (\\_ => q.s ! QIndir) (predV v) ** {c2 = v.c2} ;
|
||||||
insertObj
|
SlashV2A v ap =
|
||||||
(\\_ => conjThat ++ s.s ! Sub)
|
insertObj
|
||||||
(insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v)) ;
|
(\\a => ap.s ! agrAdj a.gn DIndef) (predV v) ** {c2 = v.c2} ; ---- agr to obj
|
||||||
ComplV2Q v np q =
|
|
||||||
insertObj
|
ComplSlash vp np = insertObj (\\_ => vp.c2 ++ np.s ! accusative) vp ;
|
||||||
(\\_ => q.s ! QIndir)
|
|
||||||
(insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v)) ;
|
SlashVV v vp =
|
||||||
ComplV2A v np ap =
|
insertObj (\\a => v.c2 ++ infVP vp a) (predV v) ** {c2 = vp.c2} ;
|
||||||
insertObj
|
SlashV2VNP v np vp =
|
||||||
(\\_ => ap.s ! agrAdj np.a.gn DIndef)
|
insertObj
|
||||||
(insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v)) ;
|
(\\a => vp.c2 ++ np.s ! accusative ++ v.c3 ++ infVP vp a) (predV v)
|
||||||
-}
|
** {c2 = v.c2} ;
|
||||||
|
|
||||||
UseComp comp = insertObj (\\a => comp.s ! agrAdj a.gn DIndef) (predV verbBe) ;
|
UseComp comp = insertObj (\\a => comp.s ! agrAdj a.gn DIndef) (predV verbBe) ;
|
||||||
|
|
||||||
CompAP ap = ap ;
|
CompAP ap = ap ;
|
||||||
@@ -44,7 +46,7 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand i
|
|||||||
AdVVP adv vp = insertAdV adv.s vp ;
|
AdVVP adv vp = insertAdV adv.s vp ;
|
||||||
|
|
||||||
|
|
||||||
---- ReflV2 v = insertObj (\\a => v.c2 ++ reflPron a) (predV v) ;
|
ReflVP vp = insertObj (\\a => vp.c2 ++ reflPron a) vp ;
|
||||||
|
|
||||||
PassV2 v =
|
PassV2 v =
|
||||||
insertObj
|
insertObj
|
||||||
|
|||||||
@@ -100,8 +100,13 @@ concrete StructuralSwe of Structural = CatSwe **
|
|||||||
when_IAdv = ss "när" ;
|
when_IAdv = ss "när" ;
|
||||||
when_Subj = ss "när" ;
|
when_Subj = ss "när" ;
|
||||||
where_IAdv = ss "var" ;
|
where_IAdv = ss "var" ;
|
||||||
-- whichPl_IDet = {s = \\_ => "vilka" ; n = Pl ; det = DIndef} ;
|
which_IQuant = {
|
||||||
-- whichSg_IDet = {s = genderForms "vilken" "vilket" ; n = Sg ; det = DIndef} ;
|
s = table {
|
||||||
|
Sg => genderForms "vilken" "vilket" ;
|
||||||
|
Pl => \\_ => "vilka"
|
||||||
|
} ;
|
||||||
|
det = DIndef
|
||||||
|
} ;
|
||||||
whoSg_IP = {s = vem.s ; gn = SgUtr} ;
|
whoSg_IP = {s = vem.s ; gn = SgUtr} ;
|
||||||
whoPl_IP = {s = \\_ => "vilka" ; gn = Plg} ;
|
whoPl_IP = {s = \\_ => "vilka" ; gn = Plg} ;
|
||||||
why_IAdv = ss "varför" ;
|
why_IAdv = ss "varför" ;
|
||||||
|
|||||||
Reference in New Issue
Block a user