forked from GitHub/gf-core
another optimization of Romance VP. Effect on Fre over 50% in compilation and parse speed. Somewhat smaller on Spa,Ita,Cat.
This commit is contained in:
@@ -25,7 +25,7 @@ interface DiffRomance = open CommonRomance, Prelude in {
|
||||
-- Derivatively, if/when the participle agrees to the subject.
|
||||
-- (Fre "elle est partie", Ita "lei è partita", Spa not)
|
||||
|
||||
oper partAgr : VType -> VPAgr ;
|
||||
oper partAgr : VType -> Bool ;
|
||||
|
||||
-- Whether participle agrees to foregoing clitic.
|
||||
-- (Fre "je l'ai vue", Spa "yo la he visto")
|
||||
@@ -105,9 +105,16 @@ param
|
||||
oper
|
||||
Verb = {s : VF => Str ; vtyp : VType ; p : Str} ;
|
||||
|
||||
VPAgrType : Type = Str * Bool ; ---- originally VPAgr, expensive
|
||||
getVPAgr : Verb -> VPAgrType = \v -> <verbDefaultPart v, partAgr v.vtyp> ; -- str may be used
|
||||
vpAgrSubj : Verb -> VPAgrType = \v -> <verbDefaultPart v, True> ; -- str not used but subject instead ---- VPAgrSubj
|
||||
vpAgrClits : Verb -> AAgr -> VPAgrType = \v,a -> <v.s ! (VPart a.g a.n), False> ; -- str used from clitic ---- vpAgrClit
|
||||
verbDefaultPart : Verb -> Str = \v -> v.s ! (VPart Masc Sg) ;
|
||||
|
||||
|
||||
VP : Type = {
|
||||
s : Verb ;
|
||||
agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
|
||||
agr : VPAgrType ; -- dit/dite dep. on verb, subj, and clitic
|
||||
neg : RPolarity => (Str * Str) ; -- ne-pas
|
||||
clit1 : Str ; -- le/se
|
||||
clit2 : Str ; -- lui
|
||||
|
||||
Reference in New Issue
Block a user