mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-04 08:42:50 -06:00
Latvian: an optimized NP linearization type => fixed the double negation support in VPS
The flag indicating whether a NP has a negated determiner is now encapsulated in the algebraic parameter Agr, removing the extra field in the NP linearization type.
This commit is contained in:
@@ -32,7 +32,7 @@ lin
|
||||
v = vs ;
|
||||
compl = \\_ => "," ++ vs.subj.s ++ sslash.s ;
|
||||
agr = toClAgr_Reg vs.topic ;
|
||||
objNeg = False
|
||||
objNeg = Pos
|
||||
}) ** { p = sslash.p } ;
|
||||
|
||||
ComplVS v s = { v = v ; compl = \\_ => "," ++ v.subj.s ++ s.s } ;
|
||||
@@ -42,8 +42,8 @@ lin
|
||||
|
||||
EmbedQS qs = { s = qs.s } ;
|
||||
|
||||
-- FIXME: neesmu līdz galam drošs vai agreement ir tieši (AgPr Pl)
|
||||
EmbedVP vp = { s = build_VP vp Pos Infinitive (AgP3 Pl Masc) } ;
|
||||
-- FIXME: vai agr ir Pl?
|
||||
EmbedVP vp = { s = build_VP vp Pos Infinitive (AgP3 Pl Masc Pos) } ;
|
||||
|
||||
UseCl t p cl = { s = t.s ++ p.s ++ cl.s ! (Ind t.a t.t) ! p.p } ;
|
||||
UseQCl t p cl = { s = t.s ++ p.s ++ cl.s ! (Ind t.a t.t) ! p.p } ;
|
||||
@@ -69,31 +69,12 @@ oper
|
||||
case mood of { -- Subject
|
||||
Deb _ _ => np.s ! Dat ; --# notpresent
|
||||
_ => np.s ! vp.agr.c_topic
|
||||
{-
|
||||
_ => case vp.agr.voice of {
|
||||
Act => np.s ! vp.agr.c_topic ;
|
||||
Pass => np.s ! vp.agr.c_focus
|
||||
}
|
||||
-}
|
||||
{-
|
||||
_ => case vp.agr of {
|
||||
Topic c _ => np.s ! c ;
|
||||
TopicFocus c _ _ _ => np.s ! c
|
||||
}
|
||||
-}
|
||||
} ++
|
||||
case subj of { -- Verb
|
||||
Nom => buildVerb vp.v mood pol np.a np.isNeg vp.objNeg ;
|
||||
_ => buildVerb vp.v mood pol vp.agr.agr np.isNeg vp.objNeg -- TODO: test me
|
||||
-- TODO: vai np.a un np.a.pol argumentus nevar apvienot?
|
||||
Nom => buildVerb vp.v mood pol np.a (fromAgr np.a).pol vp.objNeg ;
|
||||
_ => buildVerb vp.v mood pol vp.agr.agr (fromAgr np.a).pol vp.objNeg -- TESTME
|
||||
} ++
|
||||
{-
|
||||
case vp.agr of { -- Verb
|
||||
Topic Nom _ => buildVerb vp.v mood pol np.a np.isNeg vp.objNeg ;
|
||||
Topic _ _ => buildVerb vp.v mood pol (AgP3 Sg Masc) np.isNeg vp.objNeg ; -- TODO: test me
|
||||
TopicFocus Nom _ _ _ => buildVerb vp.v mood pol np.a np.isNeg vp.objNeg ;
|
||||
TopicFocus _ _ agr _ => buildVerb vp.v mood pol agr np.isNeg vp.objNeg
|
||||
} ++
|
||||
-}
|
||||
vp.compl ! np.a -- Object(s), complements, adverbial modifiers
|
||||
} ;
|
||||
|
||||
@@ -101,7 +82,7 @@ oper
|
||||
-- Eng: PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp
|
||||
-- Ar SC nav iespējams neko saskaņot (sk. Cat.gf un Common.gf)
|
||||
mkClauseSC : SC -> CatLav.VP -> Cl = \sc,vp -> lin Cl {
|
||||
s = \\mood,pol => sc.s ++ buildVerb vp.v mood pol (AgP3 Sg Masc) False vp.objNeg ++ vp.compl ! (AgP3 Sg Masc)
|
||||
s = \\mood,pol => sc.s ++ buildVerb vp.v mood pol (AgP3 Sg Masc Pos) Pos vp.objNeg ++ vp.compl ! (AgP3 Sg Masc Pos)
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user