mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 16:42:51 -06:00
fixes in Fin: cases of plural indefinites; VPS and its conjunction; negative determiners (only work in negated sentences though)
This commit is contained in:
@@ -26,6 +26,43 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
|
|||||||
ComplVPIVV vv vpi =
|
ComplVPIVV vv vpi =
|
||||||
insertObj (\\_,_,_ => vpi.s) (predV vv) ;
|
insertObj (\\_,_,_ => vpi.s) (predV vv) ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
VPS = {
|
||||||
|
s : Agr => Str ;
|
||||||
|
sc : NPForm ; --- can be different for diff parts
|
||||||
|
qp : Bool -- True = back vowel --- can be different for diff parts
|
||||||
|
} ;
|
||||||
|
|
||||||
|
[VPS] = {
|
||||||
|
s1,s2 : Agr => Str ;
|
||||||
|
sc : NPForm ; --- take the first: minä osaan kutoa ja täytyy virkata
|
||||||
|
qp : Bool --- take the first: osaanko minä kutoa ja käyn koulua
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseVPS x y = twoTable Agr x y ** {sc = x.sc ; qp = x.qp} ;
|
||||||
|
ConsVPS x y = consrTable Agr comma x y ** {sc = x.sc ; qp = x.qp} ;
|
||||||
|
|
||||||
|
ConjVPS conj ss = conjunctDistrTable Agr conj ss ** {
|
||||||
|
sc = ss.sc ; qp = ss.qp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
MkVPS t p vp = { -- Temp -> Pol -> VP -> VPS ;
|
||||||
|
s = \\a => let vps = vp.s ! VIFin t.t ! t.a ! p.p ! a
|
||||||
|
in
|
||||||
|
t.s ++ p.s ++
|
||||||
|
vps.fin ++ vps.inf ++
|
||||||
|
vp.s2 ! True ! p.p ! a ++
|
||||||
|
vp.adv ! p.p ++
|
||||||
|
vp.ext ;
|
||||||
|
sc = vp.sc ;
|
||||||
|
qp = vp.qp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PredVPS np vps = { -- NP -> VPS -> S ;
|
||||||
|
s = subjForm np vps.sc Pos ++ vps.s ! np.a
|
||||||
|
} ;
|
||||||
|
|
||||||
AdvExistNP adv np =
|
AdvExistNP adv np =
|
||||||
mkClause (\_ -> adv.s) np.a (insertObj
|
mkClause (\_ -> adv.s) np.a (insertObj
|
||||||
(\\_,b,_ => np.s ! NPCase Nom) (predV (verbOlla ** {sc = NPCase Nom ; qp = True}))) ;
|
(\\_,b,_ => np.s ! NPCase Nom) (predV (verbOlla ** {sc = NPCase Nom ; qp = True}))) ;
|
||||||
@@ -62,7 +99,7 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
|
|||||||
in {
|
in {
|
||||||
s = \\t,a,p => cl.s ! t ! a ! p ! SDecl
|
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 {
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
abstract ExtraFinAbs = Extra [
|
abstract ExtraFinAbs = Extra [
|
||||||
GenNP,VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI,
|
GenNP,
|
||||||
|
VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI,
|
||||||
|
VPS,ListVPS,BaseVPS,ConsVPS,ConjVPS,MkVPS,PredVPS,ConjVPS,Temp,Pol,S,
|
||||||
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
|
||||||
|
|||||||
@@ -17,10 +17,11 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, Prelude in {
|
|||||||
let k = npform2case n c
|
let k = npform2case n c
|
||||||
in
|
in
|
||||||
case <n, c, det.isNum, det.isPoss, det.isDef> of {
|
case <n, c, det.isNum, det.isPoss, det.isDef> of {
|
||||||
<_, NPAcc, True,_,_> => <Nom,NCase Sg Part> ; -- kolme kytkintä(ni)
|
<_, NPAcc, True,_,_> => <Nom,NCase Sg Part> ; -- myin kolme kytkintä(ni)
|
||||||
<_, NPCase Nom, True,_,_> => <Nom,NCase Sg Part> ; -- kolme kytkintä(ni)
|
<_, NPCase Nom, True,_,_> => <Nom,NCase Sg Part> ; -- kolme kytkintä(ni) on
|
||||||
<_, _, True,False,_> => <k, NCase Sg k> ; -- kolmeksi kytkimeksi
|
<_, _, True,False,_> => <k, NCase Sg k> ; -- kolmeksi kytkimeksi
|
||||||
<Pl,NPCase Nom, _,_,False> => <k, NCase Pl Part> ; -- kytkimiä
|
<Pl,NPAcc, _, _, False> => <k, NCase Pl Part> ; -- myin kytkimiä
|
||||||
|
<_, NPAcc, _,True,_> => <k, NPossNom n> ; -- myin kytkime+ni
|
||||||
<_, NPCase Nom,_,True,_> => <k, NPossNom n> ; -- kytkime+ni on/ovat...
|
<_, NPCase Nom,_,True,_> => <k, NPossNom n> ; -- kytkime+ni on/ovat...
|
||||||
<_, NPCase Gen,_,True,_> => <k, NPossNom n> ; -- kytkime+ni vika
|
<_, NPCase Gen,_,True,_> => <k, NPossNom n> ; -- kytkime+ni vika
|
||||||
<_, NPCase Transl,_,True,_> => <k, NPossTransl n> ; -- kytkim(e|i)kse+ni
|
<_, NPCase Transl,_,True,_> => <k, NPossTransl n> ; -- kytkim(e|i)kse+ni
|
||||||
@@ -33,8 +34,8 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, Prelude in {
|
|||||||
k = ncase c ;
|
k = ncase c ;
|
||||||
in
|
in
|
||||||
det.s1 ! k.p1 ++ cn.s ! k.p2 ++ det.s2 ;
|
det.s1 ! k.p1 ++ cn.s ! k.p2 ++ det.s2 ;
|
||||||
a = agrP3 (case det.isDef of {
|
a = agrP3 (case <det.isDef, det.isNum> of {
|
||||||
False => Sg ; -- autoja menee; kolme autoa menee
|
<False,True> => Sg ; -- kolme kytkintä on
|
||||||
_ => det.n
|
_ => det.n
|
||||||
}) ;
|
}) ;
|
||||||
isPron = False
|
isPron = False
|
||||||
|
|||||||
@@ -281,19 +281,19 @@ lin
|
|||||||
not_Predet = {s = \\_,_ => "ei"} ;
|
not_Predet = {s = \\_,_ => "ei"} ;
|
||||||
|
|
||||||
no_Quant = heavyQuant {
|
no_Quant = heavyQuant {
|
||||||
s1 = \\n,c => "ei" ++ mikaanPron ! n ! c ;
|
s1 = \\n,c => mikaanPron ! n ! c ; --- requires negative or question polarity
|
||||||
s2 = [] ; isNum,isPoss = False ; isDef = True ;
|
s2 = [] ; isNum,isPoss = False ; isDef = True ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
if_then_Conj = {s1 = "jos" ; s2 = "niin" ; n = Sg} ;
|
if_then_Conj = {s1 = "jos" ; s2 = "niin" ; n = Sg} ;
|
||||||
nobody_NP = {
|
nobody_NP = {
|
||||||
s = \\c => "ei" ++ kukaanPron ! Sg ! npform2case Sg c ;
|
s = \\c => kukaanPron ! Sg ! npform2case Sg c ; --- requires negative or question polarity
|
||||||
a = agrP3 Sg ;
|
a = agrP3 Sg ;
|
||||||
isPron = False
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
nothing_NP = {
|
nothing_NP = {
|
||||||
s = \\c => "ei" ++ mikaanPron ! Sg ! npform2case Sg c ;
|
s = \\c => mikaanPron ! Sg ! npform2case Sg c ; --- requires negative or question polarity
|
||||||
a = agrP3 Sg ;
|
a = agrP3 Sg ;
|
||||||
isPron = False
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
Reference in New Issue
Block a user