diff --git a/lib/src/slovenian/CatSlv.gf b/lib/src/slovenian/CatSlv.gf index a339e4341..81b77aec2 100644 --- a/lib/src/slovenian/CatSlv.gf +++ b/lib/src/slovenian/CatSlv.gf @@ -17,7 +17,7 @@ lincat AP = {s : Species => Gender => Case => Number => Str} ; -- Noun - CN = {s : Species => Case => Number => Str; g : Gender} ; + CN = {s : Species => Case => Number => Str; g : AGender} ; NP = {s : Case => Str ; a : Agr} ; Pron = {s : Case => Str; poss : Gender => Case => Number => Str; a : Agr} ; @@ -42,7 +42,7 @@ lincat A = {s : AForm => Str}; - N = {s : Case => Number => Str; g : Gender}; - PN = {s : Case => Number => Str; g : Gender}; + N = {s : Case => Number => Str; g : AGender}; + PN = {s : Case => Number => Str; g : AGender}; } diff --git a/lib/src/slovenian/NounSlv.gf b/lib/src/slovenian/NounSlv.gf index 871f73d10..5b170ce26 100644 --- a/lib/src/slovenian/NounSlv.gf +++ b/lib/src/slovenian/NounSlv.gf @@ -2,12 +2,12 @@ concrete NounSlv of Noun = CatSlv ** open ResSlv in { lin DetCN det cn = { - s = \\c => det.s ! cn.g ! c ++ + s = \\c => det.s ! agender2gender cn.g ! c ++ case det.n of { UseNum n => cn.s ! det.spec ! c ! n ; UseGen => cn.s ! det.spec ! Gen ! Pl } ; - a = {g = cn.g ; + a = {g = agender2gender cn.g ; n = case det.n of { UseNum n => n ; UseGen => Pl @@ -53,13 +53,13 @@ concrete NounSlv of Noun = CatSlv ** open ResSlv in { MassNP n = { s = \\c => n.s ! Indef ! c ! Sg ; - a = {g=n.g; n=Sg; p=P3} + a = {g=agender2gender n.g; n=Sg; p=P3} } ; UseN n = {s = \\_ => n.s; g = n.g} ; AdjCN ap cn = { - s = \\spec,c,n => ap.s ! spec ! cn.g ! c ! n ++ cn.s ! Indef ! c ! n ; + s = \\spec,c,n => ap.s ! spec ! agender2gender cn.g ! c ! n ++ cn.s ! Indef ! c ! n ; g = cn.g } ; AdvCN cn ad = {s = \\spec,c,n => cn.s ! spec ! c ! n ++ ad.s ; g = cn.g} ; diff --git a/lib/src/slovenian/ParadigmsSlv.gf b/lib/src/slovenian/ParadigmsSlv.gf index 48aa487ff..d64d5d2b0 100644 --- a/lib/src/slovenian/ParadigmsSlv.gf +++ b/lib/src/slovenian/ParadigmsSlv.gf @@ -11,27 +11,30 @@ oper mkPrep : Str -> Case -> Prep = \s,c -> lin Prep {s=s; c=c}; - masculine = Masc; - feminine = Fem; - neuter = Neut; + animate = AMasc Animate; + masculine = AMasc Inanimate; + feminine = AFem; + neuter = ANeut; mkN = overload { mkN : (noun : Str) -> N = smartN ; - mkN : (noun : Str) -> Gender -> N = regNouns ; - mkN : (noun,gensg : Str) -> Gender -> N = irregNouns ; + mkN : (noun : Str) -> AGender -> N = regNouns ; + mkN : (noun,gensg : Str) -> AGender -> N = irregNouns ; mkN : (noun,gensg,nompl : Str) -> N = irregMasc ; - mkN : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> N = worstN ; + mkN : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> AGender -> N = worstN ; } ; --All masculine forms (except those with long pluralstem) are formed here. --Takes the baseform + the genitive singular form + animacy. --In case the genitive singular has an extra vowel in the end, it is dropped before coming here. - mascAll : (_,_ : Str) -> N = \oce,ocet -> - worstN oce (ocet + "a") (ocet + "u") oce (ocet + "u") (ocet + "om") -- Singular + mascAll : (_,_ : Str) -> Animacy -> N = \oce,ocet,anim -> + let accsg = case anim of {Animate => ocet + "a"; _ => oce}; --Special case: Masc Sg Acc Animate + in + worstN oce (ocet + "a") (ocet + "u") accsg (ocet + "u") (ocet + "om") -- Singular (ocet + "a") (ocet + "ov") (ocet + "oma") (ocet + "a") (ocet + "ih") (ocet + "oma") -- Dual (ocet + "i") (ocet + "ov") (ocet + "om") (ocet + "e") (ocet + "ih") (ocet + "i") -- Plural - masculine ; + (AMasc anim) ; --All neuter forms are formed here, long or normal. --It takes the baseform + the genitive singular form. @@ -60,30 +63,30 @@ oper _ + "a" => regFem noun ; _ + ("ev" | "ost") => regFem noun ; _ + ("o"| "e") => let nou = init noun in neutAll noun nou ; - _ + #consonant => mascAll noun noun; --Base form used in the rest of the paradigm. - _ => let nou = init noun in mascAll noun nou -- Drops the last vowel for the rest of the paradigm. + _ + #consonant => mascAll noun noun Inanimate; --Base form used in the rest of the paradigm. + _ => let nou = init noun in mascAll noun nou Inanimate -- Drops the last vowel for the rest of the paradigm. } ; --Send the masculine and neutral nouns with long stem off to the right paradigm. - irregNouns : (noun,longform : Str) -> Gender -> N = \noun,longform,gen -> + irregNouns : (noun,longform : Str) -> AGender -> N = \noun,longform,gen -> case gen of { - Masc => let longfor = init longform in mascAll noun longfor ; - Neut => let longfor = init longform in neutAll noun longfor ; - Fem => regFem noun --There are actually no feminine nouns with long stem. + AMasc anim => let longfor = init longform in mascAll noun longfor anim ; + ANeut => let longfor = init longform in neutAll noun longfor ; + AFem => regFem noun --There are actually no feminine nouns with long stem. } ; --Regular masculine nouns that do not end with a consonant, drops the vowel in all conjugated forms. --Takes the baseform + animacy. - regNouns : (noun : Str) -> Gender -> N = \noun,gen -> + regNouns : (noun : Str) -> AGender -> N = \noun,gen -> case gen of { - Masc => case noun of { - _ + #consonant => mascAll noun noun ; - _ + #vowel => let nou = init noun in mascAll noun nou - }; - Neut => let nou = init noun in neutAll noun nou ; - Fem => regFem noun --There are actually no feminine nouns with long stem. + AMasc anim => case noun of { + _ + #consonant => mascAll noun noun anim ; + _ + #vowel => let nou = init noun in mascAll noun nou anim + }; + ANeut => let nou = init noun in neutAll noun nou ; + AFem => regFem noun --There are actually no feminine nouns with long stem. } ; --Irregular masculine nouns with long stem has no special ending in genitive dual and plural, so need a special paradigm. @@ -96,7 +99,7 @@ oper bogovi bogov (bogov + "om") (bogov + "e") (bogov + "ih") (bogov + "i") -- Plural masculine ; - worstN : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> N = + worstN : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> AGender -> N = \nomsg,gensg,datsg,accsg,locsg,instrsg,nomdl,gendl,datdl,accdl,locdl,instrdl,nompl,genpl,datpl,accpl,locpl,instrpl,g -> lin N { s = table { Nom => table {Sg=>nomsg; Dl=>nomdl; Pl=>nompl}; @@ -109,7 +112,7 @@ oper g = g }; - mkPN : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> PN = + mkPN : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> AGender -> PN = \nomsg,nomdl,nompl,gensg,gendl,genpl,datsg,datdl,datpl,accsg,accdl,accpl,locsg,locdl,locpl,instrsg,instrdl,instrpl,g -> lin PN { s = table { Nom => table {Sg=>nomsg; Dl=>nomdl; Pl=>nompl}; diff --git a/lib/src/slovenian/ResSlv.gf b/lib/src/slovenian/ResSlv.gf index f26deebf6..1a47e4b45 100644 --- a/lib/src/slovenian/ResSlv.gf +++ b/lib/src/slovenian/ResSlv.gf @@ -6,6 +6,8 @@ param Gender = Masc | Fem | Neut ; Person = P1 | P2 | P3 ; Species = Indef | Def ; + Animacy = Animate | Inanimate ; + AGender = AMasc Animacy | AFem | ANeut ; NumAgr = UseNum Number | UseGen; DForm = Unit Gender | Teen | Ten | Hundred; @@ -113,5 +115,12 @@ oper numAgr2num : NumAgr => Number = table {UseNum n => n; UseGen => Pl} ; + + agender2gender : AGender -> Gender = \ag -> + case ag of { + AMasc _ => Masc ; + AFem => Fem ; + ANeut => Neut + } ; }