mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Som) Add VPSlashPrep + fix bug in insertAdv
This commit is contained in:
@@ -261,6 +261,15 @@ oper
|
|||||||
Single _ => oneWay ! p1 ! p2 ;
|
Single _ => oneWay ! p1 ! p2 ;
|
||||||
z => z } ;
|
z => z } ;
|
||||||
|
|
||||||
|
combinePassive : Preposition -> PrepCombination = \p ->
|
||||||
|
case p of {
|
||||||
|
U => Loo ;
|
||||||
|
Ku => Lagu ;
|
||||||
|
Ka => Laga ;
|
||||||
|
La => Lala ;
|
||||||
|
_ => Passive
|
||||||
|
} ;
|
||||||
|
|
||||||
isPassive : {c2 : PrepCombination} -> Bool = \vp ->
|
isPassive : {c2 : PrepCombination} -> Bool = \vp ->
|
||||||
case vp.c2 of {
|
case vp.c2 of {
|
||||||
Passive | Lagu | Laga | Loo | Lala => True ;
|
Passive | Lagu | Laga | Loo | Lala => True ;
|
||||||
|
|||||||
@@ -769,11 +769,7 @@ oper
|
|||||||
|
|
||||||
passVP : VerbPhrase -> VerbPhrase = \vp -> vp ** {
|
passVP : VerbPhrase -> VerbPhrase = \vp -> vp ** {
|
||||||
c2 = case vp.c2 of {
|
c2 = case vp.c2 of {
|
||||||
Single NoPrep => Passive ;
|
Single p => combinePassive p ;
|
||||||
Single Ku => Lagu ;
|
|
||||||
Single Ka => Laga ;
|
|
||||||
Single U => Loo ;
|
|
||||||
Single La => Lala ;
|
|
||||||
_ => vp.c2 }
|
_ => vp.c2 }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -827,6 +823,7 @@ oper
|
|||||||
-- if free complement slots, introduce adv.np with insertComp
|
-- if free complement slots, introduce adv.np with insertComp
|
||||||
Single NoPrep => insertCompLite (vp ** {c2 = Single adv.c2}) adv.np ** adv' ;
|
Single NoPrep => insertCompLite (vp ** {c2 = Single adv.c2}) adv.np ** adv' ;
|
||||||
Single p => insertCompLite (vp ** {c2 = combine p adv.c2}) adv.np ** adv' ;
|
Single p => insertCompLite (vp ** {c2 = combine p adv.c2}) adv.np ** adv' ;
|
||||||
|
Passive => insertCompLite (vp ** {c2 = combinePassive adv.c2}) adv.np ** adv' ;
|
||||||
|
|
||||||
-- if complement slots are full, just insert strings.
|
-- if complement slots are full, just insert strings.
|
||||||
_ => vp ** adv''
|
_ => vp ** adv''
|
||||||
|
|||||||
@@ -121,10 +121,9 @@ lin
|
|||||||
AdVVPSlash adv vps = vps ** { adv = adv.s ++ vps.adv } ;
|
AdVVPSlash adv vps = vps ** { adv = adv.s ++ vps.adv } ;
|
||||||
-}
|
-}
|
||||||
-- : VP -> Prep -> VPSlash ; -- live in (it)
|
-- : VP -> Prep -> VPSlash ; -- live in (it)
|
||||||
-- NB. We need possibly a MissingArg kind of solution here too
|
VPSlashPrep vp prep =
|
||||||
-- VPSlashPrep vp prep = vp **
|
let adv = prepNP prep emptyNP
|
||||||
-- { c2 = case vp.c2 of { NoPrep => prep.prep ;
|
in insertAdv vp adv ;
|
||||||
-- x => x }} ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user