mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
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:
@@ -40,7 +40,7 @@ lincat
|
|||||||
-- Verb
|
-- Verb
|
||||||
|
|
||||||
VP = ResLav.VP ;
|
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 } ;
|
Comp = { s : ResLav.Agr => Str } ;
|
||||||
|
|
||||||
-- Adjective
|
-- Adjective
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ lin
|
|||||||
learn_V2 = mkV2 (mkV "mācīties" third_conjugation) acc_Prep ;
|
learn_V2 = mkV2 (mkV "mācīties" third_conjugation) acc_Prep ;
|
||||||
leather_N = mkN "āda" ;
|
leather_N = mkN "āda" ;
|
||||||
leave_V2 = mkV2 (mkV "atstāt" "atstāju" "atstāju") acc_Prep ;
|
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 ;
|
listen_V2 = mkV2 (mkV "klausīties" third_conjugation) acc_Prep ;
|
||||||
live_V = mkV "dzīvot" second_conjugation ;
|
live_V = mkV "dzīvot" second_conjugation ;
|
||||||
long_A = mkA "garš" ;
|
long_A = mkA "garš" ;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ lin
|
|||||||
|
|
||||||
UsePN pn = { s = pn.s ; a = agrgP3 pn.n pn.g ; isNeg = False } ;
|
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 = {
|
PredetNP pred np = {
|
||||||
s = \\c => pred.s ! (fromAgr np.a).g ++ np.s ! c ;
|
s = \\c => pred.s ! (fromAgr np.a).g ++ np.s ! c ;
|
||||||
|
|||||||
@@ -124,11 +124,11 @@ lin
|
|||||||
under_Prep = mkPrep "zem" Gen Dat ;
|
under_Prep = mkPrep "zem" Gen Dat ;
|
||||||
with_Prep = mkPrep "ar" Acc Dat ;
|
with_Prep = mkPrep "ar" Acc Dat ;
|
||||||
without_Prep = mkPrep "bez" Gen 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 ;
|
by8means_Prep = mkPrep "ar" Acc Dat ;
|
||||||
during_Prep = mkPrep "laikā" Gen Gen ; -- FIXME: laikam postfix 'X laikā' jāliek
|
during_Prep = mkPrep "laikā" Gen Gen ; -- FIXME: laikam postfix 'X laikā' jāliek
|
||||||
in8front_Prep = mkPrep "priekšā" Dat Dat ;
|
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 ;
|
through_Prep = mkPrep "cauri" Dat Dat ;
|
||||||
except_Prep = mkPrep "izņemot" Acc Acc ;
|
except_Prep = mkPrep "izņemot" Acc Acc ;
|
||||||
|
|
||||||
@@ -277,13 +277,13 @@ oper
|
|||||||
lai_Subj = ss "lai" ;
|
lai_Subj = ss "lai" ;
|
||||||
kameer_Subj = ss "kamēr" ;
|
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 = \\_,_ => [] ;
|
s : Gender => Case => Str = \\_,_ => [] ;
|
||||||
n = Pl ;
|
n = Pl ;
|
||||||
d = Indef
|
d = Indef
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
emptySg_Det = {
|
emptySg_Det = { -- TODO: analoģiski kā emptyPl_Det
|
||||||
s : Gender => Case => Str = \\_,_ => [] ;
|
s : Gender => Case => Str = \\_,_ => [] ;
|
||||||
n = Sg ;
|
n = Sg ;
|
||||||
d = Indef
|
d = Indef
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
concrete VerbLav of Verb = CatLav ** open
|
concrete VerbLav of Verb = CatLav ** open
|
||||||
StructuralLav,
|
StructuralLav,
|
||||||
ParadigmsVerbsLav,
|
ParadigmsVerbsLav,
|
||||||
ResLav,
|
ResLav, -- TODO: get rid of ResLav - include parameters (Pos etc.) in ParadigmsVerbsLav
|
||||||
ParamX,
|
ParamX,
|
||||||
Prelude
|
Prelude
|
||||||
in {
|
in {
|
||||||
@@ -57,17 +57,37 @@ lin
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- SlashV2a : V2 -> VPSlash ; -- love (it)
|
-- SlashV2a : V2 -> VPSlash ; -- love (it)
|
||||||
-- Where the (direct) object comes from?!
|
-- The (direct) object is added by ComplSlash
|
||||||
SlashV2a v2 = {
|
SlashV2a v2 = {
|
||||||
v = v2 ;
|
v = v2 ;
|
||||||
compl = \\_ => [] ;
|
compl = \\_ => [] ;
|
||||||
p = v2.p ;
|
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)
|
agr = TopicFocus v2.topic (AgP3 Sg Masc) ; -- overriden in ComplSlash
|
||||||
objNeg = False -- FIXME: inherit from the object
|
objNeg = False -- overriden in ComplSlash
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Slash2V3 : V3 -> NP -> VPSlash ; -- give it (to her)
|
-- VPSlash = { v : Verb ; compl : Agr => Str ; agr : ClAgr ; objNeg : Bool ; p : ResLav.Prep }
|
||||||
-- Where the indirect object comes from?!
|
-- 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
|
Slash2V3 v3 np = insertObjC
|
||||||
(\\_ => v3.p1.s ++ np.s ! (v3.p1.c ! (fromAgr np.a).n))
|
(\\_ => 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
|
-- Slash3V3 : V3 -> NP -> VPSlash ; -- give (it) to her
|
||||||
-- Where the direct object comes from?!
|
|
||||||
Slash3V3 v3 np = insertObjC
|
Slash3V3 v3 np = insertObjC
|
||||||
(\\_ => v3.p2.s ++ np.s ! (v3.p2.c ! (fromAgr np.a).n))
|
(\\_ => v3.p2.s ++ np.s ! (v3.p2.c ! (fromAgr np.a).n))
|
||||||
{
|
{
|
||||||
@@ -122,10 +141,6 @@ lin
|
|||||||
objNeg = False
|
objNeg = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ComplSlash vpslash np = insertObjPre
|
|
||||||
(\\_ => vpslash.p.s ++ np.s ! (vpslash.p.c ! (fromAgr np.a).n))
|
|
||||||
vpslash ;
|
|
||||||
|
|
||||||
SlashVV vv vpslash = {
|
SlashVV vv vpslash = {
|
||||||
v = vv ;
|
v = vv ;
|
||||||
compl = \\agr => build_VP vpslash Pos Infinitive agr ;
|
compl = \\agr => build_VP vpslash Pos Infinitive agr ;
|
||||||
@@ -191,13 +206,11 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- VP = { v : Verb ; topic : Case ; compl : Agr => Str }
|
-- 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 -> {
|
insertObjPre : (Agr => Str) -> ResLav.VP -> ResLav.VP = \obj,vp -> {
|
||||||
v = vp.v ;
|
v = vp.v ;
|
||||||
compl = \\agr => obj ! agr ++ vp.compl ! agr ;
|
compl = \\agr => obj ! agr ++ vp.compl ! agr ;
|
||||||
agr = vp.agr ;
|
agr = vp.agr ;
|
||||||
objNeg = False
|
objNeg = vp.objNeg
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
buildVerb : Verb -> VerbMood -> Polarity -> Agr -> Bool -> Bool -> Str =
|
buildVerb : Verb -> VerbMood -> Polarity -> Agr -> Bool -> Bool -> Str =
|
||||||
|
|||||||
Reference in New Issue
Block a user