some ExtraFin functions to improve query language

This commit is contained in:
aarne
2011-09-19 14:36:59 +00:00
parent 15d7a6ed74
commit d1b32d0fef
3 changed files with 25 additions and 0 deletions

View File

@@ -20,6 +20,8 @@ concrete ConjunctionFin of Conjunction =
c = ss.c
} ;
ConjCN conj ss = conjunctDistrTable NForm conj ss ;
-- These fun's are generated from the list cat's.
BaseS = twoSS ;
@@ -32,6 +34,8 @@ concrete ConjunctionFin of Conjunction =
ConsAP xs x = consrTable2 Bool NForm comma xs x ;
BaseRS x y = twoTable Agr x y ** {c = y.c} ;
ConsRS xs x = consrTable Agr comma xs x ** {c = xs.c} ;
BaseCN x y = twoTable NForm x y ;
ConsCN xs x = consrTable NForm comma xs x ;
lincat
[S] = {s1,s2 : Str} ;
@@ -39,5 +43,6 @@ concrete ConjunctionFin of Conjunction =
[NP] = {s1,s2 : NPForm => Str ; a : Agr} ;
[AP] = {s1,s2 : Bool => NForm => Str} ;
[RS] = {s1,s2 : Agr => Str ; c : NPForm} ;
[CN] = {s1,s2 : NForm => Str} ;
}

View File

@@ -12,6 +12,7 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
isDef = True --- "Jussin kolme autoa ovat" ; thus "...on" is missing
} ;
GenCN n1 n2 = {s = \\nf => n1.s ! NPCase Gen ++ n2.s ! nf} ;
lincat
VPI = {s : Str} ;
@@ -48,6 +49,20 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
mkClause (\_ -> adv.s) np.a (insertObj
(\\_,b,_ => np.s ! NPCase Nom) (predV v)) ;
ICompExistNP adv np =
let cl = mkClause (\_ -> adv.s ! np.a) np.a (insertObj
(\\_,b,_ => np.s ! NPCase Nom) (predV (verbOlla ** {sc = NPCase Nom ; qp = True}))) ;
in {
s = \\t,a,p => cl.s ! t ! a ! p ! SDecl
} ;
IAdvPredNP iadv v np =
let cl = mkClause (\_ -> iadv.s) np.a (insertObj
(\\_,b,_ => np.s ! v.sc) (predV v)) ;
in {
s = \\t,a,p => cl.s ! t ! a ! p ! SDecl
} ;
x
-- i_implicPron = mkPronoun [] "minun" "minua" "minuna" "minuun" Sg P1 ;
whatPart_IP = {
s = table {

View File

@@ -3,9 +3,14 @@ abstract ExtraFinAbs = Extra [
VV,VP,Conj,NP,Quant,IAdv,IComp,ICompAP,IAdvAdv,Adv,AP, Pron, ProDrop] ** {
fun
GenCN : NP -> CN -> CN ; -- auton merkki
AdvExistNP : Adv -> NP -> Cl ; -- kuvassa olemme me
AdvPredNP : Adv -> V -> NP -> Cl ; -- kuvassa hymyilee Veikko
ICompExistNP : IComp -> NP -> QCl ; -- missä/kuka on Veikko
IAdvPredNP : IAdv -> V -> NP -> QCl ; -- mistä alkaa Ruotsi
RelExistNP : Prep -> RP -> NP -> RCl ; -- jossa on jazzia
-- i_implicPron : Pron ; -- (minä), minut, ...