diff --git a/src/somali/CatSom.gf b/src/somali/CatSom.gf index a6dd71464..842a3bf5f 100644 --- a/src/somali/CatSom.gf +++ b/src/somali/CatSom.gf @@ -62,7 +62,7 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in { NP = ResSom.NounPhrase ; Pron = ResSom.Pronoun ; --Pronouns need enough info to turn it into NP or Quant. Det = ResSom.Determiner ; - Predet = {s : Str} ; + Predet = {s : Str ; da : DefArticle ; isPoss : Bool} ; Quant = ResSom.Quant ; Num = ResSom.Num ; Ord = {s : Str ; n : Number} ; diff --git a/src/somali/LexiconSom.gf b/src/somali/LexiconSom.gf index f52d8b8fc..197b4ab47 100644 --- a/src/somali/LexiconSom.gf +++ b/src/somali/LexiconSom.gf @@ -258,7 +258,7 @@ lin name_N = mkN "magac" ; -- lin paris_PN = mkPN "Paris" ; -- lin peace_N = mkN "" ; -- lin pen_N = mkN "" ; --- lin person_N = mkN "" ; +lin person_N = mkNoun "dad" "dadka" "dad" "dadka" Masc ; -- lin planet_N = mkN "" ; -- lin plastic_N = mkN "" ; -- lin play_V = mkV "" ; diff --git a/src/somali/NounSom.gf b/src/somali/NounSom.gf index 5cc9074dc..ffec0ca4d 100644 --- a/src/somali/NounSom.gf +++ b/src/somali/NounSom.gf @@ -57,9 +57,18 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in { UsePron pron = pron ** {st = Definite} ; -- : Predet -> NP -> NP ; -- only the man - PredetNP predet np = np ** { - s = \\c => predet.s ++ np.s ! c ---- ? - } ; + PredetNP predet np = + let qnt = PossPron (pronTable ! np.a) ; + det = qnt.shortPoss ! predet.da ; + predetS : Str = case predet.isPoss of { + True => glue predet.s det ; + False => predet.s + } ; + in np ** {s = \\c => + case of { + => np.empty ++ predetS ; + _ => np.s ! c ++ predetS} + } ; -- A noun phrase can also be postmodified by the past participle of a diff --git a/src/somali/ResSom.gf b/src/somali/ResSom.gf index 77f0cad58..09a894845 100644 --- a/src/somali/ResSom.gf +++ b/src/somali/ResSom.gf @@ -182,6 +182,18 @@ oper sp : Case => Str ; } ; + {- Saeed p.115: "This combination of possessive and article [kay-ga, tay-da] + is the basic form but possessives occur with the full range of determiners, + with associated meanings, for example: + remote article kii/tii: gurigaagii 'your house (remote)' + demonstrative kaas/taas: gurigaagaas 'that house of yours' + interrogative kee/tee: gurigaagee? 'which house of yours?'" + + Since RGL abstract syntax doesn't allow combining two Quants, the way to go is + to have another Pron -> Quant function in Extra, which forms Quants such as + -gaagii, -gaagaas, -gaagee. + -} + pronTable : Agreement => Pronoun = table { Sg1 => { s = table {Nom => "aan" ; Abs => "i"} ; @@ -288,7 +300,7 @@ oper } ; Numeral : Type = BaseNum ** { - ord : Str -- whether to choose Numerative as the value of NForm + ord : Str } ; baseQuant : BaseQuant = { diff --git a/src/somali/StructuralSom.gf b/src/somali/StructuralSom.gf index 992c405e1..6d3953dcb 100644 --- a/src/somali/StructuralSom.gf +++ b/src/somali/StructuralSom.gf @@ -51,10 +51,11 @@ lin or_Conj = {s2 = \\_ => "ama" ; s1 = [] ; n = Sg} ; -- mise with interrogativ ----------------- -- *Det and Quant -{- -lin how8many_IDet = R.indefDet "" pl ; -lin all_Predet = { s = "" } ; +--lin how8many_IDet = R.indefDet "" pl ; + +lin all_Predet = {s = "giddi" ; isPoss = True ; da = M GA} ; +{- lin not_Predet = { s = "" } ; lin only_Predet = { s = "" } ; lin most_Predet = { s = "" } ; @@ -64,11 +65,30 @@ lin every_Det = R.defDet [] pl ** lin few_Det = R.indefDet "" pl ; lin many_Det = R.indefDet "" pl ; lin much_Det = R.indefDet "" sg ; -lin somePl_Det = R.indefDet "" pl ; -lin someSg_Det = R.indefDet "" sg ; - -lin no_Quant = mkPrep no_Quant -} +lin somePl_Det = { + s = \\x,_ => BIND ++ defStems ! x ++ BIND ++ "a qaarkood" ; + shortPoss = \\x => BIND ++ defStems ! x ++ BIND ++ "a qaarkood" ; + sp = \\_,_ => "qaarkood" ; + isPoss, isNum = False ; + n = Pl ; + st = Definite -- NB. Indefinite is really only reserved for IndefArt NumSg. + } ; + +lin someSg_Det = somePl_Det ** { + n = Sg ; + s = table { + M x => \\_ => BIND ++ defStems ! M x ++ BIND ++ "a qaarkiis" ; + F x => \\_ => BIND ++ defStems ! F x ++ BIND ++ "a qaarkeed" } ; + shortPoss = table { + M x => BIND ++ defStems ! M x ++ BIND ++ "a qaarkiis" ; + F x => BIND ++ defStems ! F x ++ BIND ++ "a qaarkeed" } ; + sp = \\g,c => case g of {Fem => "qaarkeed" ; _ => "qaarkiis"} + } ; + + +--lin no_Quant = mkPrep no_Quant + lin that_Quant = defQuant "aas" "kaas" "taas" "kuwaas" True ; lin this_Quant = defQuant "an" "kan" "tan" "kuwan" True ; --lin which_IQuant = defQuant