Merge pull request #262 from inariksit/somali

Somali
This commit is contained in:
Inari Listenmaa
2019-07-19 14:14:39 +03:00
committed by GitHub
5 changed files with 79 additions and 24 deletions

View File

@@ -6,13 +6,14 @@ concrete IdiomSom of Idiom = CatSom ** open Prelude, ResSom, VerbSom in {
-- This module defines constructions that are formed in fixed ways,
-- often different even in closely related languages.
--lin
lin
-- : VP -> Cl ; -- it is hot
--ImpersCl = ;
-- : VP -> Cl ; -- one sleeps
--GenericCl = ;
GenericCl vp = predVP impersNP (passVP vp) ;
{-
CleftNP : NP -> RS -> Cl ; -- it is I who did it
CleftAdv : Adv -> S -> Cl ; -- it is here she slept

View File

@@ -4,7 +4,7 @@ concrete LexiconSom of Lexicon = CatSom **
----
-- A
-- lin add_V3 =
lin add_V3 = mkV3 "dar" ku NoPrep ;
-- lin airplane_N = mkN "" ;
-- lin alas_Interj = mkInterj "" ;
-- lin already_Adv = mkA "" ;
@@ -99,10 +99,10 @@ lin drink_V2 = mkV2 "cab" ;
-- lin dry_A = mkA "" ;
-- lin dull_A = mkA "" ;
-- lin dust_N = mkN "" ;
--
-- ----
-- -- E
--
----
-- E
-- lin ear_N = mkN "" ;
-- lin earth_N = mkN "" ;
lin eat_V2 = mkV2 "cun" ;
@@ -110,10 +110,10 @@ lin eat_V2 = mkV2 "cun" ;
-- lin empty_A = mkA "" ;
-- lin enemy_N = mkN "" ;
-- lin eye_N = mkN "" ;
--
-- ----
-- -- F
--
----
-- F
-- lin factory_N = mkN "" ;
-- lin fall_V = mkV "" ;
-- lin far_Adv = mkA "" ;
@@ -224,7 +224,7 @@ lin language_N = mkN "af" ;
lin man_N = mkN "nin" ;
-- lin married_A2 = mkA "" ;
-- lin meat_N = mkN "" ;
lin meat_N = mkN "hilib" "hilbo" masc ;
-- lin milk_N = mkN "" ;
-- lin moon_N = mkN "" ;
lin mother_N2 = mkN2 (shortPossN (mkN "hooyo")) ;
@@ -294,11 +294,11 @@ lin read_V2 = mkV2 "akhri" ;
-- lin rubber_N = mkN "" ;
-- lin rule_N = mkN "" ;
-- lin run_V = mkV "" ;
--
-- ----
-- -- S
--
-- lin salt_N = mkN "" ;
----
-- S
lin salt_N = mkN "cusbo" ;
-- lin sand_N = mkN "" ;
-- lin say_VS = mkVS "" ;
-- lin school_N = mkN "" ;

View File

@@ -44,7 +44,8 @@ DetCN det cn = useN cn ** {
-- : PN -> NP ;
UsePN pn = pn ** {
s = \\c => pn.s ;
isPron = False
isPron = False ;
empty = [] ;
} ;
-- : Pron -> NP ;
@@ -73,7 +74,7 @@ DetCN det cn = useN cn ** {
-- Determiners can form noun phrases directly.
-- : Det -> NP ;
DetNP det = {
DetNP det = emptyNP ** {
s = det.sp ! Masc ; ---- Any way to decide for gender here?
a = getAgr det.n Masc ;
isPron = False ;

View File

@@ -136,6 +136,7 @@ oper
BaseNP : Type = {
a : Agreement ;
isPron : Bool ;
empty : Str ;
} ;
NounPhrase : Type = BaseNP ** {s : Case => Str} ;
@@ -143,12 +144,14 @@ oper
useN : Noun -> CNoun ** BaseNP = \n -> n **
{ mod = \\_,_ => [] ; hasMod = False ;
a = Sg3 (gender n) ; isPron,isPoss = False ;
empty = [] ;
} ;
emptyNP : NounPhrase = {
s = \\_ => [] ;
a = Pl3 ;
isPron = False
isPron = False ;
empty = [] ;
} ;
impersNP : NounPhrase = emptyNP ** {
@@ -172,46 +175,55 @@ oper
Sg1 => {
s = table {Nom => "aan" ; Abs => "i"} ;
a = Sg1 ; isPron = True ; sp = "aniga" ;
empty = [] ;
poss = {s = quantTable "ayg" "ayd" ; short = quantTable "ay" ; sp = gnTable "ayg" "ayd" "uwayg"}
} ;
Sg2 => {
s = table {Nom => "aad" ; Abs => "ku"} ;
a = Sg2 ; isPron = True ; sp ="adiga" ;
empty = [] ;
poss = {s = quantTable "aag" "aad" ; short = quantTable "aa" ; sp = gnTable "aag" "aad" "uwaag"}
} ;
Sg3 Masc => {
s = table {Nom => "uu" ; Abs => []} ;
a = Sg3 Masc ; isPron = True ; sp ="isaga" ;
empty = [] ;
poss = {s, short = quantTable "iis" ; sp = gnTable "iis" "iis" "uwiis"}
} ;
Sg3 Fem => {
s = table {Nom => "ay" ; Abs => []} ;
a = Sg3 Fem ; isPron = True ; sp = "iyada" ;
empty = [] ;
poss = {s, short = quantTable "eed" ; sp = gnTable "eed" "eed" "uweed"}
} ;
Pl1 Excl => {
s = table {Nom => "aan" ; Abs => "na"} ;
a = Pl1 Excl ; isPron = True ; sp ="annaga" ;
empty = [] ;
poss = {s = quantTable "eenn" ; short = quantTable "een" ; sp = gnTable "eenn" "eenn" "uweenn"}
} ;
Pl1 Incl => {
s = table {Nom => "aynu" ; Abs => "ina"} ;
a = Pl1 Incl ; isPron = True ; sp ="innaga" ;
empty = [] ;
poss = {s = quantTable "eenn" ; short = quantTable "een" ; sp = gnTable "eenn" "eenn" "uweenn"}
} ;
Pl2 => {
s = table {Nom => "aad" ; Abs => "idin"} ;
a = Pl2 ; isPron = True ; sp ="idinka" ;
empty = [] ;
poss = {s = quantTable "iinn" ; short = quantTable "iin" ; sp = gnTable "iinn" "iinn" "uwiinn"}
} ;
Pl3 => {
s = table {Nom => "ay" ; Abs => []} ;
a = Pl3 ; isPron = True ; sp = "iyaga" ;
empty = [] ;
poss = {s, short = quantTable "ood" ; sp = gnTable "ood" "ood" "uwood"}
} ;
Impers => {
s = table {Nom => "la" ; Abs => "??"} ;
a = Impers ; isPron = True ; sp = "??" ;
empty = [] ;
poss = {s, short = quantTable "??" ; sp = gnTable "??" "??" "??"}
}
} ;
@@ -659,9 +671,11 @@ oper
c2 = P v2.c2
} ;
passV2 : Verb2 -> VerbPhrase = \v2 -> useV v2 ** {
passV2 : Verb2 -> VerbPhrase = \v2 -> passVP (useV v2) ;
passVP : VerbPhrase -> VerbPhrase = \vp -> vp ** {
c2 = Passive ;
c3 = v2.c2 ;
c3 = pp2prep vp.c2 ;
} ;
complSlash : VPSlash -> VerbPhrase = \vps -> let np = vps.obj2 in vps ** {
@@ -684,8 +698,8 @@ oper
insertComp : VPSlash -> NounPhrase -> VerbPhrase = \vp,np ->
let noun : Str = case <np.isPron,np.a> of {
<False,_> => np.s ! Abs ;
-- <True,(Sg3 _|Pl3)> => (pronTable ! np.a).sp ; -- uncomment if you want to add long object pronoun for 3rd person object
_ => [] } -- no long object for other pronouns
-- <True,(Sg3 _|Pl3)> => np.empty ++ (pronTable ! np.a).sp ; -- uncomment if you want to add long object pronoun for 3rd person object
_ => np.empty } -- no long object for other pronouns
in case vp.obj2.a of {
Unassigned =>
vp ** {obj2 = {

View File

@@ -0,0 +1,39 @@
--------------------------------------------------------------------------------
-- Intransitive
-- LangEng: they went
LangSom: waa ay tageen
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron they_Pron) (UseV go_V)))) NoVoc
--------------------------------------------------------------------------------
-- Transitive
-- LangEng: they saw you
LangSom: waa ay idin arkeen
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron they_Pron) (ComplSlash (SlashV2a see_V2) (UsePron youPl_Pron))))) NoVoc
-- LangEng: you saw yourself
LangSom: waa aad is aragtay
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron youSg_Pron) (ReflVP (SlashV2a see_V2))))) NoVoc
-- LangEng: you were seen
LangSom: waa lagu arkay
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron youSg_Pron) (PassV2 see_V2)))) NoVoc
--------------------------------------------------------------------------------
-- Ditransitive
-- LangEng: mother gave you us
LangSom: hooyo waa ay na 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
-- LangEng: mother didn't give you us
LangSom: hooyo na &+ 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
-- LangEng: he gave himself bread
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
-- LangEng: one adds salt to the meat
LangSom: hilib &+ 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