mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 09:32:53 -06:00
some ExtraFin functions to improve query language
This commit is contained in:
@@ -20,6 +20,8 @@ concrete ConjunctionFin of Conjunction =
|
|||||||
c = ss.c
|
c = ss.c
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
ConjCN conj ss = conjunctDistrTable NForm conj ss ;
|
||||||
|
|
||||||
-- These fun's are generated from the list cat's.
|
-- These fun's are generated from the list cat's.
|
||||||
|
|
||||||
BaseS = twoSS ;
|
BaseS = twoSS ;
|
||||||
@@ -32,6 +34,8 @@ concrete ConjunctionFin of Conjunction =
|
|||||||
ConsAP xs x = consrTable2 Bool NForm comma xs x ;
|
ConsAP xs x = consrTable2 Bool NForm comma xs x ;
|
||||||
BaseRS x y = twoTable Agr x y ** {c = y.c} ;
|
BaseRS x y = twoTable Agr x y ** {c = y.c} ;
|
||||||
ConsRS xs x = consrTable Agr comma xs x ** {c = xs.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
|
lincat
|
||||||
[S] = {s1,s2 : Str} ;
|
[S] = {s1,s2 : Str} ;
|
||||||
@@ -39,5 +43,6 @@ concrete ConjunctionFin of Conjunction =
|
|||||||
[NP] = {s1,s2 : NPForm => Str ; a : Agr} ;
|
[NP] = {s1,s2 : NPForm => Str ; a : Agr} ;
|
||||||
[AP] = {s1,s2 : Bool => NForm => Str} ;
|
[AP] = {s1,s2 : Bool => NForm => Str} ;
|
||||||
[RS] = {s1,s2 : Agr => Str ; c : NPForm} ;
|
[RS] = {s1,s2 : Agr => Str ; c : NPForm} ;
|
||||||
|
[CN] = {s1,s2 : NForm => Str} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
|
|||||||
isDef = True --- "Jussin kolme autoa ovat" ; thus "...on" is missing
|
isDef = True --- "Jussin kolme autoa ovat" ; thus "...on" is missing
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
GenCN n1 n2 = {s = \\nf => n1.s ! NPCase Gen ++ n2.s ! nf} ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
VPI = {s : Str} ;
|
VPI = {s : Str} ;
|
||||||
@@ -48,6 +49,20 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
|
|||||||
mkClause (\_ -> adv.s) np.a (insertObj
|
mkClause (\_ -> adv.s) np.a (insertObj
|
||||||
(\\_,b,_ => np.s ! NPCase Nom) (predV v)) ;
|
(\\_,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 ;
|
-- i_implicPron = mkPronoun [] "minun" "minua" "minuna" "minuun" Sg P1 ;
|
||||||
whatPart_IP = {
|
whatPart_IP = {
|
||||||
s = table {
|
s = table {
|
||||||
|
|||||||
@@ -3,9 +3,14 @@ abstract ExtraFinAbs = Extra [
|
|||||||
VV,VP,Conj,NP,Quant,IAdv,IComp,ICompAP,IAdvAdv,Adv,AP, Pron, ProDrop] ** {
|
VV,VP,Conj,NP,Quant,IAdv,IComp,ICompAP,IAdvAdv,Adv,AP, Pron, ProDrop] ** {
|
||||||
|
|
||||||
fun
|
fun
|
||||||
|
GenCN : NP -> CN -> CN ; -- auton merkki
|
||||||
|
|
||||||
AdvExistNP : Adv -> NP -> Cl ; -- kuvassa olemme me
|
AdvExistNP : Adv -> NP -> Cl ; -- kuvassa olemme me
|
||||||
AdvPredNP : Adv -> V -> NP -> Cl ; -- kuvassa hymyilee Veikko
|
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
|
RelExistNP : Prep -> RP -> NP -> RCl ; -- jossa on jazzia
|
||||||
|
|
||||||
-- i_implicPron : Pron ; -- (minä), minut, ...
|
-- i_implicPron : Pron ; -- (minä), minut, ...
|
||||||
|
|||||||
Reference in New Issue
Block a user