mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-10 21:39:32 -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 =
|
||||
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 =
|
||||
mkClause (\_ -> adv.s) np.a (insertObj
|
||||
(\\_,b,_ => np.s ! NPCase Nom) (predV (verbOlla ** {sc = NPCase Nom ; qp = True}))) ;
|
||||
@@ -62,7 +99,7 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
|
||||
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 {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
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] ** {
|
||||
|
||||
fun
|
||||
|
||||
@@ -17,10 +17,11 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, Prelude in {
|
||||
let k = npform2case n c
|
||||
in
|
||||
case <n, c, det.isNum, det.isPoss, det.isDef> of {
|
||||
<_, NPAcc, True,_,_> => <Nom,NCase Sg Part> ; -- kolme kytkintä(ni)
|
||||
<_, NPCase Nom, 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) on
|
||||
<_, _, 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 Gen,_,True,_> => <k, NPossNom n> ; -- kytkime+ni vika
|
||||
<_, 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 ;
|
||||
in
|
||||
det.s1 ! k.p1 ++ cn.s ! k.p2 ++ det.s2 ;
|
||||
a = agrP3 (case det.isDef of {
|
||||
False => Sg ; -- autoja menee; kolme autoa menee
|
||||
a = agrP3 (case <det.isDef, det.isNum> of {
|
||||
<False,True> => Sg ; -- kolme kytkintä on
|
||||
_ => det.n
|
||||
}) ;
|
||||
isPron = False
|
||||
|
||||
@@ -281,19 +281,19 @@ lin
|
||||
not_Predet = {s = \\_,_ => "ei"} ;
|
||||
|
||||
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 ;
|
||||
} ;
|
||||
|
||||
if_then_Conj = {s1 = "jos" ; s2 = "niin" ; n = Sg} ;
|
||||
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 ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
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 ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
Reference in New Issue
Block a user