mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user