From 3aa95e3fe916d1b2b71651651afecf144116eb54 Mon Sep 17 00:00:00 2001 From: Normunds Gruzitis Date: Sat, 18 Aug 2012 04:56:33 +0000 Subject: [PATCH] More improvements to the Latvian resource grammar (motivated by PhrasebookLav) - Few bug-fixes (agreement between Pron and ComplAP; C1 verb paradigm; how8much_IAdv / how8many_IDet). - Differentiation between male and female pronouns. - Irregular verbs now can have prefixes. - Code refactoring. --- lib/src/latvian/ExtraLav.gf | 18 +- lib/src/latvian/ExtraLavAbs.gf | 13 +- lib/src/latvian/IdiomLav.gf | 8 +- lib/src/latvian/NounLav.gf | 4 +- lib/src/latvian/ParadigmsAdjectivesLav.gf | 13 +- lib/src/latvian/ParadigmsNounsLav.gf | 21 +- lib/src/latvian/ParadigmsPronounsLav.gf | 156 ++++++++++++- lib/src/latvian/ParadigmsVerbsLav.gf | 26 ++- lib/src/latvian/ResLav.gf | 18 +- lib/src/latvian/SentenceLav.gf | 10 +- lib/src/latvian/StructuralLav.gf | 267 ++++------------------ lib/src/latvian/VerbLav.gf | 28 +-- 12 files changed, 297 insertions(+), 285 deletions(-) diff --git a/lib/src/latvian/ExtraLav.gf b/lib/src/latvian/ExtraLav.gf index e174e2a3f..c04230933 100644 --- a/lib/src/latvian/ExtraLav.gf +++ b/lib/src/latvian/ExtraLav.gf @@ -1,11 +1,27 @@ --# -path=.:../abstract:../common:../prelude -concrete ExtraLav of ExtraLavAbs = CatLav ** open ResLav in { +concrete ExtraLav of ExtraLavAbs = CatLav ** open + ParadigmsLav, + ParadigmsPronounsLav, + ResLav + in { flags coding = utf8 ; lin + to8uz_Prep = mkPrep "uz" Acc Dat ; + + i8fem_Pron = mkPronoun_I Fem ; + we8fem_Pron = mkPronoun_We Fem ; + + youSg8fem_Pron = mkPronoun_You_Sg Fem ; + youPol8fem_Pron = mkPronoun_You_Pol Fem ; + youPl8fem_Pron = mkPronoun_You_Pl Fem ; + + they8fem_Pron = mkPronoun_They Fem ; + it8fem_Pron = mkPronoun_It_Sg Fem ; + GenNP np = {s = \\_,_,_ => np.s ! Gen ; d = Def} ; --ICompAP ap = {s = \\g,n => "cik" ++ ap.s ! Indef ! g ! n ! Nom } ; diff --git a/lib/src/latvian/ExtraLavAbs.gf b/lib/src/latvian/ExtraLavAbs.gf index e8b8a7af0..c57cb3ca9 100644 --- a/lib/src/latvian/ExtraLavAbs.gf +++ b/lib/src/latvian/ExtraLavAbs.gf @@ -1,3 +1,14 @@ --# -path=.:../abstract:../common:../prelude -abstract ExtraLavAbs = Extra ** {} +abstract ExtraLavAbs = Extra ** { + fun + to8uz_Prep : Prep ; -- "to" in the sense of "uz" (direction) + + i8fem_Pron : Pron ; + we8fem_Pron : Pron ; + youSg8fem_Pron : Pron ; + youPol8fem_Pron : Pron ; + youPl8fem_Pron : Pron ; + they8fem_Pron : Pron ; + it8fem_Pron : Pron ; +} diff --git a/lib/src/latvian/IdiomLav.gf b/lib/src/latvian/IdiomLav.gf index 5a87f7150..f32182b45 100644 --- a/lib/src/latvian/IdiomLav.gf +++ b/lib/src/latvian/IdiomLav.gf @@ -53,13 +53,13 @@ lin ProgrVP v = v ; ImpPl1 vp = - let a = AgP1 Pl + let a = AgP1 Pl Masc in { s = - vp.v.s ! Pos ! (Indicative P1 Pl Pres) ++ -- Verb - vp.s2 ! a -- Object(s), complements, adverbial modifiers + vp.v.s ! Pos ! (Indicative P1 Pl Pres) ++ -- Verb + vp.s2 ! a -- Object(s), complements, adverbial modifiers } - | { s = vp.v.s ! Pos ! (Indicative P1 Pl Fut) ++ vp.s2 ! a } --# notpresent + | { s = vp.v.s ! Pos ! (Indicative P1 Pl Fut) ++ vp.s2 ! a } --# notpresent ; ImpP3 np vp = { diff --git a/lib/src/latvian/NounLav.gf b/lib/src/latvian/NounLav.gf index a7740978c..89044eb77 100644 --- a/lib/src/latvian/NounLav.gf +++ b/lib/src/latvian/NounLav.gf @@ -12,7 +12,7 @@ flags lin UseN n = { s = \\_ => n.s ; g = n.g } ; - UsePN pn = { s = pn.s ; a = agrgP3 Sg pn.g } ; + UsePN pn = { s = pn.s ; a = agrgP3 pn.n pn.g } ; UsePron p = p ; PredetNP pred np = { @@ -21,7 +21,7 @@ lin } ; UseN2 n = { s = \\_ => n.s ; g = n.g } ; - UseN3 n = n ; + --UseN3 n = n ; ComplN2 f x = { s = \\_,n,c => preOrPost f.isPre (f.p.s ++ x.s ! (f.p.c ! (fromAgr x.a).n)) (f.s ! n ! c) ; diff --git a/lib/src/latvian/ParadigmsAdjectivesLav.gf b/lib/src/latvian/ParadigmsAdjectivesLav.gf index 5f1c24f25..ee1561581 100644 --- a/lib/src/latvian/ParadigmsAdjectivesLav.gf +++ b/lib/src/latvian/ParadigmsAdjectivesLav.gf @@ -69,15 +69,20 @@ oper } }; + -- TODO: Vai vajag iznest polaritāti ārpusē lai ir noliegtie kā atsevišķi īpašībasvārdi? + -- Praksē lielākoties pietiek ar palīgverba noliegumu? + -- TODO: Jāpieliek parametrs Tense: present = ziedošs, izsalkstošs; past = ziedējis, izsalcis. + -- Vai arī jāpadod Str "-is"/"-ošs" un pa tiešo jāizsauc mkParticiple, bet + -- kā šis mkA(Str) atšķirsies no citiem mkA(Str)? mkAdjective_Participle : Verb -> Adj = \v -> { s = table { - AAdj Posit Indef g n c => v.s ! Pos !(Participle g n c); --FIXME - iznest polaritāti ārpusē lai ir noliegtie kā atsevišķi īpašībasvārdi - _ => NON_EXISTENT --FIXME - salikt arī tās divdabja formas - } + AAdj Posit Indef g n c => v.s ! Pos ! (Participle g n c) ; + _ => NON_EXISTENT + } }; -- Positive degree: -s, -š (Indef and Def); -ais (Def only) - -- TODO - atsaukties uz lietvārdu locīšanas tabulām? + -- TODO: atsaukties uz lietvārdu locīšanas tabulām? mkAdjective_Pos : Str -> Definite -> Gender => Number => Case => Str = \lemma,defin -> let stem : Str = case lemma of { s + "ais" => s ; diff --git a/lib/src/latvian/ParadigmsNounsLav.gf b/lib/src/latvian/ParadigmsNounsLav.gf index d4df721da..5535d8dde 100644 --- a/lib/src/latvian/ParadigmsNounsLav.gf +++ b/lib/src/latvian/ParadigmsNounsLav.gf @@ -11,8 +11,8 @@ flags coding = utf8 ; oper - Noun : Type = {s : Number => Case => Str ; g : Gender} ; - ProperNoun : Type = {s : Case => Str; g : Gender; n : Number} ; + Noun : Type = { s : Number => Case => Str ; g : Gender } ; + ProperNoun : Type = { s : Case => Str ; g : Gender ; n : Number } ; masculine : Gender = Masc ; feminine : Gender = Fem ; @@ -21,15 +21,13 @@ oper mkNoun : Str -> Noun = \lemma -> mkNounByPal lemma True ; - mkProperNoun : Str -> Number -> ProperNoun = \lemma,number -> + mkProperNoun : Str -> Number -> ProperNoun = \lemma,number -> let noun = mkNoun lemma - in { - s = table { - c => noun.s ! number ! c - } ; - g = noun.g ; - n = number - } ; + in { + s = \\c => noun.s ! number ! c ; + g = noun.g ; + n = number + } ; {- mkCardinalNumeral : Str -> CardinalNumeral = \lemma -> @@ -78,7 +76,8 @@ oper s + "s" => case gend of {Masc => D1 ; Fem => D6} ; s + "a" => D4 ; s + "e" => D5 ; - s + #vowel => D0 + s + #vowel => D0 ; + _ => D0 } in mkNounByGendDeclPal lemma gend decl pal ; diff --git a/lib/src/latvian/ParadigmsPronounsLav.gf b/lib/src/latvian/ParadigmsPronounsLav.gf index c9af5b1ec..f4973a49c 100644 --- a/lib/src/latvian/ParadigmsPronounsLav.gf +++ b/lib/src/latvian/ParadigmsPronounsLav.gf @@ -8,13 +8,165 @@ resource ParadigmsPronounsLav = open in { flags - coding = utf8; + coding = utf8 ; oper - PronGend : Type = {s : Gender => Number => Case => Str} ; + PronGend : Type = { s : Gender => Number => Case => Str } ; + Pron : Type = { s : Case => Str ; a : ResLav.Agr ; possessive : Gender => Number => Case => Str } ; -- PRONOUNS (incl. 'determiners') + mkPronoun_I : Gender -> Pron = \g -> { + s = table { + Nom => "es" ; + Gen => "manis" ; + Dat => "man" ; + Acc => "mani" ; + Loc => "manī" ; + ResLav.Voc => NON_EXISTENT + } ; + a = AgP1 Sg g ; + possessive = table { + Masc => table { + Sg => table { + Nom => "mans" ; + Gen => "mana" ; + Dat => "manam" ; + Acc => "manu" ; + Loc => "manā" ; + ResLav.Voc => "mans" + } ; + Pl => table { + Nom => "mani" ; + Gen => "manu" ; + Dat => "maniem" ; + Acc => "manus" ; + Loc => "manos" ; + ResLav.Voc => "mani" + } + } ; + Fem => table { + Sg => table { + Nom => "mana" ; + Gen => "manas" ; + Dat => "manai" ; + Acc => "manu" ; + Loc => "manā" ; + ResLav.Voc => "mana" + } ; + Pl => table { + Nom => "manas" ; + Gen => "manu" ; + Dat => "manām" ; + Acc => "manas" ; + Loc => "manās" ; + ResLav.Voc => "manas" + } + } + } + } ; + + mkPronoun_We : Gender -> Pron = \g -> { + s = table { + Nom => "mēs" ; + Gen => "mūsu" ; + Dat => "mums" ; + Acc => "mūs" ; + Loc => "mūsos" ; + ResLav.Voc => NON_EXISTENT + } ; + a = AgP1 Pl g ; + possessive = \\_,_,_ => "mūsu" + } ; + + mkPronoun_You_Sg : Gender -> Pron = \g -> { + s = table { + Nom => "tu" ; + Gen => "tevis" ; + Dat => "tev" ; + Acc => "tevi" ; + Loc => "tevī" ; + ResLav.Voc => "tu" + } ; + a = AgP2 Sg g ; + possessive = table { + Masc => table { + Sg => table { + Nom => "tavs" ; + Gen => "tava" ; + Dat => "tavam" ; + Acc => "tavu" ; + Loc => "tavā" ; + ResLav.Voc => "tavs" + }; + Pl => table { + Nom => "tavi" ; + Gen => "tavu" ; + Dat => "taviem" ; + Acc => "tavus" ; + Loc => "tavos" ; + ResLav.Voc => "tavi" + } + } ; + Fem => table { + Sg => table { + Nom => "tava" ; + Gen => "tavas" ; + Dat => "tavai" ; + Acc => "tavu" ; + Loc => "tavā" ; + ResLav.Voc => "tava" + }; + Pl => table { + Nom => "tavas" ; + Gen => "tavu" ; + Dat => "tavām" ; + Acc => "tavas" ; + Loc => "tavās" ; + ResLav.Voc => "tavas" + } + } + } + } ; + + mkPronoun_You_Pol : Gender -> Pron = \g -> { + s = table { + Nom => "jūs" ; + Gen => "jūsu" ; + Dat => "jums" ; + Acc => "jūs" ; + Loc => "jūsos" ; + ResLav.Voc => "jūs" + } ; + a = AgP2 Pl g ; -- FIXME: in the case of a predicate nominal: copula=Pl, complement=Sg + possessive = \\_,_,_ => "jūsu" + } ; + + mkPronoun_You_Pl : Gender -> Pron = \g -> { + s = table { + Nom => "jūs" ; + Gen => "jūsu" ; + Dat => "jums" ; + Acc => "jūs" ; + Loc => "jūsos" ; + ResLav.Voc => "jūs" + } ; + a = AgP2 Pl g ; + possessive = \\_,_,_ => "jūsu" + } ; + + mkPronoun_They : Gender -> Pron = \g -> { + s = \\c => (mkPronoun_Gend "viņš").s ! g ! Pl ! c ; + a = AgP3 Pl g ; + possessive = \\_,_,_ => "viņu" + } ; + + mkPronoun_It_Sg : Gender -> Pron = \g -> { + s = \\c => (mkPronoun_ThisThat That).s ! g ! Sg ! c; + a = AgP3 Sg g ; + possessive = \\_,_,_ => case g of { Masc => "tā" ; Fem => "tās" } + } ; + -- Gender=>Number=>Case P3 pronouns -- Expected ending of a lemma: -s or -š (Masc=>Sg=>Nom) -- Examples: diff --git a/lib/src/latvian/ParadigmsVerbsLav.gf b/lib/src/latvian/ParadigmsVerbsLav.gf index 021687cce..0d9e4349e 100644 --- a/lib/src/latvian/ParadigmsVerbsLav.gf +++ b/lib/src/latvian/ParadigmsVerbsLav.gf @@ -356,9 +356,11 @@ oper mkVerb_Irreg : Str -> Verb = \lemma -> case lemma of { "būt" => mkVerb_Irreg_Be ; - "iet" => mkVerb_Irreg_Walk ; - "gulēt" => mkVerb_Irreg_Sleep - -- TODO: dot, ..? + "iet" => mkVerb_Irreg_Go ; + #prefix + "iet" => mkVerb_Irreg_Go_Prefix (Predef.tk 3 lemma) ; + "gulēt" => mkVerb_Irreg_Sleep -- FIXME: Should be treated as a regular verb (C3: gulēt, sēdēt etc.) + -- TODO: add "dot"/Give (+prefix, +refl) + -- TODO: multiple prefixes -- TODO: move to IrregLav? } ; @@ -387,18 +389,20 @@ oper } } ; - mkVerb_Irreg_Walk : Verb = { + mkVerb_Irreg_Go : Verb = mkVerb_Irreg_Go_Prefix "" ; + + mkVerb_Irreg_Go_Prefix : Str -> Verb = \pref -> { s = table { Pos => table { - Indicative P3 _ Pres => "iet" ; - Debitive => "jāiet" ; - x => (mkVerb_C1 "iet" "eju" "gāju" ).s ! x + Indicative P3 _ Pres => pref + "iet" ; + Debitive => "jā" + pref + "iet" ; + x => (mkVerb_C1 (pref + "iet") (pref + "eju") (pref + "gāju")).s ! x } ; Neg => table { - Indicative P3 _ Pres => "neiet" ; + Indicative P3 _ Pres => "ne" + pref + "iet" ; Debitive => NON_EXISTENT ; DebitiveRelative => NON_EXISTENT ; - x => (mkVerb_C1 "neiet" "neeju" "negāju" ).s ! x + x => (mkVerb_C1 ("ne" + pref + "iet") ("ne" + pref + "eju") ("ne" + pref + "gāju")).s ! x } } } ; @@ -409,7 +413,7 @@ oper Indicative P2 Sg Pres => (mkVerb_C3 "gulēt").s ! Indicative P2 Sg Pres ; Indicative p n Pres => (mkVerb_C3 "guļēt").s ! Indicative p n Pres ; - -- Here and there: the incorrect 'guļēt' contains intentional palatalization + -- FIXME: Here and there, the incorrect 'guļēt' contains intentional palatalization Relative Pres => (mkVerb_C3 "guļēt").s ! Relative Pres ; @@ -489,6 +493,7 @@ oper pal_C1_4 : Str -> Str = \stem -> case stem of { s + "k" => s + "c" ; + s + "t" => s + "ti" ; _ => stem } ; @@ -545,6 +550,7 @@ oper -- Declinable participles: syntactic function - attribute => category - adjective -- TODO: declinable participles => adjectives -- TODO: -ot, -am, -ām; -dams/dama, -damies/damās; -ošs/oša, -ams/ama, -āms/āma, -ts/ta + -- Nē, -ošs/oša ir tikai adjektīvi! Divdabji - tikai verbālās formas! (sk. Baibas sarakstu) mkParticiple : Gender -> Number -> Case -> Str -> Str = \g,n,c,stem -> mkParticiple_IsUsi g n c stem stem ; diff --git a/lib/src/latvian/ResLav.gf b/lib/src/latvian/ResLav.gf index b5bccb527..7066d42ec 100644 --- a/lib/src/latvian/ResLav.gf +++ b/lib/src/latvian/ResLav.gf @@ -45,9 +45,9 @@ param VerbConj = C2 | C3 ; - --Agr = Ag Gender Number ; - -- TODO: kāpēc P3 jāsaskaņo Gender? divdabju dēļ? - Agr = AgP1 Number | AgP2 Number | AgP3 Number Gender ; + -- TODO: Kāpēc Gender ir tikai P3? Lokāmo divdabju dēļ? + -- Dzimte jāsaskaņo vienmēr - nominālo izteicēju dēļ... + Agr = AgP1 Number Gender | AgP2 Number Gender | AgP3 Number Gender ; ThisOrThat = This | That ; CardOrd = NCard | NOrd ; @@ -61,11 +61,13 @@ oper sonantCons : pattern Str = #("l"|"m"|"n"|"r"|"ļ"|"ņ") ; doubleCons : pattern Str = #("ll"|"ln"|"nn"|"sl"|"sn"|"st"|"zl"|"zn") ; + prefix : pattern Str = #("aiz"|"ap"|"at"|"ie"|"iz"|"no"|"pa"|"pār"|"pie"|"sa"|"uz") ; + NON_EXISTENT : Str = "NON_EXISTENT" ; Verb : Type = { s : Polarity => VerbForm => Str } ; - VP = { v : Verb ; s2 : Agr => Str } ; -- s2 = object(s), complements, adverbial modifiers + VP = { v : Verb ; s2 : Agr => Str } ; -- s2 = object(s), complements, adverbial modifiers VPSlash = VP ** { p : prep } ; -- principā rekur ir objekts kuram jau kaut kas ir bet ir vēl viena brīva valence... @@ -77,15 +79,15 @@ oper toAgr : Number -> Person -> Gender -> Agr = \n,p,g -> case p of { - P1 => AgP1 n ; - P2 => AgP2 n ; + P1 => AgP1 n g ; + P2 => AgP2 n g ; P3 => AgP3 n g } ; fromAgr : Agr -> { n : Number ; p : Person ; g : Gender } = \a -> case a of { - AgP1 n => { n = n ; p = P1 ; g = Masc } ; -- FIXME: 'es esmu skaista' - AgP2 n => { n = n ; p = P2 ; g = Masc } ; -- FIXME: 'tu esi skaista' + AgP1 n g => { n = n ; p = P1 ; g = g } ; + AgP2 n g => { n = n ; p = P2 ; g = g } ; AgP3 n g => { n = n ; p = P3 ; g = g } } ; diff --git a/lib/src/latvian/SentenceLav.gf b/lib/src/latvian/SentenceLav.gf index 91ff5df6a..ec228e71a 100644 --- a/lib/src/latvian/SentenceLav.gf +++ b/lib/src/latvian/SentenceLav.gf @@ -14,7 +14,7 @@ lin PredSCVP sc vp = mkClauseSC sc vp ; - ImpVP vp = { s = \\pol, n => vp.v.s ! pol ! (Imperative n) ++ vp.s2 ! (AgP2 n) } ; + ImpVP vp = { s = \\pol,n => vp.v.s ! pol ! (Imperative n) ++ vp.s2 ! (AgP2 n Masc) } ; SlashVP np vp = mkClause np vp ** { p = vp.p } ; @@ -54,13 +54,13 @@ lin oper mkClause : NP -> CatLav.VP -> Cl = \np,vp -> lin Cl { s = \\mood,pol => - case mood of { -- Subject + case mood of { -- Subject -- FIXME: jāčeko valences, reizēm arī īstenības izteiksmē - 'man patīk kaut kas' - Deb _ _ => np.s ! Dat ; --# notpresent + Deb _ _ => np.s ! Dat ; --# notpresent _ => np.s ! Nom } ++ - buildVerb vp.v mood pol np.a ++ -- Verb - vp.s2 ! np.a -- Object(s), complements, adverbial modifiers + buildVerb vp.v mood pol np.a ++ -- Verb + vp.s2 ! np.a -- Object(s), complements, adverbial modifiers } ; -- FIXME: quick&dirty - lai kompilētos pret RGL API diff --git a/lib/src/latvian/StructuralLav.gf b/lib/src/latvian/StructuralLav.gf index 211cb6381..19ff991a4 100644 --- a/lib/src/latvian/StructuralLav.gf +++ b/lib/src/latvian/StructuralLav.gf @@ -62,244 +62,61 @@ lin d = Def } ; + -- P1 - i_Pron = { - s = table { - Nom => "es"; - Gen => "manis"; - Dat => "man"; - Acc => "mani"; - Loc => "manī"; - ResLav.Voc => NON_EXISTENT - } ; - possessive = table { - Masc => table { - Sg => table { - Nom => "mans"; - Gen => "mana"; - Dat => "manam"; - Acc => "manu"; - Loc => "manā"; - ResLav.Voc => "mans" - }; - Pl => table { - Nom => "mani"; - Gen => "manu"; - Dat => "maniem"; - Acc => "manus"; - Loc => "manos"; - ResLav.Voc => "mani" - } - } ; - Fem => table { - Sg => table { - Nom => "mana"; - Gen => "manas"; - Dat => "manai"; - Acc => "manu"; - Loc => "manā"; - ResLav.Voc => "mana" - }; - Pl => table { - Nom => "manas"; - Gen => "manu"; - Dat => "manām"; - Acc => "manas"; - Loc => "manās"; - ResLav.Voc => "manas" - } - } - } ; - a = AgP1 Sg ; - } ; + i_Pron = mkPronoun_I Masc ; -- See also: ExtraLav.i8fem_Pron - we_Pron = { - s = table { - Nom => "mēs"; - Gen => "mūsu"; - Dat => "mums"; - Acc => "mūs"; - Loc => "mūsos"; - ResLav.Voc => NON_EXISTENT - } ; - possessive = table { - _ => table { - _ => table { - _ => "mūsu" - } - } - } ; - a = AgP1 Pl ; - } ; + we_Pron = mkPronoun_We Masc ; -- See also: ExtraLav.we8fem_Pron - youSg_Pron = { - s = table { - Nom => "tu"; - Gen => "tevis"; - Dat => "tev"; - Acc => "tevi"; - Loc => "tevī"; - ResLav.Voc => "tu" - } ; - possessive = table { - Masc => table { - Sg => table { - Nom => "tavs"; - Gen => "tava"; - Dat => "tavam"; - Acc => "tavu"; - Loc => "tavā" ; - ResLav.Voc => "tavs" - }; - Pl => table { - Nom => "tavi"; - Gen => "tavu"; - Dat => "taviem"; - Acc => "tavus"; - Loc => "tavos"; - ResLav.Voc => "tavi" - } - } ; - Fem => table { - Sg => table { - Nom => "tava"; - Gen => "tavas"; - Dat => "tavai"; - Acc => "tavu"; - Loc => "tavā"; - ResLav.Voc => "tava" - }; - Pl => table { - Nom => "tavas"; - Gen => "tavu"; - Dat => "tavām"; - Acc => "tavas"; - Loc => "tavās"; - ResLav.Voc => "tavas" - } - } - } ; - a = AgP2 Sg ; - } ; + -- P2 - youPl_Pron = { - s = table { - Nom => "jūs"; - Gen => "jūsu"; - Dat => "jums"; - Acc => "jūs"; - Loc => "jūsos"; - ResLav.Voc => "jūs" - } ; - possessive = table { - _ => table { - _ => table { - _ => "jūsu" - } - } - } ; - a = AgP2 Pl ; - } ; + youSg_Pron = mkPronoun_You_Sg Masc ; -- See also: ExtraLav.youSg8fem_Pron - youPol_Pron = { - s = table { - Nom => "jūs"; - Gen => "jūsu"; - Dat => "jums"; - Acc => "jūs"; - Loc => "jūsos"; - ResLav.Voc => "jūs" - } ; - possessive = table { - _ => table { - _ => table { - _ => "jūsu" - } - } - } ; - a = AgP2 Pl ; - } ; + youPol_Pron = mkPronoun_You_Pol Masc ; -- See also: ExtraLav.youPol8fem_Pron + + youPl_Pron = mkPronoun_You_Pl Masc ; -- See also: ExtraLav.youPl8fem_Pron + + -- P3 he_Pron = { - s = (\\c => (mkPronoun_Gend "viņš").s ! Masc ! Sg ! c) ; - possessive = table { - _ => table { - _ => table { - _ => "viņa" - } - } - } ; - a = AgP3 Sg Masc ; + s = \\c => (mkPronoun_Gend "viņš").s ! Masc ! Sg ! c ; + a = AgP3 Sg Masc ; + possessive = \\_,_,_ => "viņa" } ; she_Pron = { - s = (\\c => (mkPronoun_Gend "viņš").s ! Fem ! Sg ! c) ; - possessive = table { - _ => table { - _ => table { - _ => "viņas" - } - } - } ; - a = AgP3 Sg Fem ; + s = \\c => (mkPronoun_Gend "viņš").s ! Fem ! Sg ! c ; + a = AgP3 Sg Fem ; + possessive = \\_,_,_ => "viņas" } ; - they_Pron = { - s = (\\c => (mkPronoun_Gend "viņš").s ! Masc ! Pl ! c) ; - possessive = table { - _ => table { - _ => table { - _ => "viņu" - } - } - } ; - a = AgP3 Pl Masc ; - } | - { - s = (\\c => (mkPronoun_Gend "viņš").s ! Fem ! Pl ! c) ; - possessive = table { - _ => table { - _ => table { - _ => "viņu" - } - } - } ; - a = AgP3 Pl Fem ; - } ; + they_Pron = mkPronoun_They Masc ; -- See also: ExtraLav.they8fem_Pron - it_Pron = { - s = \\c => (mkPronoun_ThisThat That).s ! Masc ! Sg ! c; - possessive = table { _ => table { _ => table { _ => "tā" }}}; - a = AgP3 Sg Masc - } | { - s = \\c => (mkPronoun_ThisThat That).s ! Fem ! Sg ! c; - possessive = table { _ => table { _ => table { _ => "tās" }}}; - a = AgP3 Sg Fem - }; + it_Pron = mkPronoun_It_Sg Masc ; -- See also: ExtraLav.it8fem_Pron -- manuprāt prievārdi tomēr ir valodas-specifiski un nebūtu tieši 1-pret-1 jātulko - above_Prep = mkPrep "virs" Gen Dat; - after_Prep = mkPrep "pēc" Gen Dat; - before_Prep = mkPrep "pirms" Gen Dat; - behind_Prep = mkPrep "aiz" Gen Dat; - between_Prep = mkPrep "starp" Acc Dat; - for_Prep = mkPrep "priekš" Gen Dat; - from_Prep = mkPrep "no" Gen Dat; - on_Prep = mkPrep "uz" Gen Dat; - with_Prep = mkPrep "ar" Acc Dat; -- ar sievu, ar sievām + above_Prep = mkPrep "virs" Gen Dat ; + after_Prep = mkPrep "pēc" Gen Dat ; + before_Prep = mkPrep "pirms" Gen Dat ; + behind_Prep = mkPrep "aiz" Gen Dat ; + between_Prep = mkPrep "starp" Acc Dat ; + for_Prep = mkPrep "priekš" Gen Dat ; + from_Prep = mkPrep "no" Gen Dat ; + on_Prep = mkPrep "uz" Gen Dat ; + with_Prep = mkPrep "ar" Acc Dat ; -- ar sievu, ar sievām in_Prep = mkPrep Loc ; - to_Prep = mkPrep "līdz" Dat Dat; --FIXME - ļoti dažādi tulkojas - possess_Prep = mkPrep Gen ; --FIXME - reku vajadzētu vārdu secību otrādi, ka pirms paskaidrojamā vārda likt - 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 - by8means_Prep = mkPrep "ar" Acc Dat; - during_Prep = mkPrep "laikā" Gen Gen; --FIXME nevaru saprast. laikam postfix 'X laikā' jāliek - in8front_Prep = mkPrep "priekšā" Dat Dat; + to_Prep = mkPrep "līdz" Dat Dat ; -- See also: ExtraLav.to8uz_Prep + possess_Prep = mkPrep Gen ; -- FIXME: reku vajadzētu vārdu secību otrādi, ka pirms paskaidrojamā vārda likt + 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 + by8means_Prep = mkPrep "ar" Acc Dat ; + during_Prep = mkPrep "laikā" Gen Gen ; -- FIXME: nevaru saprast; laikam postfix 'X laikā' jāliek + in8front_Prep = mkPrep "priekšā" Dat Dat ; part_Prep = mkPrep Gen ; --FIXME - reku vajadzētu vārdu secību otrādi, ka pirms paskaidrojamā vārda likt - through_Prep = mkPrep "cauri" Dat Dat; - except_Prep = mkPrep "izņemot" Acc Acc; + through_Prep = mkPrep "cauri" Dat Dat ; + except_Prep = mkPrep "izņemot" Acc Acc ; very_AdA = mkAdA "ļoti" ; almost_AdA = mkAdA "gandrīz" ; @@ -380,7 +197,7 @@ lin why_IAdv = ss "kāpēc" ; how_IAdv = ss "kā" ; - how8much_IAdv = ss "cik daudz" ; + how8much_IAdv = ss "cik" ; when_IAdv = ss "kad" ; where_IAdv = ss "kur" ; @@ -414,7 +231,11 @@ lin always_AdV = mkAdV "vienmēr" ; - how8many_IDet = { s = table { _ => "cik"}; n = Sg }; --TODO jātestē kā to pielieto un vai nevajag vēl kaut ko + -- TODO: jātestē kā to pielieto un vai nevajag vēl kaut ko + how8many_IDet = { + s = table { _ => "cik" } ; + n = Pl + } ; everybody_NP = DetCN emptyPl_Det (UseN (mkN "visi")); diff --git a/lib/src/latvian/VerbLav.gf b/lib/src/latvian/VerbLav.gf index 9ce8e9f17..65b6b7da3 100644 --- a/lib/src/latvian/VerbLav.gf +++ b/lib/src/latvian/VerbLav.gf @@ -76,26 +76,26 @@ oper buildVerb : Verb -> VerbMood -> Polarity -> Agr -> Str = \v,mood,pol,ag -> let ag = fromAgr ag - ; --# notpresent - part = v.s ! ResLav.Pos ! (Participle ag.g ag.n Nom) --# notpresent + ; --# notpresent + part = v.s ! ResLav.Pos ! (Participle ag.g ag.n Nom) --# notpresent in case mood of { Ind Simul tense => v.s ! pol ! (Indicative ag.p ag.n tense) - ; --# notpresent - Ind Anter tense => mkVerb_Irreg_Be.s ! pol ! (Indicative ag.p ag.n tense) ++ part ; --# notpresent + ; --# notpresent + Ind Anter tense => mkVerb_Irreg_Be.s ! pol ! (Indicative ag.p ag.n tense) ++ part ; --# notpresent -- FIXME(?): Rel _ Past => ... - Rel _ Past => ResLav.NON_EXISTENT ; --# notpresent - Rel Simul tense => v.s ! pol ! (Relative tense) ; --# notpresent - Rel Anter tense => mkVerb_Irreg_Be.s ! pol ! (Relative tense) ++ part ; --# notpresent + Rel _ Past => ResLav.NON_EXISTENT ; --# notpresent + Rel Simul tense => v.s ! pol ! (Relative tense) ; --# notpresent + Rel Anter tense => mkVerb_Irreg_Be.s ! pol ! (Relative tense) ++ part ; --# notpresent - Deb Simul tense => mkVerb_Irreg_Be.s ! pol ! (Indicative P3 Sg tense) ++ --# notpresent - v.s ! ResLav.Pos ! Debitive ; --# notpresent - Deb Anter tense => mkVerb_Irreg_Be.s ! pol ! (Indicative P3 Sg tense) ++ --# notpresent - mkVerb_Irreg_Be.s ! ResLav.Pos ! (Participle Masc Sg Nom) ++ --# notpresent - v.s ! ResLav.Pos ! Debitive ; --# notpresent + Deb Simul tense => mkVerb_Irreg_Be.s ! pol ! (Indicative P3 Sg tense) ++ --# notpresent + v.s ! ResLav.Pos ! Debitive ; --# notpresent + Deb Anter tense => mkVerb_Irreg_Be.s ! pol ! (Indicative P3 Sg tense) ++ --# notpresent + mkVerb_Irreg_Be.s ! ResLav.Pos ! (Participle Masc Sg Nom) ++ --# notpresent + v.s ! ResLav.Pos ! Debitive ; --# notpresent - Condit Simul => v.s ! pol ! (Indicative ag.p ag.n ParamX.Cond) ; --# notpresent - Condit Anter => mkVerb_Irreg_Be.s ! pol ! (Indicative ag.p ag.n ParamX.Cond) ++ part --# notpresent + Condit Simul => v.s ! pol ! (Indicative ag.p ag.n ParamX.Cond) ; --# notpresent + Condit Anter => mkVerb_Irreg_Be.s ! pol ! (Indicative ag.p ag.n ParamX.Cond) ++ part --# notpresent } ; -- TODO: nav testēts