mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-03 16:22:52 -06:00
English and Swedish resource functions for Query
This commit is contained in:
@@ -54,6 +54,11 @@ incomplete concrete AdjectiveScand of Adjective =
|
||||
isPre = ap.isPre
|
||||
} ;
|
||||
|
||||
AdvAP ap adv = {
|
||||
s = \\a => ap.s ! a ++ adv.s ;
|
||||
isPre = ap.isPre
|
||||
} ;
|
||||
|
||||
UseA2 a = {
|
||||
s = \\ap => a.s ! AF (APosit ap) Nom ;
|
||||
isPre = True
|
||||
|
||||
@@ -52,7 +52,7 @@ incomplete concrete CatScand of Cat =
|
||||
n3 : Agr => Str ; -- object-control complement
|
||||
c2 : Complement
|
||||
} ;
|
||||
Comp = {s : AFormPos => Str} ;
|
||||
Comp = {s : Agr => Str} ;
|
||||
|
||||
|
||||
-- Adjective
|
||||
|
||||
@@ -21,6 +21,12 @@ incomplete concrete ConjunctionScand of Conjunction =
|
||||
c = ss.c
|
||||
} ;
|
||||
|
||||
ConjIAdv = conjunctDistrSS ;
|
||||
|
||||
ConjCN co ns = conjunctDistrTable3 Number DetSpecies Case co ns **
|
||||
{g = utrum ; isMod = True} ; ----
|
||||
|
||||
|
||||
-- These fun's are generated from the list cat's.
|
||||
|
||||
BaseS = twoTable Order ;
|
||||
@@ -33,12 +39,18 @@ incomplete concrete ConjunctionScand of Conjunction =
|
||||
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} ;
|
||||
BaseIAdv = twoSS ;
|
||||
ConsIAdv = consrSS comma ;
|
||||
BaseCN = twoTable3 Number DetSpecies Case ;
|
||||
ConsCN = consrTable3 Number DetSpecies Case comma ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Order => Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[IAdv] = {s1,s2 : Str} ;
|
||||
[NP] = {s1,s2 : NPForm => Str ; a : Agr} ;
|
||||
[AP] = {s1,s2 : AFormPos => Str ; isPre : Bool} ;
|
||||
[RS] = {s1,s2 : Agr => Str ; c : NPForm} ;
|
||||
[CN] = {s1,s2 : Number => DetSpecies => Case => Str} ; --- g : NGender ; isMod : Bool} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -98,4 +98,23 @@ incomplete concrete QuestionScand of Question =
|
||||
CompIAdv a = {s = \\_ => a.s} ;
|
||||
CompIP ip = {s = \\_ => ip.s ! nominative} ;
|
||||
|
||||
lincat
|
||||
QVP = CommonScand.VP ;
|
||||
lin
|
||||
ComplSlashIP vp np = insertObj (\\_ => vp.c2.s ++ np.s ! accusative) vp ;
|
||||
AdvQVP vp adv = insertObjPost (\\_ => adv.s) vp ;
|
||||
AddAdvQVP vp adv = insertObjPost (\\_ => adv.s) vp ;
|
||||
|
||||
QuestQVP qp vp = {
|
||||
s = \\t,a,b,q =>
|
||||
let
|
||||
somo = case q of {
|
||||
QIndir => <"som",Sub> ;
|
||||
_ => <[], Main>
|
||||
} ;
|
||||
cl = mkClause (qp.s ! nominative ++ somo.p1) {g = qp.g ; n = qp.n ; p = P3} vp
|
||||
in
|
||||
cl.s ! t ! a ! b ! somo.p2
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -50,16 +50,15 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand i
|
||||
** {n3 = vp.n3 ; c2 = v.c2} ;
|
||||
|
||||
UseComp comp = insertObj
|
||||
(\\a => comp.s ! agrAdjNP a DIndef) (predV verbBe) ;
|
||||
comp.s (predV verbBe) ;
|
||||
|
||||
CompAP ap = ap ;
|
||||
CompAP ap = {s = \\a => ap.s ! agrAdjNP a DIndef} ;
|
||||
CompNP np = {s = \\_ => np.s ! accusative} ;
|
||||
CompAdv a = {s = \\_ => a.s} ;
|
||||
|
||||
AdvVP vp adv = insertAdv adv.s vp ;
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
|
||||
|
||||
ReflVP vp = insertObj (\\a => vp.c2.s ++ reflPron a ++ vp.n3 ! a) vp ;
|
||||
|
||||
PassV2 v =
|
||||
@@ -67,4 +66,12 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand i
|
||||
(\\a => v.s ! VI (VPtPret (agrAdjNP a DIndef) Nom))
|
||||
(predV verbBecome) ;
|
||||
|
||||
CompCN cn = {s = \\a => case a.n of {
|
||||
Sg => artIndef ! cn.g ++ cn.s ! Sg ! DIndef ! Nom ;
|
||||
Pl => cn.s ! Pl ! DIndef ! Nom
|
||||
}
|
||||
} ;
|
||||
|
||||
UseCopula = predV verbBe ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user