From 20dcab32080ea191eb48a5dc6b76ad7de0fb5730 Mon Sep 17 00:00:00 2001 From: Aarne Ranta Date: Mon, 21 Aug 2023 19:44:20 +0300 Subject: [PATCH] some more infinitives and their interpretations in Fin --- src/finnish/infinitives/Infinitive.gf | 7 +- src/finnish/infinitives/InfinitiveFin.gf | 11 ++- .../infinitives/InterpretInfinitives.hs | 75 ++++++++++++------- 3 files changed, 62 insertions(+), 31 deletions(-) diff --git a/src/finnish/infinitives/Infinitive.gf b/src/finnish/infinitives/Infinitive.gf index d029d19d..f8f9cb91 100644 --- a/src/finnish/infinitives/Infinitive.gf +++ b/src/finnish/infinitives/Infinitive.gf @@ -33,7 +33,8 @@ fun Inf1LongRAdv : VP -> RAdv ; -- mennäkse (ni/si/...) - Inf2InessAdv : NP -> VP -> Adv ; -- junan mennessä + Inf2InessAdv : NP -> VP -> Adv ; -- junan mennessä + Inf2InessRAdv : VP -> RAdv ; -- mennessään Inf2InessPassAdv : VP -> Adv ; -- odotettaessa (junaa), touhuttaessa (junan kanssa) Inf2InessPassInvAdv : NP -> VPSlash -> Adv ; -- junaa odotettaessa, junan kanssa touhutessa @@ -59,8 +60,8 @@ fun ComplPresPartActVS : VS -> NP -> VP -> VP ; -- sanoa junan menevän ComplPastPartActVS : VS -> NP -> VP -> VP ; -- sanoa junan menneen - ComplPresPartActAgrVS : VS -> VP -> VP ; -- sanoa menevänsä - ComplPastPartActAgrVS : VS -> VP -> VP ; -- sanoa menneensä + ComplPresPartActReflVS : VS -> VP -> VP ; -- sanoa menevänsä + ComplPastPartActReflVS : VS -> VP -> VP ; -- sanoa menneensä ComplPresPartPassVS : VS -> NP -> VPSlash -> VP ; -- sanoa junaa odotettavan ComplPastPartPassVS : VS -> NP -> VPSlash -> VP ; -- sanoa junaa odotetun diff --git a/src/finnish/infinitives/InfinitiveFin.gf b/src/finnish/infinitives/InfinitiveFin.gf index 322f1645..249b9780 100644 --- a/src/finnish/infinitives/InfinitiveFin.gf +++ b/src/finnish/infinitives/InfinitiveFin.gf @@ -87,7 +87,14 @@ lin s = np.s ! NPCase Gen ++ infVP SCNom Pos np.a vp Inf2Iness } ; + + Inf2InessRAdv vp = { + s = \\a => + infVP SCNom Pos infAdvAgr vp Inf2Iness ++ BIND ++ + case vp.s.h of {Back => possSuffix a ; Front => possSuffixFront a} + } ; + Inf2InessPassAdv vp = { s = infVP SCNom Pos infAdvAgr vp Inf2InessPass } ; @@ -158,9 +165,9 @@ lin ComplPastPartActVS vs np vp = insertExtrapos (subjPartVP np vp (NPCase Gen) (PastPartAct (AN (NCase Sg Gen)))) (predSV vs) ; - ComplPresPartActAgrVS vs vp = + ComplPresPartActReflVS vs vp = insertObj (\\_,_,agr => subjPartAgrVP vp (PresPartAct (AN (NPossGen Sg))) agr) (predSV vs) ; - ComplPastPartActAgrVS vs vp = + ComplPastPartActReflVS vs vp = insertObj (\\_,_,agr => subjPartAgrVP vp (PastPartAct (AN (NPossGen Sg))) agr) (predSV vs) ; ComplPresPartPassVS vs np vps = diff --git a/src/finnish/infinitives/InterpretInfinitives.hs b/src/finnish/infinitives/InterpretInfinitives.hs index 4057e072..40ad9680 100644 --- a/src/finnish/infinitives/InterpretInfinitives.hs +++ b/src/finnish/infinitives/InterpretInfinitives.hs @@ -10,23 +10,20 @@ data Fact = Fact { content :: [Fact], tense :: Maybe GTemp, polarity :: Maybe GPol, - source :: Maybe GNP, - attitude :: Maybe GVS, agent :: Maybe GNP, - action :: Maybe GVP + action :: Either GVS GVP } -initFact = Fact [] Nothing Nothing Nothing Nothing Nothing Nothing +initFact = Fact [] Nothing Nothing Nothing (Left undefined) -factTree fact = case action fact of - (Just vp) -> - GUttS $ GUseCl - (maybe presentTense id (tense fact)) - (maybe positivePol id (polarity fact)) - (GPredVP - (maybe (maybe Gsomebody_NP id (source fact)) id (agent fact)) - vp) - _ -> GUttNP Gnothing_NP +factTree fact = GUseCl mtense mpolarity (GPredVP magent mvp) + where + mvp = case action fact of + Left vs -> GComplVS vs (factTree (head (content fact))) ---- head -> ambiguity + Right vp -> vp + mtense = maybe presentTense id (tense fact) + mpolarity = maybe positivePol id (polarity fact) + magent = maybe GX_NP id (agent fact) presentTense = GTTAnt GTPres GASimul pastTense = GTTAnt GTPast GASimul @@ -38,28 +35,53 @@ negativePol = GPNeg facts :: Infinitive.Tree a -> [Fact] facts t = case t of + GUseCl temp pol s -> + [f{ + tense = Just temp, + polarity = Just pol + } | f <- facts s] GAdjCN (GAgentPartAP np vpslash) cn -> [initFact{ tense = Just perfectTense, agent = Just np, - action = Just (GComplSlash vpslash (GMassNP cn))}] - GPredVP np (GComplPresPartActAgrVS vs vp) -> + action = Right (GComplSlash vpslash (GMassNP cn))}] + GPredVP ag (GUseComp (GCompAP (GAgentPartAP np vpslash))) -> [initFact{ - attitude = Just vs, - source = Just np, - action = Just vp}] - GPredVP np (GComplPastPartActAgrVS vs vp) -> - [initFact{tense = Just perfectTense, - attitude = Just vs, - source = Just np, - action = Just vp}] + tense = Just perfectTense, + agent = Just np, + action = Right (GComplSlash vpslash ag)}] + GPredVP np (GComplPresPartActReflVS vs vp) -> + [initFact{ + agent = Just np, + action = Left vs, + content = [ + initFact{ + agent = Just np, + action = Right vp + }]}] + GPredVP np (GComplPastPartActReflVS vs vp) -> + [initFact{ + agent = Just np, + action = Left vs, + content = [ + initFact{ + tense = Just perfectTense, + agent = Just np, + action = Right vp + }]}] GPredVP np (GAdvVP vp adv) -> - [f{source = Just np} | f <- facts vp ++ facts adv] + [f{agent = Just np} | f <- facts vp ++ facts adv] +---- GPredVP np (GRAdvVP vp (GInf1LongRAdv vpa)) -> +---- [f{agent = Just np, action = } | f <- facts vp ++ facts adv] GPredVP np vp -> - [f{source = Just np} | f <- facts vp] + [f{agent = Just np} | f <- facts vp] GUseV v -> [initFact{ - action = Just t}] + action = Right t}] + GUseV2 v -> + [initFact{ + action = Right (GComplSlash (GSlashV2a v) GY_NP)}] +{- GComplPresPartActVS vs np vp -> [initFact{ attitude = @@ -85,6 +107,7 @@ facts t = case t of tense = Just perfectTense, attitude = Just vs, action = Just (GComplSlash vpslash np)}] +-} _ -> composOpMPlus facts t