forked from GitHub/gf-rgl
(Hun) Fixes in relatives
This commit is contained in:
@@ -267,6 +267,7 @@ oper
|
|||||||
VerbPhrase : Type = Verb ** {
|
VerbPhrase : Type = Verb ** {
|
||||||
obj : Str ;
|
obj : Str ;
|
||||||
adv : Str ;
|
adv : Str ;
|
||||||
|
c2 : Case ; -- for RelSlash
|
||||||
} ; -- TODO more fields
|
} ; -- TODO more fields
|
||||||
|
|
||||||
VPSlash : Type = Verb2 ** {
|
VPSlash : Type = Verb2 ** {
|
||||||
@@ -275,6 +276,7 @@ oper
|
|||||||
|
|
||||||
useV : Verb -> VerbPhrase = \v -> v ** {
|
useV : Verb -> VerbPhrase = \v -> v ** {
|
||||||
obj,adv = [] ;
|
obj,adv = [] ;
|
||||||
|
c2 = Acc ; -- TODO check
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
useVc : Verb2 -> VPSlash = \v2 -> v2 ** {
|
useVc : Verb2 -> VPSlash = \v2 -> v2 ** {
|
||||||
@@ -302,7 +304,7 @@ oper
|
|||||||
but we're done with verb inflection.
|
but we're done with verb inflection.
|
||||||
-}
|
-}
|
||||||
ClSlash : Type = Clause ** {
|
ClSlash : Type = Clause ** {
|
||||||
sc : SubjCase ; -- For RelSlash
|
c2 : Case ; -- For RelSlash
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
QClause : Type = Clause ;
|
QClause : Type = Clause ;
|
||||||
@@ -310,24 +312,12 @@ oper
|
|||||||
|
|
||||||
Sentence : Type = {s : Str} ;
|
Sentence : Type = {s : Str} ;
|
||||||
|
|
||||||
-- predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
|
|
||||||
-- s = \\t,a,p => let subjcase : Case = case vp.sc of {
|
|
||||||
-- SCNom => Nom ;
|
|
||||||
-- SCDat => Dat }
|
|
||||||
-- in np.s ! subjcase
|
|
||||||
-- ++ np.empty -- standard trick for prodrop
|
|
||||||
-- ++ vp.s ! agr2vf np.agr
|
|
||||||
-- ++ vp.obj
|
|
||||||
-- ++ vp.adv
|
|
||||||
-- } ;
|
|
||||||
|
|
||||||
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
|
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
|
||||||
s = let rel : RClause = relVP' (np2rp np) vp ;
|
s = let rel : RClause = relVP' (np2rp np) vp ;
|
||||||
in \\t,a,p => rel.s ! t ! a ! p ! np.agr.p2 ! sc2case vp.sc
|
in \\t,a,p => rel.s ! t ! a ! p ! np.agr.p2 ! sc2case vp.sc
|
||||||
++ np.empty ; -- standard trick for prodrop+metavariable problem
|
++ np.empty ; -- standard trick for prodrop+metavariable problem
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- Relative
|
-- Relative
|
||||||
|
|
||||||
RP : Type = {s : Number => Case => Str} ;
|
RP : Type = {s : Number => Case => Str} ;
|
||||||
@@ -350,10 +340,10 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
relSlash : RP -> ClSlash -> RClause = \rp,cls -> {
|
relSlash : RP -> ClSlash -> RClause = \rp,cls -> {
|
||||||
s = \\t,a,p,n,c => let subjcase : Case = case cls.sc of {
|
s = \\t,a,p,n,c => let objcase : Case = case cls.c2 of {
|
||||||
SCNom => c ;
|
Acc => c ;
|
||||||
SCDat => Dat }
|
_ => cls.c2 }
|
||||||
in rp.s ! n ! subjcase
|
in rp.s ! n ! objcase
|
||||||
++ cls.s ! t ! a ! p
|
++ cls.s ! t ! a ! p
|
||||||
} ;
|
} ;
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user