1
0
forked from GitHub/gf-core

Latvian: two important fixes regarding V2 clauses

Agreement with the focus part (the object) works not only for Pers3, but also for Pers1 and Pers2 NPs (if the verb requires non-typical subject/object valences).
Object-dependent double negation works (in addition to the subject-dependent double negation).
The first one is motivated by PhrasebookLav, the second one - by AttemptoLav.
Also a couple of minor fixes.
This commit is contained in:
Normunds Gruzitis
2012-10-21 21:23:56 +00:00
parent d0e1187b10
commit 1817c7d168
5 changed files with 34 additions and 21 deletions

View File

@@ -40,7 +40,7 @@ lincat
-- Verb
VP = ResLav.VP ;
VPSlash = ResLav.VP ** { p : ResLav.Prep } ; -- TODO: kāpēc jāglabā prep?
VPSlash = ResLav.VP ** { p : ResLav.Prep } ; -- the object agreement
Comp = { s : ResLav.Agr => Str } ;
-- Adjective

View File

@@ -116,7 +116,7 @@ lin
learn_V2 = mkV2 (mkV "mācīties" third_conjugation) acc_Prep ;
leather_N = mkN "āda" ;
leave_V2 = mkV2 (mkV "atstāt" "atstāju" "atstāju") acc_Prep ;
--like_V2 = mkV2 (regV "like") ;
like_V2 = mkV2 (mkV "patikt" "patīku" "patiku") nom_Prep Dat ;
listen_V2 = mkV2 (mkV "klausīties" third_conjugation) acc_Prep ;
live_V = mkV "dzīvot" second_conjugation ;
long_A = mkA "garš" ;

View File

@@ -16,7 +16,7 @@ lin
UsePN pn = { s = pn.s ; a = agrgP3 pn.n pn.g ; isNeg = False } ;
UsePron p = p ** { isNeg = False };
UsePron p = { s = p.s ; a = p.a ; isNeg = False } ;
PredetNP pred np = {
s = \\c => pred.s ! (fromAgr np.a).g ++ np.s ! c ;

View File

@@ -124,11 +124,11 @@ lin
under_Prep = mkPrep "zem" Gen Dat ;
with_Prep = mkPrep "ar" Acc Dat ;
without_Prep = mkPrep "bez" Gen Dat ;
by8agent_Prep = nom_Prep ; -- A was attacked by B -> A-Dat uzbruka B-Nom
by8agent_Prep = nom_Prep ; -- TODO: should get rid of this Prep
by8means_Prep = mkPrep "ar" Acc Dat ;
during_Prep = mkPrep "laikā" Gen Gen ; -- FIXME: laikam postfix 'X laikā' jāliek
in8front_Prep = mkPrep "priekšā" Dat Dat ;
part_Prep = mkPrep Gen ; --FIXME - vajadzētu vārdu secību otrādi - pirms paskaidrojamā vārda likt
--part_Prep = mkPrep Gen ; --FIXME - vajadzētu vārdu secību otrādi - pirms paskaidrojamā vārda likt
through_Prep = mkPrep "cauri" Dat Dat ;
except_Prep = mkPrep "izņemot" Acc Acc ;
@@ -277,13 +277,13 @@ oper
lai_Subj = ss "lai" ;
kameer_Subj = ss "kamēr" ;
emptyPl_Det = {
emptyPl_Det = { -- TODO: pašlaik netiek izmantots, jāpārnes uz ExtraLav(?) kā dsk. alternatīva a_Art, the_Art, no_Quant, every_Det
s : Gender => Case => Str = \\_,_ => [] ;
n = Pl ;
d = Indef
} ;
emptySg_Det = {
emptySg_Det = { -- TODO: analoģiski kā emptyPl_Det
s : Gender => Case => Str = \\_,_ => [] ;
n = Sg ;
d = Indef

View File

@@ -9,7 +9,7 @@
concrete VerbLav of Verb = CatLav ** open
StructuralLav,
ParadigmsVerbsLav,
ResLav,
ResLav, -- TODO: get rid of ResLav - include parameters (Pos etc.) in ParadigmsVerbsLav
ParamX,
Prelude
in {
@@ -57,17 +57,37 @@ lin
} ;
-- SlashV2a : V2 -> VPSlash ; -- love (it)
-- Where the (direct) object comes from?!
-- The (direct) object is added by ComplSlash
SlashV2a v2 = {
v = v2 ;
compl = \\_ => [] ;
p = v2.p ;
agr = TopicFocus v2.topic (AgP3 Sg Masc) ; -- FIXME: works only if the focus is P3 (Sg/Pl); TODO: P1, P2 (Sg, Pl)
objNeg = False -- FIXME: inherit from the object
agr = TopicFocus v2.topic (AgP3 Sg Masc) ; -- overriden in ComplSlash
objNeg = False -- overriden in ComplSlash
} ;
-- Slash2V3 : V3 -> NP -> VPSlash ; -- give it (to her)
-- Where the indirect object comes from?!
-- VPSlash = { v : Verb ; compl : Agr => Str ; agr : ClAgr ; objNeg : Bool ; p : ResLav.Prep }
-- Agr = AgP1 Number Gender | AgP2 Number Gender | AgP3 Number Gender
ComplSlash vpslash np =
let agr : Agr = np.a
in insertObjPre_Spec
(\\agr => vpslash.p.s ++ np.s ! (vpslash.p.c ! (fromAgr agr).n))
vpslash
np ;
oper
insertObjPre_Spec : (Agr => Str) -> ResLav.VP -> NP -> ResLav.VP = \obj,vp,obj_np -> {
v = vp.v ;
compl = \\agr => obj ! agr ++ vp.compl ! agr ;
agr = case vp.agr of {
TopicFocus topic _ => TopicFocus topic obj_np.a ;
_ => Topic Nom
} ;
objNeg = obj_np.isNeg
} ;
lin
-- Slash2V3 : V3 -> NP -> VPSlash ; -- give it (to her)
Slash2V3 v3 np = insertObjC
(\\_ => v3.p1.s ++ np.s ! (v3.p1.c ! (fromAgr np.a).n))
{
@@ -79,7 +99,6 @@ lin
} ;
-- Slash3V3 : V3 -> NP -> VPSlash ; -- give (it) to her
-- Where the direct object comes from?!
Slash3V3 v3 np = insertObjC
(\\_ => v3.p2.s ++ np.s ! (v3.p2.c ! (fromAgr np.a).n))
{
@@ -122,10 +141,6 @@ lin
objNeg = False
} ;
ComplSlash vpslash np = insertObjPre
(\\_ => vpslash.p.s ++ np.s ! (vpslash.p.c ! (fromAgr np.a).n))
vpslash ;
SlashVV vv vpslash = {
v = vv ;
compl = \\agr => build_VP vpslash Pos Infinitive agr ;
@@ -191,13 +206,11 @@ oper
} ;
-- VP = { v : Verb ; topic : Case ; compl : Agr => Str }
-- TODO: šo jāmet ārā un jāpieliek insertObj parametrs isPre
-- Bet kas šis vispār ir par gadījumu?!
insertObjPre : (Agr => Str) -> ResLav.VP -> ResLav.VP = \obj,vp -> {
v = vp.v ;
compl = \\agr => obj ! agr ++ vp.compl ! agr ;
agr = vp.agr ;
objNeg = False
objNeg = vp.objNeg
} ;
buildVerb : Verb -> VerbMood -> Polarity -> Agr -> Bool -> Bool -> Str =