forked from GitHub/gf-core
corrected the treatment of passives in Fin
This commit is contained in:
@@ -97,4 +97,22 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
|
||||
N3 = SNoun ** {c2,c3 : Compl ; isPre,isPre2 : Bool} ;
|
||||
PN = SPN ;
|
||||
|
||||
linref
|
||||
SSlash = \ss -> ss.s ++ ss.c2.s ;
|
||||
ClSlash = \cls -> cls.s ! Pres ! Simul ! Pos ++ cls.c2.s ;
|
||||
|
||||
VP = vpRef ;
|
||||
VPSlash = \vps -> vpRef vps ++ vps.c2.s ;
|
||||
|
||||
V, VS, VQ, VA = \v -> vpRef (predV v) ;
|
||||
V2, V2A, V2Q, V2S = \v -> vpRef (predV v) ++ v.c2.s ;
|
||||
V3 = \v -> vpRef (predV v) ++ v.c2.s ++ v.c3.s ;
|
||||
VV = \v -> vpRef (predV v) ;
|
||||
V2V = \v -> vpRef (predV v) ++ v.c2.s ;
|
||||
|
||||
Conj = \c -> c.s1 ++ c.s2 ;
|
||||
|
||||
oper
|
||||
vpRef : StemFin.VP -> Str = \vp -> infVP (NPCase Nom) Pos (agrP3 Sg) vp Inf1 ;
|
||||
|
||||
}
|
||||
|
||||
@@ -233,35 +233,26 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
|
||||
kohan_Part = mkPart "kohan" "köhän" ;
|
||||
pahan_Part = mkPart "pahan" "pähän" ;
|
||||
|
||||
PassVPSlash vp = {
|
||||
s = vp.s ; ---- TODO
|
||||
PassVPSlash vp = passVP vp vp.c2.c ;
|
||||
|
||||
{- -----
|
||||
s = \\vif,ant,pol,agr => case vif of {
|
||||
VIFin t => vp.s ! VIPass t ! ant ! pol ! agr ;
|
||||
_ => vp.s ! vif ! ant ! pol ! agr
|
||||
} ;
|
||||
-}
|
||||
s2 = vp.s2 ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
h = vp.h ;
|
||||
isNeg = vp.isNeg ;
|
||||
sc = case vp.c2.c of {NPCase Nom => NPAcc ; c => c}
|
||||
} ;
|
||||
|
||||
---- uses inversion of active: Guernican maalasi Picasso. TODO: use the agent participle
|
||||
---- TODO maybe squeeze s2 between the fin and inf (but this is subtle)
|
||||
---- sinua olen rakastanut minä -> sinua olen minä rakastanus
|
||||
-- advantage though: works for all V2 verbs, need not be transitive
|
||||
|
||||
PassAgentVPSlash vp np = {
|
||||
s = vp.s ; ---- TODO
|
||||
---- s = \\vif,ant,pol,agr => vp.s ! vif ! ant ! pol ! np.a ; -- only agr changes
|
||||
s = {s = vp.s.s ; h = vp.s.h ; p = vp.s.p ; sc = vp.c2.c} ;
|
||||
s2 = \\b,p,a => np.s ! NPCase Nom ++ vp.s2 ! b ! p ! a ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
h = vp.h ;
|
||||
isNeg = vp.isNeg ;
|
||||
sc = vp.c2.c -- advantage: works for all V2 verbs, need not be transitive
|
||||
vptyp = vp.vptyp ;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -37,23 +37,7 @@ concrete IdiomFin of Idiom = CatFin **
|
||||
|
||||
ImpersCl vp = mkClause noSubj (agrP3 Sg) vp ;
|
||||
|
||||
---- TODO properlu
|
||||
GenericCl vp = mkClause noSubj (agrP3 Sg) {
|
||||
{- ----
|
||||
s = \\vif,ant,pol,agr => case vif of {
|
||||
VIFin t => vp.s ! VIPass t ! ant ! pol ! agr ;
|
||||
_ => vp.s ! vif ! ant ! pol ! agr
|
||||
} ;
|
||||
-}
|
||||
s = vp.s ; ----
|
||||
|
||||
s2 = vp.s2 ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
sc = vp.sc ;
|
||||
h = vp.h ;
|
||||
isNeg = vp.isNeg
|
||||
} ;
|
||||
GenericCl vp = mkClause noSubj (agrP3 Sg) (passVP vp (NPCase Nom)) ;
|
||||
|
||||
ProgrVP vp =
|
||||
let
|
||||
@@ -64,8 +48,7 @@ concrete IdiomFin of Idiom = CatFin **
|
||||
s2 = \\b,p,a => inf ++ vp.s2 ! b ! p ! a ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
sc = vp.sc ;
|
||||
h = vp.h ; isNeg = vp.isNeg
|
||||
vptyp = vp.vptyp ;
|
||||
} ;
|
||||
|
||||
ImpPl1 vp =
|
||||
|
||||
@@ -5,7 +5,7 @@ concrete SentenceFin of Sentence = CatFin ** open Prelude, ResFin, StemFin in {
|
||||
|
||||
lin
|
||||
|
||||
PredVP np vp = mkClausePol (orB np.isNeg vp.isNeg) (subjForm np vp.s.sc) np.a vp ;
|
||||
PredVP np vp = mkClausePol (orB np.isNeg vp.vptyp.isNeg) (subjForm np vp.s.sc) np.a vp ;
|
||||
|
||||
PredSCVP sc vp = mkClause (\_ -> sc.s) (agrP3 Sg) vp ;
|
||||
|
||||
|
||||
@@ -177,8 +177,10 @@ oper
|
||||
s2 : Bool => Polarity => Agr => Str ; -- talo/talon/taloa
|
||||
adv : Polarity => Str ; -- ainakin/ainakaan
|
||||
ext : Str ;
|
||||
isNeg : Bool ; -- True if some complement is negative
|
||||
vptyp : {isNeg : Bool ; isPass : Bool} ;-- True if some complement is negative, and if the verb is rendered in the passive
|
||||
} ;
|
||||
|
||||
defaultVPTyp = {isNeg = False ; isPass = False} ;
|
||||
|
||||
HVerb : Type = Verb ** {sc : NPForm ; h : Harmony ; p : Str} ;
|
||||
|
||||
@@ -187,7 +189,7 @@ oper
|
||||
s2 = \\_,_,_ => [] ;
|
||||
adv = \\_ => verb.p ; -- the particle of the verb
|
||||
ext = [] ;
|
||||
isNeg = False
|
||||
vptyp = defaultVPTyp ;
|
||||
} ;
|
||||
|
||||
old_VP = {
|
||||
@@ -200,10 +202,11 @@ oper
|
||||
h : Harmony
|
||||
} ;
|
||||
|
||||
vp2old_vp : VP -> old_VP = \vp -> let verb = vp.s in {
|
||||
s = \\vi,ant,b,agr0 =>
|
||||
vp2old_vp : VP -> old_VP = \vp ->
|
||||
let
|
||||
verb = vp.s ;
|
||||
sverb : VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} = \\vi,ant,b,agr0 =>
|
||||
let
|
||||
|
||||
agr = verbAgr agr0 ;
|
||||
verbs = verb.s ;
|
||||
part : Str = case vi of {
|
||||
@@ -267,14 +270,21 @@ oper
|
||||
VIPass Fut => mkvf (PassPresn passPol) ; --# notpresent
|
||||
VIPass Pres => mkvf (PassPresn passPol) ;
|
||||
VIInf i => mkvf (Inf i)
|
||||
} ;
|
||||
|
||||
}
|
||||
in {
|
||||
s = case vp.vptyp.isPass of {
|
||||
True => \\vif,ant,pol,agr => case vif of {
|
||||
VIFin t => sverb ! VIPass t ! ant ! pol ! agr ;
|
||||
_ => sverb ! vif ! ant ! pol ! agr
|
||||
} ;
|
||||
_ => sverb
|
||||
} ;
|
||||
s2 = vp.s2 ;
|
||||
adv = vp.adv ; -- the particle of the verb
|
||||
ext = vp.ext ;
|
||||
sc = verb.sc ;
|
||||
h = verb.h ;
|
||||
isNeg = vp.isNeg
|
||||
isNeg = vp.vptyp.isNeg
|
||||
} ;
|
||||
|
||||
insertObj : (Bool => Polarity => Agr => Str) -> VP -> VP = \obj,vp -> {
|
||||
@@ -284,7 +294,7 @@ oper
|
||||
ext = vp.ext ;
|
||||
sc = vp.sc ;
|
||||
h = vp.h ;
|
||||
isNeg = vp.isNeg
|
||||
vptyp = vp.vptyp
|
||||
} ;
|
||||
|
||||
insertObjPre : Bool -> (Bool -> Polarity -> Agr -> Str) -> VP -> VP = \isNeg, obj,vp -> {
|
||||
@@ -292,9 +302,7 @@ oper
|
||||
s2 = \\fin,b,a => obj fin b a ++ vp.s2 ! fin ! b ! a ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
sc = vp.sc ;
|
||||
h = vp.h ;
|
||||
isNeg = orB vp.isNeg isNeg
|
||||
vptyp = {isNeg = orB vp.vptyp.isNeg isNeg ; isPass = vp.vptyp.isPass} ;
|
||||
} ;
|
||||
|
||||
insertAdv : (Polarity => Str) -> VP -> VP = \adv,vp -> {
|
||||
@@ -304,7 +312,15 @@ oper
|
||||
adv = \\b => vp.adv ! b ++ adv ! b ;
|
||||
sc = vp.sc ;
|
||||
h = vp.h ;
|
||||
isNeg = vp.isNeg --- missään
|
||||
vptyp = vp.vptyp --- missään
|
||||
} ;
|
||||
|
||||
passVP : VP -> NPForm -> VP = \vp,sc -> {
|
||||
s = {s = vp.s.s ; h = vp.s.h ; p = vp.s.p ; sc = sc} ; -- minusta pidetään ---- TODO minun päälleni katsotaan
|
||||
s2 = vp.s2 ;
|
||||
ext = vp.ext ;
|
||||
adv = vp.adv ;
|
||||
vptyp = {isNeg = vp.vptyp.isNeg ; isPass = True} ;
|
||||
} ;
|
||||
|
||||
insertExtrapos : Str -> VP -> VP = \obj,vp -> {
|
||||
@@ -314,7 +330,7 @@ oper
|
||||
adv = vp.adv ;
|
||||
sc = vp.sc ;
|
||||
h = vp.h ;
|
||||
isNeg = vp.isNeg
|
||||
vptyp = vp.vptyp
|
||||
} ;
|
||||
|
||||
mkClausePol : Bool -> (Polarity -> Str) -> Agr -> VP -> Clause =
|
||||
|
||||
@@ -81,22 +81,16 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in {
|
||||
|
||||
ReflVP v = insertObjPre False (\fin,b,agr -> appCompl fin b v.c2 (reflPron agr)) v ;
|
||||
|
||||
PassV2 v = let vp = predSV v in {
|
||||
---- TODO
|
||||
PassV2 v = passVP (predSV v) v.c2.c ;
|
||||
|
||||
{- ----
|
||||
s = \\vif,ant,pol,agr => case vif of {
|
||||
VIFin t => vp.s ! VIPass t ! ant ! pol ! agr ;
|
||||
_ => vp.s ! vif ! ant ! pol ! agr
|
||||
} ;
|
||||
-}
|
||||
s = vp.s ;
|
||||
s2 = \\_,_,_ => [] ;
|
||||
adv = \\_ => [] ;
|
||||
ext = [] ;
|
||||
h = vp.h ;
|
||||
isNeg = False ;
|
||||
sc = v.c2.c ; -- minut valitaan ; minua rakastetaan ; minulle kuiskataan
|
||||
} ; ---- talon valitaan: should be marked like inf.
|
||||
-}
|
||||
|
||||
CompAP ap = {
|
||||
s = \\agr =>
|
||||
|
||||
@@ -418,8 +418,6 @@ oper
|
||||
|
||||
predSV : SVerb1 -> VP = predV ;
|
||||
|
||||
---- \sv -> predV (sverb2verbSep sv ** {p = sv.p ; sc = sv.sc ; h = sv.h}) ;
|
||||
|
||||
|
||||
-- word formation functions
|
||||
|
||||
@@ -530,17 +528,17 @@ oper
|
||||
s2 : Bool => Polarity => Agr => Str ; -- talo/talon/taloa
|
||||
adv : Polarity => Str ; -- ainakin/ainakaan
|
||||
ext : Str ;
|
||||
isNeg : Bool ; -- True if some complement is negative
|
||||
vptyp : {isNeg : Bool ; isPass : Bool} ;-- True if some complement is negative, and if the verb is rendered in the passive
|
||||
} ;
|
||||
|
||||
-- HVerb : Type = Verb ** {sc : NPForm ; h : Harmony ; p : Str} ;
|
||||
|
||||
defaultVPTyp = {isNeg = False ; isPass = False} ;
|
||||
|
||||
predV : SVerb1 -> VP = \verb -> {
|
||||
s = verb ;
|
||||
s2 = \\_,_,_ => [] ;
|
||||
adv = \\_ => verb.p ; -- the particle of the verb
|
||||
ext = [] ;
|
||||
isNeg = False
|
||||
vptyp = defaultVPTyp ;
|
||||
} ;
|
||||
|
||||
old_VP = {
|
||||
@@ -553,10 +551,11 @@ oper
|
||||
h : Harmony
|
||||
} ;
|
||||
|
||||
vp2old_vp : VP -> old_VP = \vp -> let verb = sverb2verbSep vp.s in {
|
||||
s = \\vi,ant,b,agr0 =>
|
||||
vp2old_vp : VP -> old_VP = \vp ->
|
||||
let
|
||||
verb = sverb2verbSep vp.s ;
|
||||
sverb : VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} = \\vi,ant,b,agr0 =>
|
||||
let
|
||||
|
||||
agr = verbAgr agr0 ;
|
||||
verbs = verb.s ;
|
||||
part : Str = case vi of {
|
||||
@@ -620,16 +619,24 @@ oper
|
||||
VIPass Fut => mkvf (PassPresn passPol) ; --# notpresent
|
||||
VIPass Pres => mkvf (PassPresn passPol) ;
|
||||
VIInf i => mkvf (Inf i)
|
||||
} ;
|
||||
|
||||
}
|
||||
in {
|
||||
s = case vp.vptyp.isPass of {
|
||||
True => \\vif,ant,pol,agr => case vif of {
|
||||
VIFin t => sverb ! VIPass t ! ant ! pol ! agr ;
|
||||
_ => sverb ! vif ! ant ! pol ! agr
|
||||
} ;
|
||||
_ => sverb
|
||||
} ;
|
||||
s2 = vp.s2 ;
|
||||
adv = vp.adv ; -- the particle of the verb
|
||||
ext = vp.ext ;
|
||||
sc = vp.s.sc ;
|
||||
h = vp.s.h ;
|
||||
isNeg = vp.isNeg
|
||||
isNeg = vp.vptyp.isNeg
|
||||
} ;
|
||||
|
||||
|
||||
insertObj : (Bool => Polarity => Agr => Str) -> VP -> VP = \obj,vp -> {
|
||||
s = vp.s ;
|
||||
s2 = \\fin,b,a => vp.s2 ! fin ! b ! a ++ obj ! fin ! b ! a ;
|
||||
@@ -637,7 +644,7 @@ oper
|
||||
ext = vp.ext ;
|
||||
sc = vp.sc ;
|
||||
h = vp.h ;
|
||||
isNeg = vp.isNeg
|
||||
vptyp = vp.vptyp
|
||||
} ;
|
||||
|
||||
insertObjPre : Bool -> (Bool -> Polarity -> Agr -> Str) -> VP -> VP = \isNeg, obj,vp -> {
|
||||
@@ -645,9 +652,7 @@ oper
|
||||
s2 = \\fin,b,a => obj fin b a ++ vp.s2 ! fin ! b ! a ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
sc = vp.sc ;
|
||||
h = vp.h ;
|
||||
isNeg = orB vp.isNeg isNeg
|
||||
vptyp = {isNeg = orB vp.vptyp.isNeg isNeg ; isPass = vp.vptyp.isPass} ;
|
||||
} ;
|
||||
|
||||
insertAdv : (Polarity => Str) -> VP -> VP = \adv,vp -> {
|
||||
@@ -657,7 +662,15 @@ oper
|
||||
adv = \\b => vp.adv ! b ++ adv ! b ;
|
||||
sc = vp.sc ;
|
||||
h = vp.h ;
|
||||
isNeg = vp.isNeg --- missään
|
||||
vptyp = vp.vptyp --- missään
|
||||
} ;
|
||||
|
||||
passVP : VP -> NPForm -> VP = \vp,sc -> {
|
||||
s = {s = vp.s.s ; h = vp.s.h ; p = vp.s.p ; sc = sc} ; -- minusta pidetään ---- TODO minun päälleni katsotaan
|
||||
s2 = vp.s2 ;
|
||||
ext = vp.ext ;
|
||||
adv = vp.adv ;
|
||||
vptyp = {isNeg = vp.vptyp.isNeg ; isPass = True} ;
|
||||
} ;
|
||||
|
||||
insertExtrapos : Str -> VP -> VP = \obj,vp -> {
|
||||
@@ -667,7 +680,7 @@ oper
|
||||
adv = vp.adv ;
|
||||
sc = vp.sc ;
|
||||
h = vp.h ;
|
||||
isNeg = vp.isNeg
|
||||
vptyp = vp.vptyp
|
||||
} ;
|
||||
|
||||
mkClausePol : Bool -> (Polarity -> Str) -> Agr -> VP -> Clause =
|
||||
|
||||
Reference in New Issue
Block a user