diff --git a/lib/src/latvian/CatLav.gf b/lib/src/latvian/CatLav.gf index a6021b6a6..d03ab6418 100644 --- a/lib/src/latvian/CatLav.gf +++ b/lib/src/latvian/CatLav.gf @@ -50,14 +50,14 @@ lincat -- Noun CN = { s : Definite => Number => Case => Str ; g : Gender } ; - NP = { s : Case => Str ; a : ResLav.Agr ; isNeg : Bool } ; + NP = { s : Case => Str ; a : ResLav.Agr } ; Pron = { s : Case => Str ; a : ResLav.Agr ; possessive : Gender => Number => Case => Str } ; - Det = { s : Gender => Case => Str ; n : Number ; d : Definite ; isNeg : Bool } ; + Det = { s : Gender => Case => Str ; n : Number ; d : Definite ; pol : Polarity } ; Predet = { s : Gender => Str } ; Ord = { s : Gender => Case => Str } ; Num = { s : Gender => Case => Str ; n : Number ; hasCard : Bool } ; Card = { s : Gender => Case => Str ; n : Number } ; - Quant = { s : Gender => Number => Case => Str ; d : Definite ; isNeg : Bool } ; + Quant = { s : Gender => Number => Case => Str ; d : Definite ; pol : Polarity } ; -- Numeral diff --git a/lib/src/latvian/ConjunctionLav.gf b/lib/src/latvian/ConjunctionLav.gf index c63be9361..05bb5e537 100644 --- a/lib/src/latvian/ConjunctionLav.gf +++ b/lib/src/latvian/ConjunctionLav.gf @@ -17,8 +17,7 @@ lin ConjAdv = conjunctDistrSS ; ConjNP conj ss = conjunctDistrTable Case conj ss ** { - a = toAgr (conjNumber (fromAgr ss.a).num conj.n) (fromAgr ss.a).pers (fromAgr ss.a).gend ; - isNeg = False + a = toAgr (fromAgr ss.a).pers (conjNumber (fromAgr ss.a).num conj.n) (fromAgr ss.a).gend Pos } ; ConjAP conj ss = conjunctDistrTable4 Definite Gender Number Case conj ss ; diff --git a/lib/src/latvian/ExtraLav.gf b/lib/src/latvian/ExtraLav.gf index a9fa27ac0..6daff2132 100644 --- a/lib/src/latvian/ExtraLav.gf +++ b/lib/src/latvian/ExtraLav.gf @@ -40,6 +40,8 @@ lin they8fem_Pron = mkPronoun_They Fem ; it8fem_Pron = mkPronoun_It_Sg Fem ; + have_V3 = mkV3 (mkV "būt") nom_Prep dat_Prep Dat ; + {-empty_Det num def neg = \num,def,neg -> { s = \\_,_ => [] ; n = num ; @@ -49,18 +51,17 @@ lin -- Zemāk esošās f-cijas nav ExtraLavAbs, tās ir abstract/Extra.gf + -- NP -> Quant GenNP np = { s = \\_,_,_ => np.s ! Gen ; d = Def ; - isNeg = np.isNeg + pol = (fromAgr np.a).pol } ; --ICompAP ap = {s = \\g,n => "cik" ++ ap.s ! Indef ! g ! n ! Nom } ; IAdvAdv adv = {s = "cik" ++ adv.s} ; - have_V3 = mkV3 (mkV "būt") nom_Prep dat_Prep Dat ; - -- for VP conjunction lincat @@ -84,7 +85,7 @@ lin -- TODO: subj-dependent double negation -- TODO: subj/obj isNeg jāpārceļ uz Agr (?) --let verb = vp.v.s ! pol.p ! Indicative (fromAgr agr).pers (fromAgr agr).num temp.t in - temp.s ++ buildVerb vp.v (Ind temp.a temp.t) pol.p subjAgr False vp.objNeg ++ vp.compl ! subjAgr + temp.s ++ buildVerb vp.v (Ind temp.a temp.t) pol.p subjAgr (fromAgr subjAgr).pol vp.objNeg ++ vp.compl ! subjAgr } ; -- Conj -> [VPS] -> VPS diff --git a/lib/src/latvian/IdiomLav.gf b/lib/src/latvian/IdiomLav.gf index 23cc7676d..b7d210121 100644 --- a/lib/src/latvian/IdiomLav.gf +++ b/lib/src/latvian/IdiomLav.gf @@ -13,18 +13,18 @@ flags lin ImpersCl vp = - let agr = AgP3 Sg Masc + let agr = AgP3 Sg Masc Pos in { s = \\mood,pol => - buildVerb vp.v mood pol agr False vp.objNeg ++ -- Verb + buildVerb vp.v mood pol agr Pos vp.objNeg ++ -- Verb vp.compl ! agr -- Object(s), complements, adverbial modifiers } ; GenericCl vp = - let agr = AgP3 Sg Masc + let agr = AgP3 Sg Masc Pos in { s = \\mood,pol => - buildVerb vp.v mood pol agr False vp.objNeg ++ + buildVerb vp.v mood pol agr Pos vp.objNeg ++ vp.compl ! agr } ; @@ -34,18 +34,18 @@ lin agr = np.a in { s = \\mood,pol => - buildVerb v mood pol agr np.isNeg False ++ + buildVerb v mood pol agr (fromAgr np.a).pol Pos ++ np.s ! Nom } ; ExistIP ip = let v = lin V mkVerb_Irreg_Be ; - agr = AgP3 ip.n Masc + agr = AgP3 ip.n Masc Pos in { s = \\mood,pol => ip.s ! Nom ++ - buildVerb v mood pol agr False False + buildVerb v mood pol agr Pos Pos } ; -- FIXME: needs restriction so that only VerbMood Indicative _ _ Present is allowed; @@ -63,7 +63,7 @@ lin ; ImpP3 np vp = { - s = "lai" ++ np.s ! Nom ++ buildVerb vp.v (Ind Simul Pres) Pos np.a np.isNeg vp.objNeg ++ vp.compl ! np.a ; + s = "lai" ++ np.s ! Nom ++ buildVerb vp.v (Ind Simul Pres) Pos np.a (fromAgr np.a).pol vp.objNeg ++ vp.compl ! np.a ; } ; -- FIXME: placeholder diff --git a/lib/src/latvian/NounLav.gf b/lib/src/latvian/NounLav.gf index 9ba65e7f5..23920fb96 100644 --- a/lib/src/latvian/NounLav.gf +++ b/lib/src/latvian/NounLav.gf @@ -14,14 +14,13 @@ lin UseN n = { s = \\_ => n.s ; g = n.g } ; - UsePN pn = { s = pn.s ; a = agrgP3 pn.n pn.g ; isNeg = False } ; + UsePN pn = { s = pn.s ; a = AgP3 pn.n pn.g Pos } ; - UsePron p = { s = p.s ; a = p.a ; isNeg = False } ; + UsePron p = { s = p.s ; a = p.a } ; PredetNP pred np = { s = \\c => pred.s ! (fromAgr np.a).gend ++ np.s ! c ; - a = np.a ; - isNeg = False + a = np.a } ; UseN2 n = { s = \\_ => n.s ; g = n.g } ; @@ -46,44 +45,39 @@ lin AdvNP np adv = { s = \\c => np.s ! c ++ adv.s ; - a = np.a ; - isNeg = np.isNeg + a = np.a } ; RelNP np rs = { s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ; - a = np.a ; - isNeg = np.isNeg + a = np.a } ; DetCN det cn = { s = \\c => det.s ! cn.g ! c ++ cn.s ! det.d ! det.n ! c ; - a = AgP3 det.n cn.g ; - isNeg = det.isNeg + a = AgP3 det.n cn.g det.pol } ; DetQuant quant num = { s = \\g,c => quant.s ! g ! num.n ! c ++ num.s ! g ! c ; n = num.n ; d = quant.d ; -- FIXME: ja ir kārtas skaitļa vārds, tad tikai noteiktās formas drīkst būt - isNeg = quant.isNeg + pol = quant.pol } ; DetQuantOrd quant num ord = { s = \\g,c => quant.s ! g ! num.n ! c ++ num.s ! g ! c ++ ord.s ! g ! c ; n = num.n ; d = quant.d ; --FIXME: ja ir kārtas skaitļa vārds, tad tikai noteiktās formas drīkst būt - isNeg = quant.isNeg + pol = quant.pol } ; DetNP det = { s = \\c => det.s ! Masc ! c ; - a = AgP3 det.n Masc ; - isNeg = det.isNeg + a = AgP3 det.n Masc det.pol } | { s = \\c => det.s ! Fem ! c ; - a = AgP3 det.n Fem ; - isNeg = det.isNeg + a = AgP3 det.n Fem det.pol } ; AdjCN ap cn = { @@ -94,25 +88,24 @@ lin DefArt = { s = \\_,_,_ => [] ; d = Def ; - isNeg = False + pol = Pos } ; IndefArt = { s = \\_,_,_ => [] ; d = Indef ; - isNeg = False + pol = Pos } ; PossPron p = { s = p.possessive ; d = Def ; - isNeg = False + pol = Pos } ; MassNP cn = { s = cn.s ! Indef ! Sg ; -- FIXME: a 'šis alus'? der tak gan 'zaļš alus' gan 'zaļais alus' - a = AgP3 Sg cn.g ; - isNeg = False + a = AgP3 Sg cn.g Pos } ; NumSg = { s = \\_,_ => [] ; n = Sg ; hasCard = False } ; @@ -152,7 +145,7 @@ lin } ; RelCN cn rs = { - s = \\d, n,c => cn.s ! d ! n ! c ++ "," ++ rs.s ! AgP3 n cn.g ; + s = \\d,n,c => cn.s ! d ! n ! c ++ "," ++ rs.s ! AgP3 n cn.g Pos ; g = cn.g } ; @@ -164,8 +157,7 @@ lin -- FIXME: vajag šķirot noteikto/nenoteikto galotni..? PPartNP np v2 = { s = \\c => v2.s ! Pos ! (Participle TsTa (fromAgr np.a).gend (fromAgr np.a).num c) ++ np.s ! c ; - a = np.a ; - isNeg = np.isNeg + a = np.a } ; -- TODO: šim vajag -ts -ta divdabjus (+ noteiktās formas tiem) diff --git a/lib/src/latvian/ParadigmsPronounsLav.gf b/lib/src/latvian/ParadigmsPronounsLav.gf index 2bafa777e..a32865b38 100644 --- a/lib/src/latvian/ParadigmsPronounsLav.gf +++ b/lib/src/latvian/ParadigmsPronounsLav.gf @@ -157,13 +157,13 @@ oper mkPronoun_They : Gender -> Pron = \g -> { s = \\c => (mkPronoun_Gend "viņš").s ! g ! Pl ! c ; - a = AgP3 Pl g ; + a = AgP3 Pl g Pos ; possessive = \\_,_,_ => "viņu" } ; mkPronoun_It_Sg : Gender -> Pron = \g -> { s = \\c => (mkPronoun_ThisThat That).s ! g ! Sg ! c ; - a = AgP3 Sg g ; + a = AgP3 Sg g Pos ; possessive = \\_,_,_ => case g of { Masc => "tā" ; Fem => "tās" } } ; @@ -268,8 +268,7 @@ oper } ; -- Everything, something, nothing, i.e., all that end with "kas" - -- Quick & dirty - mkPronoun_Thing : Str -> Pron = \lemma -> + mkPronoun_Thing : Str -> Polarity -> Pron = \lemma,pol -> let stem : Str = Predef.tk 3 lemma in { s = \\c => table { @@ -280,13 +279,14 @@ oper Loc => case stem of { "kaut" => stem ++ "kur" ; _ => stem + "kur" } ; Voc => NON_EXISTENT } ! c ; - a = AgP3 Sg Masc ; + a = AgP3 Sg Masc pol ; possessive = \\_,_,_ => case stem of { "kaut" => stem ++ "kā" ; _ => stem + "kā" } } ; - mkPronoun_Body : Str -> Pron = \lemma -> { + -- Everybody, somebody, nobody + mkPronoun_Body : Str -> Polarity -> Pron = \lemma,pol -> { s = \\c => (mkPronoun_Gend lemma).s ! Masc ! Sg ! c ; - a = AgP3 Sg Masc ; + a = AgP3 Sg Masc pol ; possessive = \\_,_,_ => (mkPronoun_Gend lemma).s ! Masc ! Sg ! Gen ; } ; diff --git a/lib/src/latvian/PhraseLav.gf b/lib/src/latvian/PhraseLav.gf index 0824589bd..d1b5fed7d 100644 --- a/lib/src/latvian/PhraseLav.gf +++ b/lib/src/latvian/PhraseLav.gf @@ -23,7 +23,7 @@ lin UttAdv adv = adv ; -- FIXME: neesmu līdz galam drošs vai agreement ir tieši (AgPr Pl) - UttVP vp = { s = build_VP vp Pos Infinitive (AgP3 Pl Masc) } ; + UttVP vp = { s = build_VP vp Pos Infinitive (AgP3 Pl Masc Pos) } ; UttIP ip = { s = ip.s ! Nom } ; UttIAdv iadv = iadv ; diff --git a/lib/src/latvian/QuestionLav.gf b/lib/src/latvian/QuestionLav.gf index 16d74b44c..0d463ef7f 100644 --- a/lib/src/latvian/QuestionLav.gf +++ b/lib/src/latvian/QuestionLav.gf @@ -14,13 +14,13 @@ flags lin QuestCl cl = { s = \\m,p => "vai" ++ cl.s ! m ! p } ; - QuestVP ip vp = { s = \\m,p => ip.s ! Nom ++ buildVerb vp.v m p (AgP3 ip.n Masc) False vp.objNeg } ; + QuestVP ip vp = { s = \\m,p => ip.s ! Nom ++ buildVerb vp.v m p (AgP3 ip.n Masc Pos) Pos vp.objNeg } ; QuestSlash ip slash = { s = \\m,p => slash.p.s ++ ip.s ! (slash.p.c ! ip.n) ++ slash.s ! m ! p } ; QuestIAdv iadv cl = { s = \\m,p => iadv.s ++ cl.s ! m ! p } ; - QuestIComp icomp np = { s = \\m,p => icomp.s ++ buildVerb mkVerb_Irreg_Be m p np.a np.isNeg False ++ np.s ! Nom } ; + QuestIComp icomp np = { s = \\m,p => icomp.s ++ buildVerb mkVerb_Irreg_Be m p np.a (fromAgr np.a).pol Pos ++ np.s ! Nom } ; IdetQuant idet num = { s = \\g => idet.s ! g ! num.n ++ num.s ! g ! Nom ; diff --git a/lib/src/latvian/RelativeLav.gf b/lib/src/latvian/RelativeLav.gf index e753d55aa..511cdbdca 100644 --- a/lib/src/latvian/RelativeLav.gf +++ b/lib/src/latvian/RelativeLav.gf @@ -29,8 +29,8 @@ oper _ => 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 + Nom => buildVerb vp.v mood pol (AgP3 (fromAgr agr).num (fromAgr agr).gend Pos) Pos vp.objNeg ; -- TODO: kāpēc P3 nevis agr, kāds tas ir? + _ => buildVerb vp.v mood pol vp.agr.agr Pos vp.objNeg -- TODO: test me } ++ vp.compl ! agr -- Object(s), complements, adverbial modifiers } ; diff --git a/lib/src/latvian/ResLav.gf b/lib/src/latvian/ResLav.gf index 4f200b66a..d8037ea57 100644 --- a/lib/src/latvian/ResLav.gf +++ b/lib/src/latvian/ResLav.gf @@ -52,7 +52,8 @@ param -- Verb agreement -- Number depends on the person -- Gender has to be taken into accunt because of predicative nominals and participles - Agr = AgP1 Number Gender | AgP2 Number Gender | AgP3 Number Gender ; + -- Polarity may depend on the subject/object NP (double negation, if subject/object has a negated determiner) + Agr = AgP1 Number Gender | AgP2 Number Gender | AgP3 Number Gender Polarity ; -- Clause agreement -- TODO: jāpāriet uz vienotu TopicFocus (=> ieraksta tips) @@ -84,7 +85,7 @@ oper -- ne vienmēr ir abi un ne visas kombinācijas ir vajadzīgas -- -- TODO: lai varētu spēlēties ar vārdu secību, compl vēlāk būs jāskalda pa daļām - VP = { v : Verb ; compl : Agr => Str ; agr : ClAgr ; objNeg : Bool } ; + VP = { v : Verb ; compl : Agr => Str ; agr : ClAgr ; objNeg : Polarity } ; -- compl: objects, complements, adverbial modifiers -- topic: typically - subject -- focus: typically - objects, complements, adverbial modifiers @@ -99,11 +100,11 @@ oper --Valence : Type = { p : Prep ; c : Number => Case } ; -- e.g. 'ar' + Sg-Acc or Pl-Dat; Preposition may be skipped for simple case-baced valences - toAgr : Number -> Person -> Gender -> Agr = \num,pers,gend -> + toAgr : Person -> Number -> Gender -> Polarity -> Agr = \pers,num,gend,pol -> case pers of { P1 => AgP1 num gend ; P2 => AgP2 num gend ; - P3 => AgP3 num gend + P3 => AgP3 num gend pol } ; toClAgr : Case -> Case -> Agr -> Voice -> ClAgr = \c_topic,c_focus,agr,voice -> { @@ -113,33 +114,25 @@ oper voice = voice } ; - -- TODO: quick & dirty - toClAgr_Reg : Case -> ClAgr = \c_topic -> toClAgr c_topic Nom (AgP3 Sg Masc) Act ; + toClAgr_Reg : Case -> ClAgr = \c_topic -> toClAgr c_topic Nom (AgP3 Sg Masc Pos) Act ; - fromAgr : Agr -> { num : Number ; pers : Person ; gend : Gender } = \agr -> + fromAgr : Agr -> { pers : Person ; num : Number ; gend : Gender ; pol : Polarity } = \agr -> case agr of { - AgP1 num gend => { num = num ; pers = P1 ; gend = gend } ; - AgP2 num gend => { num = num ; pers = P2 ; gend = gend } ; - AgP3 num gend => { num = num ; pers = P3 ; gend = gend } + AgP1 num gend => { pers = P1 ; num = num ; gend = gend ; pol = Pos } ; + AgP2 num gend => { pers = P2 ; num = num ; gend = gend ; pol = Pos } ; + AgP3 num gend pol => { pers = P3 ; num = num ; gend = gend ; pol = pol } } ; - {- - fromClAgr : ClAgr -> { c_topic : Case ; c_focus : Case ; voice : Voice } = \agr -> - case agr of { - Topic c_topic voice => { c_topic = c_topic ; c_focus = Acc ; voice = voice } ; - TopicFocus c_topic c_focus _ voice => { c_topic = c_topic ; c_focus = c_focus ; voice = voice } - } ; - -} - conjAgr : Agr -> Agr -> Agr = \agr1,agr2 -> let a1 = fromAgr agr1 ; a2 = fromAgr agr2 in toAgr - (conjNumber a1.num a2.num) (conjPerson a1.pers a2.pers) -- FIXME: personu apvienošana ir tricky un ir jāuztaisa korekti - (conjGender a1.gend a2.gend) ; + (conjNumber a1.num a2.num) + (conjGender a1.gend a2.gend) + (conjPolarity a1.pol a2.pol) ; conjGender : Gender -> Gender -> Gender = \gend1,gend2 -> case gend1 of { @@ -147,6 +140,12 @@ oper _ => Masc } ; - agrgP3 : Number -> Gender -> Agr = \num,gend -> toAgr num P3 gend ; + conjPolarity : Polarity -> Polarity -> Polarity = \pol1,pol2 -> + case pol1 of { + Neg => Neg ; + _ => pol2 + } ; + + --agrP3 : Number -> Gender -> Polarity -> Agr = \num,gend,pol -> toAgr P3 num gend pol ; } diff --git a/lib/src/latvian/SentenceLav.gf b/lib/src/latvian/SentenceLav.gf index 699665fa9..0944877ce 100644 --- a/lib/src/latvian/SentenceLav.gf +++ b/lib/src/latvian/SentenceLav.gf @@ -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) } ; } diff --git a/lib/src/latvian/StructuralLav.gf b/lib/src/latvian/StructuralLav.gf index 96afcc041..3c9120377 100644 --- a/lib/src/latvian/StructuralLav.gf +++ b/lib/src/latvian/StructuralLav.gf @@ -22,60 +22,60 @@ lin s = (\\g,c => (mkPronoun_Gend "ikviens").s ! g ! Sg ! c) ; n = Sg ; d = Indef ; - isNeg = False + pol = Pos } ; someSg_Det = { s = (\\g,c => (mkPronoun_Gend "kāds").s ! g ! Sg ! c) ; -- TODO: lai atļautu arī tukšo, jāpieliek alternatīva: (\\_,_ => []) n = Sg ; d = Indef ; - isNeg = False + pol = Pos } ; somePl_Det = { s = (\\g,c => (mkPronoun_Gend "kāds").s ! g ! Pl ! c) ; -- TODO: lai atļautu arī tukšo, jāpieliek alternatīva: (\\_,_ => []) n = Pl ; d = Indef ; - isNeg = False + pol = Pos } ; few_Det = { s = (\\g,c => (mkPronoun_Gend "dažs").s ! g ! Pl ! c) ; n = Pl ; d = Indef ; - isNeg = False + pol = Pos } ; many_Det = { s = (\\g,c => (mkPronoun_Gend "daudzs").s ! g ! Pl ! c) ; -- 'daudzs' izlocīsies korekti uz daudzskaitļa 'daudzi'; tomēr nesmuki... n = Pl ; d = Indef ; - isNeg = False + pol = Pos } ; much_Det = { s = (\\g,c => "daudz") ; -- FIXME: piesaista ģenitīvu n = Sg ; d = Indef ; - isNeg = False + pol = Pos } ; this_Quant = { s = (mkPronoun_ThisThat This).s ; d = Def ; - isNeg = False + pol = Pos } ; that_Quant = { s = (mkPronoun_ThisThat That).s ; d = Def ; - isNeg = False + pol = Pos } ; no_Quant = { s = (mkPronoun_Gend "neviens").s ; d = Indef ; - isNeg = True + pol = Neg } ; -- P1 @@ -96,13 +96,13 @@ lin he_Pron = { s = \\c => (mkPronoun_Gend "viņš").s ! Masc ! Sg ! c ; - a = AgP3 Sg Masc ; + a = AgP3 Sg Masc Pos ; possessive = \\_,_,_ => "viņa" } ; she_Pron = { s = \\c => (mkPronoun_Gend "viņš").s ! Fem ! Sg ! c ; - a = AgP3 Sg Fem ; + a = AgP3 Sg Fem Pos ; possessive = \\_,_,_ => "viņas" } ; @@ -247,15 +247,15 @@ lin always_AdV = mkAdV "vienmēr" ; - somebody_NP = UsePron (mkPronoun_Body "kāds") ; - something_NP = UsePron (mkPronoun_Thing "kaut kas") ; - everybody_NP = UsePron (mkPronoun_Body "ikviens") ; - everything_NP = UsePron (mkPronoun_Thing "jebkas") ; - nobody_NP = UsePron (mkPronoun_Body "neviens") ; - nothing_NP = UsePron (mkPronoun_Thing "nekas") ; + somebody_NP = UsePron (mkPronoun_Body "kāds" Pos) ; + something_NP = UsePron (mkPronoun_Thing "kaut kas" Pos) ; + everybody_NP = UsePron (mkPronoun_Body "ikviens" Pos) ; + everything_NP = UsePron (mkPronoun_Thing "jebkas" Pos) ; + nobody_NP = UsePron (mkPronoun_Body "neviens" Neg) ; + nothing_NP = UsePron (mkPronoun_Thing "nekas" Neg) ; have_V2 = mkV2 (mkV "būt") nom_Prep Dat ; - have_V3 = mkV3 (mkV "būt") nom_Prep dat_Prep Dat ; + --have_V3 = mkV3 (mkV "būt") nom_Prep dat_Prep Dat ; want_VV = mkVV (mkV "vēlēties" third_conjugation) ; can_VV = mkVV (mkV "varēt" third_conjugation) ; diff --git a/lib/src/latvian/SymbolLav.gf b/lib/src/latvian/SymbolLav.gf index 24f3fb69d..5632c3eb3 100644 --- a/lib/src/latvian/SymbolLav.gf +++ b/lib/src/latvian/SymbolLav.gf @@ -17,20 +17,17 @@ lin CNIntNP cn i = { s = \\_ => cn.s ! Indef ! Sg ! Nom ++ i.s ; - a = agrgP3 Sg cn.g ; - isNeg = False + a = AgP3 Sg cn.g Pos } ; CNSymbNP det cn xs = { s = \\_ => det.s ! cn.g ! Nom ++ cn.s ! det.d ! det.n ! Nom ++ xs.s ; - a = agrgP3 det.n cn.g ; - isNeg = False + a = AgP3 det.n cn.g Pos } ; CNNumNP cn i = { s = \\_ => cn.s ! Indef ! Sg ! Nom ++ i.s ! Masc ! Nom ; - a = agrgP3 Sg cn.g ; - isNeg = False + a = AgP3 Sg cn.g Pos } ; SymbS sy = sy ; diff --git a/lib/src/latvian/VerbLav.gf b/lib/src/latvian/VerbLav.gf index 062632f80..e9c79b8de 100644 --- a/lib/src/latvian/VerbLav.gf +++ b/lib/src/latvian/VerbLav.gf @@ -25,35 +25,35 @@ lin v = v ; compl = \\_ => [] ; agr = toClAgr_Reg Nom ; - objNeg = False + objNeg = Pos } ; ComplVV vv vp = { v = vv ; compl = \\agr => build_VP vp Pos Infinitive agr ; agr = toClAgr_Reg vv.topic ; - objNeg = False + objNeg = Pos } ; ComplVS vs s = { v = vs ; compl = \\_ => "," ++ vs.subj.s ++ s.s ; agr = toClAgr_Reg vs.topic ; - objNeg = False + objNeg = Pos } ; ComplVQ vq qs = { v = vq ; compl = \\_ => "," ++ qs.s ; agr = toClAgr_Reg vq.topic ; - objNeg = False + objNeg = Pos } ; ComplVA va ap = { v = va ; compl = \\agr => ap.s ! Indef ! (fromAgr agr).gend ! (fromAgr agr).num ! Nom ; agr = toClAgr_Reg Nom ; - objNeg = False + objNeg = Pos } ; -- V2 -> VPSlash @@ -62,8 +62,8 @@ lin v = v2 ; compl = \\_ => [] ; p = v2.p ; - agr = toClAgr v2.topic (v2.p.c ! Sg) (AgP3 Sg Masc) Act ; -- overriden in ComplSlash - objNeg = False -- overriden in ComplSlash + agr = toClAgr v2.topic (v2.p.c ! Sg) (AgP3 Sg Masc Pos) Act ; -- overriden in ComplSlash + objNeg = Pos -- overriden in ComplSlash } ; -- VPSlash -> NP -> VP @@ -99,7 +99,7 @@ oper -- _ => Topic Nom -- kāpēc ne 'Topic topic_case'? -- TODO: remove } ; -} - objNeg = obj_np.isNeg + objNeg = (fromAgr obj_np.a).pol } ; lin @@ -112,7 +112,7 @@ lin compl = \\_ => [] ; p = v3.p2 ; agr = toClAgr v3.topic (v3.p1.c ! Sg) np.a Act ; -- TESTME: P1, P2 (in the focus) - objNeg = np.isNeg -- TESTME + objNeg = (fromAgr np.a).pol -- TESTME } ; -- V3 -> NP -> VPSlash ; -- give (it) to her @@ -122,8 +122,8 @@ lin v = v3 ; compl = \\_ => [] ; p = v3.p1 ; - agr = toClAgr v3.topic (v3.p2.c ! Sg) (AgP3 Sg Masc) Act ; -- FIXME: works only if the focus is P3 (Sg/Pl); TODO: P1, P2 (Sg, Pl) - objNeg = np.isNeg -- TESTME + agr = toClAgr v3.topic (v3.p2.c ! Sg) (AgP3 Sg Masc Pos) Act ; -- FIXME: works only if the focus is P3 (Sg/Pl); TODO: P1, P2 (Sg, Pl) + objNeg = (fromAgr np.a).pol -- TESTME } ; SlashV2V v2v vp = { @@ -131,7 +131,7 @@ lin compl = \\agr => build_VP vp Pos Infinitive agr ; p = v2v.p ; agr = toClAgr_Reg Nom ; - objNeg = False + objNeg = Pos } ; SlashV2S v2s s = { @@ -139,7 +139,7 @@ lin compl = \\_ => "," ++ v2s.subj.s ++ s.s ; p = v2s.p ; agr = toClAgr_Reg Nom ; - objNeg = False + objNeg = Pos } ; SlashV2Q v2q qs = { @@ -147,7 +147,7 @@ lin compl = \\_ => "," ++ qs.s ; p = v2q.p ; agr = toClAgr_Reg Nom ; - objNeg = False + objNeg = Pos } ; SlashV2A v2a ap = { @@ -155,7 +155,7 @@ lin compl = \\agr => ap.s ! Indef ! (fromAgr agr).gend ! (fromAgr agr).num ! Nom ; p = v2a.p ; agr = toClAgr_Reg Nom ; - objNeg = False + objNeg = Pos } ; SlashVV vv vpslash = { @@ -163,7 +163,7 @@ lin compl = \\agr => build_VP vpslash Pos Infinitive agr ; p = vpslash.p ; agr = toClAgr_Reg vv.topic ; - objNeg = False + objNeg = Pos } ; SlashV2VNP v2v np vpslash = insertObjC @@ -173,7 +173,7 @@ lin compl = \\agr => build_VP vpslash Pos Infinitive agr ; p = vpslash.p ; agr = toClAgr_Reg Nom ; - objNeg = False + objNeg = Pos } ; ReflVP vpslash = insertObjPre @@ -184,7 +184,7 @@ lin v = lin V mkVerb_Irreg_Be ; compl = \\agr => comp.s ! agr ; agr = toClAgr_Reg Nom ; - objNeg = False + objNeg = Pos } ; -- V2 -> VP @@ -193,8 +193,8 @@ lin v = v2 ; compl = \\_ => [] ; --agr = toClAgr v2.topic (v2.p.c ! Sg) (AgP3 Sg Masc) Pass ; -- FIXME(?): should not be overriden in ComplSlash; P3 restriction - never used? - agr = toClAgr (v2.p.c ! Sg) v2.topic (AgP3 Sg Masc) Pass ; -- FIXME(?): should not be overriden in ComplSlash; P3 restriction - never used? - objNeg = False -- overriden in ComplSlash + agr = toClAgr (v2.p.c ! Sg) v2.topic (AgP3 Sg Masc Pos) Pass ; -- FIXME(?): should not be overriden in ComplSlash; P3 restriction - never used? + objNeg = Pos -- overriden in ComplSlash } ; -- VP -> Prep -> VPSlash @@ -239,13 +239,13 @@ oper } ; -- FIXME: the type of the participle form - depending on what?! (currently fixed) - buildVerb : Verb -> VerbMood -> Polarity -> Agr -> Bool -> Bool -> Str = + buildVerb : Verb -> VerbMood -> Polarity -> Agr -> Polarity -> Polarity -> Str = \v,mood,pol,subjAgr,subjNeg,objNeg -> let pol_prim : Polarity = case of { - => Neg ; - <_, True> => Neg ; - _ => pol + => Neg ; + <_, Neg> => Neg ; + _ => pol } ; agr = fromAgr subjAgr ; --# notpresent