mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-10 19:52:50 -06:00
Latvian: finally handles PassV2 clauses in a more or less adequate way
Extends the previously introduced support for specifying the verb valence (verb-dependent subject and object cases), involving functions up to PredVP and RelVP.
In Latvian, the passive voice is not used if the agent (subject) is known; to preserve the information structure (i.e. the word order), a clause like 'A is <done> by B' is linearized in the active voice ('A <does> B') where A has the object case (e.g. Acc), and B - the subject case (e.g. Nom). Thus, the verb valence patterns are swapped on-the-fly.
This is still a rather quick & dirty implementation: parameters and linearization types have to be optimized (VerbLav), the use of PassV2 in AdvVP is problematic as it doesn't apply VPSlashPrep / ComplSlash, etc.
This commit is contained in:
@@ -13,13 +13,29 @@ flags
|
||||
lin
|
||||
RelCl cl = { s = \\m,p,_ => "ka" ++ cl.s ! m ! p } ;
|
||||
|
||||
RelVP rp vp = {
|
||||
s = \\m,p,ag =>
|
||||
rp.s ! Masc ! Nom ++
|
||||
buildVerb vp.v m p (toAgr (fromAgr ag).n P3 (fromAgr ag).g) False vp.objNeg ++
|
||||
vp.compl ! ag
|
||||
} ;
|
||||
-- RP -> VP -> RCl
|
||||
RelVP rp vp = mkRelClause rp vp ;
|
||||
|
||||
oper
|
||||
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc)
|
||||
mkRelClause : RP -> CatLav.VP -> RCl = \rp,vp ->
|
||||
let subj : Case = case vp.agr.voice of {
|
||||
Act => vp.agr.c_topic ;
|
||||
Pass => vp.agr.c_focus
|
||||
} in lin RCl {
|
||||
s = \\mood,pol,agr =>
|
||||
case mood of { -- Subject
|
||||
Deb _ _ => rp.s ! Masc ! Dat ; --# notpresent
|
||||
_ => rp.s ! Masc ! vp.agr.c_topic
|
||||
} ++
|
||||
case subj of { -- Verb
|
||||
Nom => buildVerb vp.v mood pol (toAgr (fromAgr agr).num P3 (fromAgr agr).gend) False vp.objNeg ; -- TODO: kāpēc P3 nevis agr, kāds tas ir?
|
||||
_ => buildVerb vp.v mood pol vp.agr.agr False vp.objNeg -- TODO: test me
|
||||
} ++
|
||||
vp.compl ! agr -- Object(s), complements, adverbial modifiers
|
||||
} ;
|
||||
|
||||
lin
|
||||
-- FIXME: vārdu secība - nevis 'kas mīl viņu' bet 'kas viņu mīl' (?)
|
||||
-- FIXME: Masc varētu nebūt labi
|
||||
RelSlash rp slash = {
|
||||
@@ -29,7 +45,7 @@ lin
|
||||
-- FIXME: placeholder
|
||||
-- TODO: jātestē, kautkas nav labi ar testpiemēru
|
||||
FunRP p np rp = {
|
||||
s = \\g,c => p.s ++ rp.s ! g ! c ++ np.s ! (p.c ! (fromAgr np.a).n)
|
||||
s = \\g,c => p.s ++ rp.s ! g ! c ++ np.s ! (p.c ! (fromAgr np.a).num)
|
||||
} ;
|
||||
|
||||
IdRP = {
|
||||
|
||||
Reference in New Issue
Block a user