mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-07-02 20:18:33 -06:00
(Som) Take passive out of Prep + add reflexive as PrepAgr + update tests
This commit is contained in:
+22
-28
@@ -142,6 +142,7 @@ param
|
||||
| Pl1_Prep Inclusion
|
||||
| Pl2_Prep
|
||||
| Impers_Prep
|
||||
| Reflexive_Prep
|
||||
| P3_Prep ;
|
||||
|
||||
State = Definite | Indefinite ;
|
||||
@@ -193,41 +194,34 @@ param
|
||||
|
||||
param
|
||||
Preposition = U | Ku | Ka | La | NoPrep ;
|
||||
PrepositionPlus = P Preposition
|
||||
| Passive ; -- Hack: RGL only supports V2s as passive, so I can reuse V2's preposition slot for passives as well, and save >200 parameters. (Don't ask.)
|
||||
|
||||
PrepCombination = Ugu | Uga | Ula | Kaga | Kula | Kala
|
||||
| Lagu -- laygu, lagugu, nalagu, laydinku
|
||||
| Laga -- layga, lagaa, nalaga, laydinka
|
||||
-- | TODO rest of combinations with impersonal-la
|
||||
-- | TODO incorporate reflexive too
|
||||
| Single PrepositionPlus ;
|
||||
| Passive | Lagu | Laga -- TODO all combinations with impersonal la
|
||||
| Single Preposition ;
|
||||
|
||||
oper
|
||||
combine : PrepositionPlus -> Preposition -> PrepCombination = \p1,p2 ->
|
||||
let oneWay : PrepositionPlus => Preposition => PrepCombination =
|
||||
\\x,y => case <x,y> of {
|
||||
<Passive,NoPrep> => Single Passive ;
|
||||
<Passive,Ku> => Lagu ;
|
||||
<Passive,Ka> => Laga ;
|
||||
<Passive,p> => Single (P p) ; -- TODO rest of combinations
|
||||
<P z,_> => case <z,y> of {
|
||||
<U,U|Ku> => Ugu ;
|
||||
<U,Ka> => Uga ;
|
||||
<U,La> => Ula ;
|
||||
<Ku|Ka,
|
||||
Ku|Ka> => Kaga ;
|
||||
<Ku,La> => Kula ;
|
||||
<Ka,La> => Kala ;
|
||||
<NoPrep,p> => Single (P p) ;
|
||||
<p,NoPrep> => Single x ;
|
||||
<p,_> => Single x }} -- for trying both ways
|
||||
in case oneWay ! P p2 ! (pp2prep p1) of {
|
||||
combine : (isPassive : Bool) -> Preposition -> Preposition -> PrepCombination = \isPass,p1,p2 ->
|
||||
let oneWay : Preposition => Preposition => PrepCombination =
|
||||
\\x,y => case <isPass,x,y> of {
|
||||
<True,NoPrep,NoPrep> => Passive ;
|
||||
<True,Ku,NoPrep> => Lagu ;
|
||||
<True,Ka,NoPrep> => Laga ;
|
||||
<True,p,_> => Single p ; -- TODO all combinations
|
||||
<False,_,_> => case <x,y> of {
|
||||
<U,U|Ku> => Ugu ;
|
||||
<U,Ka> => Uga ;
|
||||
<U,La> => Ula ;
|
||||
<Ku|Ka,
|
||||
Ku|Ka> => Kaga ;
|
||||
<Ku,La> => Kula ;
|
||||
<Ka,La> => Kala ;
|
||||
<NoPrep,p> => Single p ;
|
||||
<p,NoPrep> => Single x ;
|
||||
<p,_> => Single x }} -- for trying both ways
|
||||
in case oneWay ! p2 ! p1 of {
|
||||
Single _ => oneWay ! p1 ! p2 ;
|
||||
z => z } ;
|
||||
|
||||
pp2prep : PrepositionPlus -> Preposition = \pp ->
|
||||
case pp of {P p => p ; _ => NoPrep} ;
|
||||
--------------------------------------------------------------------------------
|
||||
-- Verbs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user