1
0
forked from GitHub/gf-rgl

Merge pull request #271 from inariksit/somali

Somali
This commit is contained in:
Inari Listenmaa
2019-08-13 20:08:48 +02:00
committed by GitHub
7 changed files with 37 additions and 26 deletions

View File

@@ -122,4 +122,5 @@ linref
VP = linVP VInf ; VP = linVP VInf ;
CN = linCN ; CN = linCN ;
Prep = \prep -> prep.s ! P3_Prep ++ prep.sii ++ prep.dhex ; Prep = \prep -> prep.s ! P3_Prep ++ prep.sii ++ prep.dhex ;
S = \s -> linBaseCl (s.s ! False) ;
} }

View File

@@ -225,10 +225,9 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
AdjCN ap cn = cn ** { AdjCN ap cn = cn ** {
s = table { NomSg => cn.s ! Indef Sg ; -- When an adjective is added, noun loses case marker. s = table { NomSg => cn.s ! Indef Sg ; -- When an adjective is added, noun loses case marker.
x => cn.s ! x } ; x => cn.s ! x } ;
mod = \\n,c => cn.mod ! n ! Abs -- If there was something before, it is now in Abs mod = let conj = if_then_Str cn.hasMod "oo" [] in
++ case cn.hasMod of { \\n,c => cn.mod ! n ! Abs -- If there was something before, it is now in Abs
True => "oo" ; ++ conj -- If the sentence is already modified, any new modifier needs to be introduced with conjunction
False => [] }
++ ap.s ! AF n c ; ++ ap.s ! AF n c ;
hasMod = True hasMod = True
} ; } ;
@@ -236,7 +235,8 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
-- : CN -> RS -> CN ; -- : CN -> RS -> CN ;
RelCN cn rs = cn ** { RelCN cn rs = cn ** {
mod = \\n,c => cn.mod ! n ! c ++ rs.s ! gender cn ! c ; mod = let conj = if_then_Str cn.hasMod "ee" [] in
\\n,c => cn.mod ! n ! c ++ conj ++ rs.s ! gender cn ! c ;
hasMod = True ; hasMod = True ;
} ; } ;

View File

@@ -102,7 +102,7 @@ lin pot2plus d e = d ** {
n = Pl} ; n = Pl} ;
lin pot2as3 n = n ; lin pot2as3 n = n ;
lin pot3 n = n ** { lin pot3 n = n ** {
thousand = "kun" ; thousand = n.thousand ++ "kun" ;
ord = n.s ! Kow ++ "kunaad" ; ord = n.s ! Kow ++ "kunaad" ;
--da = M KA ; -- TODO check --da = M KA ; -- TODO check
n = Pl } ; n = Pl } ;

View File

@@ -154,7 +154,7 @@ oper
_ => Sg3 g } ; _ => Sg3 g } ;
getNum : Agreement -> Number = \a -> getNum : Agreement -> Number = \a ->
case a of { Sg1|Sg2|Sg3 _ => Sg ; _ => Pl } ; case a of { Sg1|Sg2|Sg3 _|Impers => Sg ; _ => Pl } ;
plAgr : Agreement -> Agreement = \agr -> plAgr : Agreement -> Agreement = \agr ->
case agr of { Sg1 => Pl1 Excl ; case agr of { Sg1 => Pl1 Excl ;

View File

@@ -161,16 +161,13 @@ oper
emptyNP : NounPhrase = { emptyNP : NounPhrase = {
s = \\_ => [] ; s = \\_ => [] ;
a = Pl3 ; a = Sg3 Masc ;
isPron = False ; isPron = False ;
empty = [] ; empty = [] ;
st = Indefinite st = Indefinite
} ; } ;
impersNP : NounPhrase = emptyNP ** { impersNP : NounPhrase = pronTable ! Impers ;
a = Impers ;
isPron = True
} ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Pronouns -- Pronouns
@@ -234,7 +231,7 @@ oper
poss = {s, short = quantTable "ood" ; sp = gnTable "ood" "ood" "uwood"} poss = {s, short = quantTable "ood" ; sp = gnTable "ood" "ood" "uwood"}
} ; } ;
Impers => { Impers => {
s = table {Nom => "la" ; Abs => "la"} ; s = \\_ => [] ; -- the string `la' comes from Passive (: PrepCombination)
a = Impers ; isPron = True ; sp = \\_ => "" ; a = Impers ; isPron = True ; sp = \\_ => "" ;
empty = [] ; st = Definite ; empty = [] ; st = Definite ;
poss = {s, short = quantTable "??" ; sp = gnTable "??" "??" "??"} poss = {s, short = quantTable "??" ; sp = gnTable "??" "??" "??"}
@@ -787,17 +784,19 @@ oper
predVP : NounPhrase -> VerbPhrase -> Clause = \np,vps -> { predVP : NounPhrase -> VerbPhrase -> Clause = \np,vps -> {
s = \\cltyp,t,a,p => s = \\cltyp,t,a,p =>
let predRaw : {fin : Str ; inf : Str} = vf cltyp t a p subj.a vp ; let predRaw : {fin : Str ; inf : Str} = vf cltyp t a p subj.a vp ;
pred : {fin : Str ; inf : Str} = case <cltyp,p,vp.pred> of { pred : {fin : Str ; inf : Str} = case <cltyp,p,t,vp.pred,subj.a> of {
<Statement,Pos,NoCopula> => {fin,inf = []} ; <Statement,Pos,Pres,NoCopula ,Sg3 _|Pl3>
<_ , _, Copula> => {fin = presCopula ! {agr=subj.a ; pol=p} ; inf=[]} ; => {fin,inf = []} ; -- If the VP is formed with CompNP
<_ , _,Pres,NoCopula|Copula, _> -- Comp* present tense
=> {fin = presCopula ! {agr=subj.a ; pol=p} ; inf=[]} ;
_ => predRaw _ => predRaw
} ; } ;
subjnoun : Str = if_then_Str np.isPron np.empty (subj.s ! Nom) ; subjnoun : Str = if_then_Str np.isPron np.empty (subj.s ! Nom) ;
subjpron : Str = if_then_Str np.isPron (subj.s ! Nom) np.empty ; subjpron : Str = if_then_Str np.isPron (subj.s ! Nom) np.empty ;
obj : {p1,p2 : Str} = obj : {p1,p2 : Str} =
let o : {p1,p2 : Str} = vp.comp ! subj.a ; let o : {p1,p2 : Str} = vp.comp ! subj.a ;
bind : Str = case <isPassive vp,vp.obj2.a, vp.c2, vp.pred> of { bind : Str = case <isPassive vp, vp.obj2.a, vp.c2> of {
<False,P3_Prep,Single NoPrep,NoPred> => [] ; <False,P3_Prep,Single NoPrep> => [] ;
_ => BIND } ; _ => BIND } ;
in case <cltyp,p> of { in case <cltyp,p> of {
<Statement,Neg> => {p2 = [] ; p1 = o.p1 ++ o.p2 ++ bind} ; <Statement,Neg> => {p2 = [] ; p1 = o.p1 ++ o.p2 ++ bind} ;
@@ -809,7 +808,7 @@ oper
p2 = if_then_Pol p subjpron []} ; p2 = if_then_Pol p subjpron []} ;
Question => {p1 = "ma" ; p2 = []} ; -- TODO find out how negative questions work Question => {p1 = "ma" ; p2 = []} ; -- TODO find out how negative questions work
Statement => case <p,vp.pred,subj.a> of { Statement => case <p,vp.pred,subj.a> of {
<Pos,Copula|NoCopula,Sg3 _|Impers> => {p1 = "waa" ; p2 = []} ; <Pos,Copula|NoCopula,Pl3|Sg3 _> => {p1 = "waa" ; p2 = []} ;
_ => stmarkerNoContr ! subj.a ! p }} ; _ => stmarkerNoContr ! subj.a ! p }} ;
in (wordOrder subjnoun subjpron stm obj pred vp) ; in (wordOrder subjnoun subjpron stm obj pred vp) ;
} where { } where {

View File

@@ -0,0 +1,11 @@
-- LangEng: the books that the men buy
LangSom: buugaag BIND ta niman BIND ku iibsadaan
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN book_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumPl) (UseN man_N)) (SlashV2a buy_V2))))))) NoVoc
-- LangEng: the men that buy the books
LangSom: niman BIND ka buugaag BIND ta iibsada
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N)))))))) NoVoc
-- LangEng: the men that buy the books are these
LangSom: niman BIND ka buugaag BIND ta iibsadaa waa kuwan
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N))))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumPl))))))) NoVoc

View File

@@ -13,7 +13,7 @@ LangSom: waa ay ku arkeen
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron they_Pron) (ComplSlash (SlashV2a see_V2) (UsePron youSg_Pron))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron they_Pron) (ComplSlash (SlashV2a see_V2) (UsePron youSg_Pron))))) NoVoc
-- LangEng: they didn't see you -- LangEng: they didn't see you
LangSom: ku &+ ma arkin LangSom: ku BIND ma arkin
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PNeg (PredVP (UsePron they_Pron) (ComplSlash (SlashV2a see_V2) (UsePron youSg_Pron))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PNeg (PredVP (UsePron they_Pron) (ComplSlash (SlashV2a see_V2) (UsePron youSg_Pron))))) NoVoc
-- LangEng: you taught yourself -- LangEng: you taught yourself
@@ -21,7 +21,7 @@ LangSom: waa aad isku bartay
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron youSg_Pron) (ReflVP (SlashV2a teach_V2))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron youSg_Pron) (ReflVP (SlashV2a teach_V2))))) NoVoc
-- LangEng: you don't teach yourself -- LangEng: you don't teach yourself
LangSom: isku &+ ma barto LangSom: isku BIND ma barto
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (UsePron youSg_Pron) (ReflVP (SlashV2a teach_V2))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (UsePron youSg_Pron) (ReflVP (SlashV2a teach_V2))))) NoVoc
-- LangEng: one saw you -- LangEng: one saw you
@@ -48,7 +48,7 @@ LangSom: hooyo waa ay ina kaa siisey
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (MassNP (UseN2 mother_N2)) (ComplSlash (Slash3V3 give_V3 (UsePron we_Pron)) (UsePron youSg_Pron))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (MassNP (UseN2 mother_N2)) (ComplSlash (Slash3V3 give_V3 (UsePron we_Pron)) (UsePron youSg_Pron))))) NoVoc
-- LangEng: mother didn't give you us -- LangEng: mother didn't give you us
LangSom: hooyo ina &+ ma ay kaa siin LangSom: hooyo ina BIND ma ay kaa siin
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PNeg (PredVP (MassNP (UseN2 mother_N2)) (ComplSlash (Slash3V3 give_V3 (UsePron we_Pron)) (UsePron youSg_Pron))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PNeg (PredVP (MassNP (UseN2 mother_N2)) (ComplSlash (Slash3V3 give_V3 (UsePron we_Pron)) (UsePron youSg_Pron))))) NoVoc
-- LangEng: he gave himself bread -- LangEng: he gave himself bread
@@ -56,7 +56,7 @@ LangSom: rooti waa uu is siiyey
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron he_Pron) (ReflVP (Slash2V3 give_V3 (MassNP (UseN bread_N))))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron he_Pron) (ReflVP (Slash2V3 give_V3 (MassNP (UseN bread_N))))))) NoVoc
-- LangEng: one adds salt to the meat -- LangEng: one adds salt to the meat
LangSom: hilib &+ ka cusbo waa lagu daraa LangSom: hilib BIND ka cusbo waa lagu daraa
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (GenericCl (ComplSlash (Slash3V3 add_V3 (DetCN (DetQuant DefArt NumSg) (UseN meat_N))) (MassNP (UseN salt_N)))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (GenericCl (ComplSlash (Slash3V3 add_V3 (DetCN (DetQuant DefArt NumSg) (UseN meat_N))) (MassNP (UseN salt_N)))))) NoVoc
-- LangEng: one can add salt to meat -- LangEng: one can add salt to meat
@@ -71,5 +71,5 @@ LangSom: waa aan ka dul boodi karaa
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (AdvVP (ComplVV can_VV (UseV jump_V)) (PrepNP above_Prep (UsePron it_Pron)))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (AdvVP (ComplVV can_VV (UseV jump_V)) (PrepNP above_Prep (UsePron it_Pron)))))) NoVoc
-- LangEng: you can't jump above me -- LangEng: you can't jump above me
LangSom: iga &+ ma dul boodi karto LangSom: iga BIND ma dul boodi karto
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (UsePron youSg_Pron) (AdvVP (ComplVV can_VV (UseV jump_V)) (PrepNP above_Prep (UsePron i_Pron)))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (UsePron youSg_Pron) (AdvVP (ComplVV can_VV (UseV jump_V)) (PrepNP above_Prep (UsePron i_Pron)))))) NoVoc