diff --git a/src/somali/ConjunctionSom.gf b/src/somali/ConjunctionSom.gf index 35a3d3227..122f17dca 100644 --- a/src/somali/ConjunctionSom.gf +++ b/src/somali/ConjunctionSom.gf @@ -87,8 +87,13 @@ lincat [NP] = {s1,s2 : Case => Str} ** BaseNP ; lin - BaseNP x y = twoTable Case x y ** consNP x y ; - ConsNP xs x = consrTable Case comma xs x ** consNP xs x ; + BaseNP x y = + let x' = np2objpron x ; + y' = np2objpron y + in twoTable Case x' y' ** consNP x' y' ; + ConsNP x xs = + let x' = np2objpron x + in consrTable Case comma x' xs ** consNP x' xs ; ConjNP conj xs = conjunctNPTable conj xs ** conjNP xs conj ; oper @@ -114,6 +119,10 @@ oper {s = -- TODO if xs is a pronoun, make them use (pronTable ! xs.a).sp table { cas => co.s1 ++ xs.s1 ! Abs ++ co.s2 ! xs.st ++ xs.s2 ! cas}} ; + np2objpron : NounPhrase -> NounPhrase = \np -> np ** { + s = objpron np + } ; + consNP : BaseNP -> BaseNP -> BaseNP = \x,y -> x ** { agr = conjAgr x.agr (getNum y.agr) } ; diff --git a/src/somali/LexiconSom.gf b/src/somali/LexiconSom.gf index 81d098b7a..13c117787 100644 --- a/src/somali/LexiconSom.gf +++ b/src/somali/LexiconSom.gf @@ -41,7 +41,7 @@ lin bird_N = mkN "shimbir" fem ; -- lin bone_N = mkN "" ; -- lin boot_N = mkN "" ; -- lin boss_N = mkN "" ; -lin book_N = (mk2N "buug" "buugaag") ** {pl = F TA} ; +lin book_N = (mk2N "buug" "buugaag") ** {gda = MF GA TA} ; lin boy_N = mk2N "wiil" "wiilal" ; lin bread_N = mkN "rooti" ; --masc/fem -- lin break_V2 = mkV2 "" ; @@ -222,7 +222,7 @@ lin language_N = mkN "af" ; ---- -- M -lin man_N = mkN "nin" ; +lin man_N = (mk2N "nin" "niman") ** {gda = MM KA KA} ; -- lin married_A2 = mkA "" ; lin meat_N = mkN "hilib" "hilbo" masc ; -- lin milk_N = mkN "" ; diff --git a/src/somali/NounSom.gf b/src/somali/NounSom.gf index 2a80642c6..fe8bfb9e5 100644 --- a/src/somali/NounSom.gf +++ b/src/somali/NounSom.gf @@ -20,12 +20,15 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in { -- special form for fem. nouns <_,Nom,False,Indefinite,Sg> => {nf=NomSg ; c=c} ; - -- Definite - <_,Nom,False,Definite,n> => {nf=Def n ; c=c} ; - -- If cn has modifier, Nom ending attaches to the modifier <_,Nom,True,_,_> => {nf=Def det.n ; c=Abs} ; - _ => {nf=Def det.n ; c=c} -- TODO check + + -- Definite + <_,_,False,Definite,n> => {nf=Def n ; c=c} ; + + <_,_,False,Indefinite,n> => {nf=Indef n ; c=c} ; + + _ => {nf=Def det.n ; c=c} -- TODO check } ; art = gda2da cn.gda ! det.n ; num = case det.isNum of {True => Sg ; _ => det.n} ; diff --git a/src/somali/ParadigmsSom.gf b/src/somali/ParadigmsSom.gf index 81e9fe00c..fb923596f 100644 --- a/src/somali/ParadigmsSom.gf +++ b/src/somali/ParadigmsSom.gf @@ -38,6 +38,7 @@ oper mkN : overload { mkN : (bisad : Str) -> N ; -- Predictable nouns mkN : (shimbir : Str) -> (fem : Gender) -> N ; -- Unpredictable gender +-- mkN : (nin, niman : Str) -> N ; -- Monosyllable word with unpredictable plural mkN : (maalin,maalmo : Str) -> Gender -> N ; -- Consonant cluster in stem --mkN : N -> Gender -> N ; -- Otherwise predictable but not gender (TODO does this even happen?) } ; @@ -165,7 +166,8 @@ oper mkN = overload { mkN : Str -> N = \s -> lin N (mkN1 s) ; mkN : Str -> Gender -> N = \s,g -> lin N (mkNg s g) ; - mkN : (_,_ : Str) -> Gender -> N = \s,t,g -> lin N (nMaalin s t g) ; + mkN : (sg, pl : Str) -> N = \sg,pl -> lin N (mk2N sg pl) ; + mkN : (indefsg,defsg : Str) -> Gender -> N = \s,t,g -> lin N (nMaalin s t g) ; --mkN : N -> Gender -> N = \n,g -> n ** {g = g } } ; diff --git a/src/somali/ResSom.gf b/src/somali/ResSom.gf index cb64f32b0..d25ad109c 100644 --- a/src/somali/ResSom.gf +++ b/src/somali/ResSom.gf @@ -85,11 +85,11 @@ oper mkNoun ul (u + sha) (ul + o) (ul + "aha") Fem ; -- 4b) Masculine, plural with ó, 2 syllables - nGuri guri = let o = allomorph mO guri ; - ga = allomorph mKa guri ; + nGuri guri = let ga = allomorph mKa guri ; gury = case last guri of { -- TODO does this generalise? Or just exception? "i" => init guri + "y" ; - _ => guri } in + _ => guri } ; + o = allomorph mO gury in mkNoun guri (guri + ga) (gury + o) (gury + "aha") Masc ; -- 4c) Masculine, plural with -ó, 3 syllables or longer