mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-07 18:22:50 -06:00
fixed Scandinavian bugs in exx-resource
This commit is contained in:
@@ -19,12 +19,12 @@ incomplete concrete AdjectiveScand of Adjective =
|
||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||
|
||||
ComplA2 a np = {
|
||||
s = \\ap => a.s ! AF (APosit ap) Nom ++ a.c2 ++ np.s ! accusative ;
|
||||
s = \\ap => a.s ! AF (APosit ap) Nom ++ a.c2.s ++ np.s ! accusative ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
ReflA2 a = {
|
||||
s = \\ap => a.s ! AF (APosit ap) Nom ++ a.c2 ++
|
||||
s = \\ap => a.s ! AF (APosit ap) Nom ++ a.c2.s ++
|
||||
reflPron (agrP3 utrum Sg) ; ----
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
@@ -10,12 +10,15 @@ incomplete concrete CatScand of Cat =
|
||||
S = {s : Order => Str} ;
|
||||
QS = {s : QForm => Str} ;
|
||||
RS = {s : Agr => Str ; c : NPForm} ;
|
||||
SSlash = {s : Order => Str} ** {c2 : Str} ;
|
||||
SSlash = {s : Order => Str} ** {c2 : Complement} ;
|
||||
|
||||
-- Sentence
|
||||
|
||||
Cl = {s : R.Tense => Anteriority => Polarity => Order => Str} ;
|
||||
ClSlash = {s : R.Tense => Anteriority => Polarity => Order => Str} ** {c2 : Str} ;
|
||||
ClSlash = {
|
||||
s : R.Tense => Anteriority => Polarity => Order => Str ;
|
||||
c2 : Complement
|
||||
} ;
|
||||
Imp = {s : Polarity => Number => Str} ;
|
||||
|
||||
-- Question
|
||||
@@ -44,7 +47,7 @@ incomplete concrete CatScand of Cat =
|
||||
ext : Str ; -- S-Ext att hon går ---s7
|
||||
en2,ea2,eext : Bool -- indicate if the field exists
|
||||
} ;
|
||||
VPSlash = CommonScand.VP ** {c2 : Str} ;
|
||||
VPSlash = CommonScand.VP ** {c2 : Complement} ;
|
||||
Comp = {s : AFormPos => Str} ;
|
||||
|
||||
|
||||
@@ -63,7 +66,7 @@ incomplete concrete CatScand of Cat =
|
||||
NP,Pron = {s : NPForm => Str ; a : Agr} ;
|
||||
Det = {s : Bool => Gender => Str ; n : Number ; det : DetSpecies} ;
|
||||
Quant = {s : Number => Bool => Gender => Str ; det : DetSpecies} ;
|
||||
Art = {s : Number => Bool => Gender => Str ; det : DetSpecies} ;
|
||||
Art = {s : Number => Bool => Bool => Gender => Str ; det : DetSpecies} ;
|
||||
Predet = {s : GenNum => Str} ;
|
||||
Num = {s : Gender => Str ; isDet : Bool ; n : Number} ;
|
||||
Card = {s : Gender => Str ; n : Number} ;
|
||||
@@ -83,17 +86,17 @@ incomplete concrete CatScand of Cat =
|
||||
-- Open lexical classes, e.g. Lexicon
|
||||
|
||||
V, VS, VQ, VA = Verb ;
|
||||
V2, VV, V2Q, V2S, V2A = Verb ** {c2 : Str} ;
|
||||
V3, V2V = Verb ** {c2,c3 : Str} ;
|
||||
V2, VV, V2Q, V2S, V2A = Verb ** {c2 : Complement} ;
|
||||
V3, V2V = Verb ** {c2,c3 : Complement} ;
|
||||
|
||||
A = Adjective ** {isComp : Bool} ;
|
||||
-- {s : AForm => Str} ;
|
||||
A2 = Adjective ** {isComp : Bool ; c2 : Str} ;
|
||||
A2 = Adjective ** {isComp : Bool ; c2 : Complement} ;
|
||||
|
||||
N = Noun ;
|
||||
-- {s : Number => Species => Case => Str ; g : Gender} ;
|
||||
N2 = Noun ** {c2 : Str} ;
|
||||
N3 = Noun ** {c2,c3 : Str} ;
|
||||
N2 = Noun ** {c2 : Complement} ;
|
||||
N3 = Noun ** {c2,c3 : Complement} ;
|
||||
PN = {s : Case => Str ; g : Gender} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -59,11 +59,13 @@ param
|
||||
--- AdjPronForm = APron GenNum Case ;
|
||||
--- AuxVerbForm = AuxInf | AuxPres | AuxPret | AuxSup ;
|
||||
|
||||
RCase = RNom | RGen | RPrep ;
|
||||
RCase = RNom | RGen | RPrep Bool ;
|
||||
|
||||
RAgr = RNoAg | RAg {gn : GenNum ; p : Person} ;
|
||||
|
||||
oper
|
||||
Complement : Type = {s : Str ; hasPrep : Bool} ;
|
||||
|
||||
Agr : PType = {gn : GenNum ; p : Person} ;
|
||||
|
||||
nominative : NPForm = NPNom ;
|
||||
@@ -79,6 +81,13 @@ oper
|
||||
_ => Indef
|
||||
} ;
|
||||
|
||||
mkComplement : Str -> Complement = \s -> {
|
||||
s = s ;
|
||||
hasPrep = case s of {
|
||||
"" => False ;
|
||||
_ => True
|
||||
}
|
||||
} ;
|
||||
-- Used in $Noun.AdjCN$.
|
||||
|
||||
----- agrAdj : GenNum -> DetSpecies -> AFormPos = \gn,d -> Strong gn ; --- debug
|
||||
|
||||
@@ -69,14 +69,14 @@ incomplete concrete NounScand of Noun =
|
||||
} ;
|
||||
|
||||
DetArtOrd quant num ord = {
|
||||
s = \\b,g => quant.s ! num.n ! (orB b num.isDet) ! g ++
|
||||
s = \\b,g => quant.s ! num.n ! 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 ;
|
||||
s = \\b,g => quant.s ! num.n ! b ! True ! g ++ num.s ! g ;
|
||||
n = num.n ;
|
||||
det = quant.det
|
||||
} ;
|
||||
@@ -91,7 +91,7 @@ incomplete concrete NounScand of Noun =
|
||||
<d,_,_> => d
|
||||
}
|
||||
in {
|
||||
s = \\c => det.s ! n ! cn.isMod ! cn.g ++
|
||||
s = \\c => det.s ! n ! cn.isMod ! False ! cn.g ++
|
||||
cn.s ! n ! dd ! caseNP c ;
|
||||
a = agrP3 g n
|
||||
} ;
|
||||
@@ -106,7 +106,7 @@ incomplete concrete NounScand of Noun =
|
||||
<d,_,_> => d
|
||||
}
|
||||
in {
|
||||
s = \\c => det.s ! n ! cn.isMod ! cn.g ++
|
||||
s = \\c => det.s ! n ! cn.isMod ! False !cn.g ++
|
||||
cn.s ! n ! dd ! caseNP c ;
|
||||
a = agrP3 g n
|
||||
} ;
|
||||
@@ -139,14 +139,14 @@ incomplete concrete NounScand of Noun =
|
||||
} ;
|
||||
|
||||
DefArt = {
|
||||
s = \\n,b,g => if_then_Str b (artDef (gennum g n)) [] ;
|
||||
s = \\n,bm,bn,g => if_then_Str (orB bm bn) (artDef (gennum g n)) [] ;
|
||||
det = DDef Def
|
||||
} ;
|
||||
|
||||
IndefArt = {
|
||||
s = table {
|
||||
Sg => \\_ => artIndef ;
|
||||
Pl => \\_,_ => []
|
||||
Sg => \\_,bn,g => if_then_Str bn [] (artIndef ! g) ;
|
||||
Pl => \\_,bn,_ => []
|
||||
} ;
|
||||
det = DIndef
|
||||
} ;
|
||||
@@ -180,12 +180,12 @@ incomplete concrete NounScand of Noun =
|
||||
-- The genitive of this $NP$ is not correct: "sonen till mig" (not "migs").
|
||||
|
||||
ComplN2 f x = {
|
||||
s = \\n,d,c => f.s ! n ! specDet d ! Nom ++ f.c2 ++ x.s ! accusative ;
|
||||
s = \\n,d,c => f.s ! n ! specDet d ! Nom ++ f.c2.s ++ x.s ! accusative ;
|
||||
g = f.g ;
|
||||
isMod = False
|
||||
} ;
|
||||
ComplN3 f x = {
|
||||
s = \\n,d,c => f.s ! n ! d ! Nom ++ f.c2 ++ x.s ! accusative ;
|
||||
s = \\n,d,c => f.s ! n ! d ! Nom ++ f.c2.s ++ x.s ! accusative ;
|
||||
g = f.g ;
|
||||
c2 = f.c3 ;
|
||||
isMod = False
|
||||
@@ -207,7 +207,7 @@ incomplete concrete NounScand of Noun =
|
||||
} ;
|
||||
|
||||
RelNP np rs = {
|
||||
s = \\c => np.s ! c ++ rs.s ! np.a ;
|
||||
s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ;
|
||||
a = np.a ;
|
||||
isMod = np.isMod
|
||||
} ;
|
||||
|
||||
@@ -30,7 +30,7 @@ incomplete concrete QuestionScand of Question =
|
||||
s = \\t,a,p =>
|
||||
let
|
||||
cls = slash.s ! t ! a ! p ;
|
||||
who = slash.c2 ++ ip.s ! accusative --- stranding in ExtScand
|
||||
who = slash.c2.s ++ ip.s ! accusative --- stranding in ExtScand
|
||||
in table {
|
||||
QDir => who ++ cls ! Inv ;
|
||||
QIndir => who ++ cls ! Sub
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
incomplete concrete RelativeScand of Relative =
|
||||
CatScand ** open CommonScand, ResScand in {
|
||||
CatScand ** open CommonScand, ResScand, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
@@ -29,14 +29,15 @@ incomplete concrete RelativeScand of Relative =
|
||||
|
||||
RelSlash rp slash = {
|
||||
s = \\t,a,p,ag =>
|
||||
slash.c2 ++ rp.s ! ag.gn ! RPrep ++ slash.s ! t ! a ! p ! Sub ;
|
||||
slash.c2.s ++ rp.s ! ag.gn ! RPrep slash.c2.hasPrep ++
|
||||
slash.s ! t ! a ! p ! Sub ;
|
||||
c = NPAcc
|
||||
} ;
|
||||
|
||||
--- The case here could be genitive.
|
||||
|
||||
FunRP p np rp = {
|
||||
s = \\gn,c => np.s ! nominative ++ p.s ++ rp.s ! gn ! RPrep ;
|
||||
s = \\gn,c => np.s ! nominative ++ p.s ++ rp.s ! gn ! RPrep True ;
|
||||
a = RAg np.a
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
incomplete concrete SentenceScand of Sentence =
|
||||
CatScand ** open CommonScand, ResScand in {
|
||||
CatScand ** open CommonScand, ResScand, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
@@ -28,7 +28,7 @@ incomplete concrete SentenceScand of Sentence =
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
SlashPrep cl prep = cl ** {c2 = prep.s} ;
|
||||
SlashPrep cl prep = cl ** {c2 = {s = prep.s ; hasPrep = True}} ;
|
||||
|
||||
SlashVS np vs slash =
|
||||
mkClause
|
||||
|
||||
@@ -8,17 +8,17 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand i
|
||||
SlashV2a v = predV v ** {c2 = v.c2} ;
|
||||
|
||||
Slash2V3 v np =
|
||||
insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v) ** {c2 = v.c3} ;
|
||||
insertObj (\\_ => v.c2.s ++ np.s ! accusative) (predV v) ** {c2 = v.c3} ;
|
||||
Slash3V3 v np =
|
||||
insertObj (\\_ => v.c3 ++ np.s ! accusative) (predV v) ** {c2 = v.c2} ;
|
||||
insertObj (\\_ => v.c3.s ++ 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.s ++ infVP vp a) (predV v) ;
|
||||
ComplVS v s = insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ;
|
||||
ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
||||
ComplVA v ap = insertObj (\\a => ap.s ! agrAdj a.gn DIndef) (predV v) ;
|
||||
|
||||
SlashV2V v vp =
|
||||
insertObj (\\a => v.c3 ++ infVP vp a) (predV v) ** {c2 = v.c2} ;
|
||||
insertObj (\\a => v.c3.s ++ infVP vp a) (predV v) ** {c2 = v.c2} ;
|
||||
SlashV2S v s =
|
||||
insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ** {c2 = v.c2} ;
|
||||
SlashV2Q v q =
|
||||
@@ -27,13 +27,13 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand i
|
||||
insertObj
|
||||
(\\a => ap.s ! agrAdj a.gn DIndef) (predV v) ** {c2 = v.c2} ; ---- agr to obj
|
||||
|
||||
ComplSlash vp np = insertObj (\\_ => vp.c2 ++ np.s ! accusative) vp ;
|
||||
ComplSlash vp np = insertObj (\\_ => vp.c2.s ++ np.s ! accusative) vp ;
|
||||
|
||||
SlashVV v vp =
|
||||
insertObj (\\a => v.c2 ++ infVP vp a) (predV v) ** {c2 = vp.c2} ;
|
||||
insertObj (\\a => v.c2.s ++ infVP vp a) (predV v) ** {c2 = vp.c2} ;
|
||||
SlashV2VNP v np vp =
|
||||
insertObj
|
||||
(\\a => v.c2 ++ np.s ! accusative ++ v.c3 ++ infVP vp a) (predV v)
|
||||
(\\a => v.c2.s ++ np.s ! accusative ++ v.c3.s ++ infVP vp a) (predV v)
|
||||
** {c2 = v.c2} ;
|
||||
|
||||
UseComp comp = insertObj (\\a => comp.s ! agrAdj a.gn DIndef) (predV verbBe) ;
|
||||
@@ -46,7 +46,7 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand i
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
|
||||
|
||||
ReflVP vp = insertObj (\\a => vp.c2 ++ reflPron a) vp ;
|
||||
ReflVP vp = insertObj (\\a => vp.c2.s ++ reflPron a) vp ;
|
||||
|
||||
PassV2 v =
|
||||
insertObj
|
||||
|
||||
Reference in New Issue
Block a user