English and Swedish resource functions for Query

This commit is contained in:
aarne
2010-10-20 16:19:33 +00:00
parent 43cbc6693d
commit 8a29598f3c
16 changed files with 103 additions and 59 deletions

View File

@@ -50,4 +50,6 @@ concrete AdjectiveEng of Adjective = CatEng ** open ResEng, Prelude in {
isPre = True
} ;
AdvAP ap adv = {s = \\a => ap.s ! a ++ adv.s ; isPre = False} ;
}

View File

@@ -21,6 +21,10 @@ concrete ConjunctionEng of Conjunction =
c = ss.c
} ;
ConjIAdv = conjunctDistrSS ;
ConjCN co ns = conjunctDistrTable2 Number Case co ns ** {g = Neutr} ; --- gender?
-- These fun's are generated from the list cat's.
BaseS = twoSS ;
@@ -33,12 +37,18 @@ concrete ConjunctionEng of Conjunction =
ConsAP xs x = consrTable Agr 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 = twoTable2 Number Case ;
ConsCN = consrTable2 Number Case comma ;
lincat
[S] = {s1,s2 : Str} ;
[Adv] = {s1,s2 : Str} ;
[IAdv] = {s1,s2 : Str} ;
[NP] = {s1,s2 : Case => Str ; a : Agr} ;
[AP] = {s1,s2 : Agr => Str ; isPre : Bool} ;
[RS] = {s1,s2 : Agr => Str ; c : Case} ;
[CN] = {s1,s2 : Number => Case => Str} ;
}

View File

@@ -60,8 +60,9 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
{ s = table {
RC _ Gen => "whose" ;
RC _ _ => "that" ;
RPrep Neutr => "which" ;
RPrep _ => "whom"
_ => "that" ---- "in that" ?
-- RPrep Neutr => "which" ;
-- RPrep _ => "whom"
} ;
a = RNoAg
} ;
@@ -97,38 +98,10 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
IAdvAdv adv = {s = "how" ++ adv.s} ;
lincat
[CN] = {s1,s2 : Number => Case => Str} ;
lin
BaseCN = twoTable2 Number Case ;
ConsCN = consrTable2 Number Case comma ;
ConjCN co ns = conjunctDistrTable2 Number Case co ns ** {g = Neutr} ; --- gender?
PartVP vp = {
s = \\a => vp.ad ++ vp.prp ++ vp.s2 ! a ;
isPre = False ---- depends on whether there are complements
} ;
lincat
QVP = ResEng.VP ;
[IAdv] = {s1,s2 : Str} ;
lin
ComplSlashIP vp np = insertObjPre (\\_ => vp.c2 ++ np.s ! Acc) vp ;
AdvQVP vp adv = insertObj (\\_ => adv.s) vp ;
AddAdvQVP vp adv = insertObj (\\_ => adv.s) vp ;
QuestQVP qp vp =
let cl = mkClause (qp.s ! Nom) (agrP3 qp.n) vp
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ;
BaseIAdv = twoSS ;
ConsIAdv = consrSS comma ;
ConjIAdv = conjunctDistrSS ;
AdvAP ap adv = {s = \\a => ap.s ! a ++ adv.s ; isPre = False} ;
UseCopula = predAux auxBe ;
UttVPShort vp = {s = infVP True vp (agrP3 Sg)} ;
}

View File

@@ -54,4 +54,16 @@ concrete QuestionEng of Question = CatEng ** open ResEng, Prelude in {
CompIAdv a = a ;
CompIP p = ss (p.s ! Nom) ;
lincat
QVP = ResEng.VP ;
lin
ComplSlashIP vp np = insertObjPre (\\_ => vp.c2 ++ np.s ! Acc) vp ;
AdvQVP vp adv = insertObj (\\_ => adv.s) vp ;
AddAdvQVP vp adv = insertObj (\\_ => adv.s) vp ;
QuestQVP qp vp =
let cl = mkClause (qp.s ! Nom) (agrP3 qp.n) vp
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ;
}

View File

@@ -52,4 +52,6 @@ concrete VerbEng of Verb = CatEng ** open ResEng in {
}
} ;
UseCopula = predAux auxBe ;
}