Merge pull request #269 from inariksit/somali

Somali
This commit is contained in:
Inari Listenmaa
2019-08-05 11:37:23 +03:00
committed by GitHub
5 changed files with 26 additions and 12 deletions

View File

@@ -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) } ;

View File

@@ -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 "" ;

View File

@@ -20,11 +20,14 @@ 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} ;
-- 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 ;

View File

@@ -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 }
} ;

View File

@@ -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