From 8295e4032374c5d9d80f052aae15d7aa7e2fe74e Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Tue, 11 Jun 2019 21:20:39 +0200 Subject: [PATCH] (Som) Possessive structures --- src/somali/LexiconSom.gf | 6 ++-- src/somali/NounSom.gf | 27 +++++++++------ src/somali/ParadigmsSom.gf | 10 +++--- src/somali/ParamSom.gf | 4 +-- src/somali/ResSom.gf | 69 ++++++++++++++++++++++++++++++------- src/somali/StructuralSom.gf | 45 +++++------------------- 6 files changed, 91 insertions(+), 70 deletions(-) diff --git a/src/somali/LexiconSom.gf b/src/somali/LexiconSom.gf index 345ff590..d4399cb9 100644 --- a/src/somali/LexiconSom.gf +++ b/src/somali/LexiconSom.gf @@ -118,7 +118,7 @@ lin eat_V2 = mkV2 "cun" ; -- lin fall_V = mkV "" ; -- lin far_Adv = mkA "" ; -- lin fat_N = mkN "" ; -lin father_N2 = mkN2 (shortPossN (mkN "aabbe")) Gen ; +lin father_N2 = mkN2 (shortPossN (mkN "aabbe")) ; -- lin fear_V2 = mkV2 "" ; -- lin fear_VS = mkVS "" ; -- lin feather_N = mkN "" ; @@ -227,7 +227,7 @@ lin man_N = mkN "nin" ; -- lin meat_N = mkN "" ; -- lin milk_N = mkN "" ; -- lin moon_N = mkN "" ; -lin mother_N2 = mkN2 (shortPossN (mkN "hooyo")) Gen ; +lin mother_N2 = mkN2 (shortPossN (mkN "hooyo")) ; -- lin mountain_N = mkN "" ; -- lin mouth_N = mkN "" ; -- lin music_N = mkN "" ; @@ -395,7 +395,7 @@ lin wait_V2 = mkV2 "sug" ; -- lin warm_A = mkA "" ; -- lin wash_V2 = mkV2 "" ; -- lin watch_V2 = mkV2 "" ; -lin water_N = mkN "biya" ; +lin water_N = mkNoun "biyo" "biyaha" "biyo" "biyaha" Masc ; -- ?? gender -- lin wet_A = mkA "" ; -- lin white_A = mkA "" ; -- lin wide_A = mkA "" ; diff --git a/src/somali/NounSom.gf b/src/somali/NounSom.gf index 0cce3c74..32b925b8 100644 --- a/src/somali/NounSom.gf +++ b/src/somali/NounSom.gf @@ -14,11 +14,11 @@ DetCN det cn = useN cn ** { let nfc : {nf : NForm ; c : Case} = case of { -- special form for fem. nouns - => {nf=GenSg ; c=c} ; - => {nf=GenPl ; c=c} ; => {nf=NomSg ; c=c} ; + -- special case for DefArt+Nom: override vowel => {nf=Def x vU ; c=c} ; + -- If cn has modifier, Nom ending attaches to the modifier => {nf=det.d ; c=Abs} ; _ => {nf=det.d ; c=c} @@ -76,7 +76,6 @@ DetCN det cn = useN cn ** { -- MassNP : CN -> NP ; MassNP cn = useN cn ** { s = table { Nom => cn.s ! NomSg ++ cn.mod ! Sg ! Nom ; - -- Gen => cn.s ! PlGen ++ cn.mod ! Sg ! Gen ; -- TODO Do we ever need plural genitive? c => cn.s ! Indef Sg ++ cn.mod ! Sg ! c } } ; @@ -174,10 +173,18 @@ DetCN det cn = useN cn ** { -- : N2 -> CN ; UseN,UseN2 = ResSom.useN ; - -- : N2 -> NP -> CN ; -- mother of the king - ComplN2 n2 np = - let cn = useN n2 in - cn ** {s = \\c => cn.s ! c ++ np.s ! n2.c2 } ; + -- : N2 -> NP -> CN ; -- Sahra hooyadeed + ComplN2 n2 np = let cn = useN n2 in cn ** {s = \\nf => + let det = PossPron (pronTable ! np.a) ; + detStr = case cn.shortPoss of { + True => det.shortPoss ; + _ => det.s ! Abs } ; + num = case nf of { + Indef n => n ; + Def n v => n ; + _ => Sg } ; + in np.s ! Abs ++ cn.s ! Def num det.v ++ detStr } ; + {- -- : N3 -> NP -> N2 ; -- distance from this city (to Paris) ComplN3 n3 np = @@ -221,13 +228,13 @@ DetCN det cn = useN cn ** { -- : CN -> NP -> CN ; -- city Paris (, numbers x and y) ApposCN cn np = cn ** { s = } ; - +-} --2 Possessive and partitive constructs -- : PossNP : CN -> NP -> CN ; - PossNP cn np = cn ** { } ; - + PossNP cn np = cn ** {mod = \\n,c => cn.mod ! n ! c ++ np.s ! Abs} ; -- guriga Axmed, not Axmed gurigiisa +{- -- : CN -> NP -> CN ; -- glass of wine / two kilos of red apples PartNP cn np = cn ** { } ; diff --git a/src/somali/ParadigmsSom.gf b/src/somali/ParadigmsSom.gf index 8fd6f78c..fe847f49 100644 --- a/src/somali/ParadigmsSom.gf +++ b/src/somali/ParadigmsSom.gf @@ -43,9 +43,8 @@ oper } ; mkN2 : overload { - mkN2 : Str -> N2 ; -- Predictable N2, no preposition - mkN2 : Str -> Case -> N2 ; -- Predictable N2, given preposition - mkN2 : N -> Case -> N2 -- N2 out of noun and preposition + mkN2 : Str -> N2 ; -- Predictable N2 + mkN2 : N -> N2 -- N2 out of noun } ; mkPN : overload { @@ -165,9 +164,8 @@ oper = \n -> n ** {shortPoss = True} ; mkN2 = overload { - mkN2 : Str -> N2 = \s -> lin N2 (mkN1 s ** {c2 = Gen}) ; - mkN2 : Str -> Case -> N2 = \s,p -> lin N2 (mkN1 s ** {c2 = p}) ; - mkN2 : N -> Case -> N2 = \n,p -> lin N2 (n ** {c2=p}) + mkN2 : Str -> N2 = \s -> lin N2 (mkN1 s) ; + mkN2 : N -> N2 = \n -> lin N2 n ; } ; mkPN = overload { diff --git a/src/somali/ParamSom.gf b/src/somali/ParamSom.gf index d3d03a86..8a2ce585 100644 --- a/src/somali/ParamSom.gf +++ b/src/somali/ParamSom.gf @@ -60,7 +60,7 @@ oper -- Nouns param - Case = Nom | Abs | Gen ; -- | Voc exists for some words + Case = Nom | Abs ; Gender = Masc | Fem ; Vowel = vA | vE | vI | vO | vU | NA ; -- For vowel assimilation GenNum = SgMasc | SgFem | PlInv ; -- For Quant @@ -87,7 +87,7 @@ param | Def Number Vowel -- Stems for definite and determinative suffixes -- Special forms only for fem. nouns ending in consonant. | Numerative -- When modified by a number: either pl gen or sg abs - | NomSg | GenSg | GenPl ; + | NomSg ; oper getAgr : NForm -> Gender -> Agreement = \n,g -> diff --git a/src/somali/ResSom.gf b/src/somali/ResSom.gf index 72beed8d..5882e451 100644 --- a/src/somali/ResSom.gf +++ b/src/somali/ResSom.gf @@ -4,9 +4,9 @@ resource ResSom = ParamSom ** open Prelude, Predef, ParamSom in { -- Nouns oper - Noun : Type = {s : NForm => Str ; g : Gender ; shortPoss : Bool} ; - Noun2 : Type = Noun ** {c2 : Case} ; - Noun3 : Type = Noun2 ** {c3 : Case} ; + Noun : Type = {s : NForm => Str; g : Gender ; shortPoss : Bool} ; + Noun2 : Type = Noun ; -- TODO eventually more parameters? + Noun3 : Type = Noun ; CNoun : Type = Noun ** {mod : Number => Case => Str ; hasMod : Bool} ; @@ -18,11 +18,9 @@ oper let bisadi = case gender of { Fem => case wiil of { _ + #c => wiil+"i" ; _ => wiil} ; Masc => wiil } ; - genforms : {p1, p2 : Str} = case gender of - { Fem => case wiilal of {_ + "o" => ; _ => } ; - Masc => } ; - shimbireed = genforms.p1 ; - bisadood = genforms.p2 ; + bisadood = case gender of + { Fem => case wiilal of {_ + "o" => wiilal+"od" ; _ => wiil} ; + Masc => wiil } ; defStems : Str -> Vowel => Str = \s -> case s of { ilk + "aha" => table { vE => ilk+"eh" ; @@ -39,10 +37,7 @@ oper Indef Pl => wiilal ; Def Sg vow => defStems wiilka ! vow ; Def Pl vow => defStems wiilasha ! vow ; - -- Special forms for fem. nouns ending in consonant - NomSg => bisadi ; - GenSg => shimbireed ; - GenPl => bisadood ; + NomSg => bisadi ; -- Special form for fem. nouns ending in consonant Numerative => case bisadood of {_+"ood" => bisadood ; _ => wiil} } ; g = gender ; @@ -155,6 +150,55 @@ oper v : Vowel} } ; + pronTable : Agreement => Pronoun = table { + Sg1 => { + s = table {Nom => "aan" ; {-Voc => "aniga" ;-} Abs => "i"} ; + a = Sg1 ; isPron = True ; + poss = {s = "ay" ; v = vA ; sp = gnTable "ayg" "ayd" "uwayg"} + } ; + Sg2 => { + s = table {Nom => "aad" ; {-Voc => "adiga" ;-} Abs => "ku"} ; + a = Sg2 ; isPron = True ; + poss = {s = "aa" ; v = vA ; sp = gnTable "aag" "aad" "uwaag"} + } ; + Sg3 Masc => { + s = table {Nom => "uu" ; {-Voc => "isaga" ;-} Abs => []} ; + a = Sg3 Masc ; isPron = True ; + poss = {s = "iis" ; v = vI ; sp = gnTable "iis" "iis" "uwiis"} + } ; + Sg3 Fem => { + s = table {Nom => "ay" ; {-Voc => "iyada" ;-} Abs => []} ; + a = Sg3 Fem ; isPron = True ; + poss = {s = "eed" ; v = vE ; sp = gnTable "eed" "eed" "uweed"} + } ; + Pl1 Excl => { + s = table {Nom => "aan" ; {-Voc => "annaga" ;-} Abs => "na"} ; + a = Pl1 Incl ; isPron = True ; + poss = {s = "een" ; v = vE ; sp = gnTable "eenn" "eenn" "uweenn"} + } ; + Pl1 Incl => { + s = table {Nom => "aynu" ; {-Voc => "innaga" ;-} Abs => "ina"} ; + a = Pl1 Incl ; isPron = True ; + poss = {s = "een" ; v = vE ; sp = gnTable "eenn" "eenn" "uweenn"} + } ; + Pl2 => { + s = table {Nom => "aad" ; {-Voc => "idinka" ;-} Abs => "idin"} ; + a = Pl2 ; isPron = True ; + poss = {s = "iin" ; v = vI ; sp = gnTable "iinn" "iinn" "uwiinn"} + } ; + Pl3 => { + s = table {Nom => "ay" ; {-Voc => "iyaga" ;-} Abs => []} ; + a = Pl3 ; isPron = True ; + poss = {s = "ood" ; v = vO ; sp = gnTable "ood" "ood" "uwood"} + } ; + Impers => { + s = table {Nom => "la" ; Abs => "??"} ; + a = Impers ; isPron = True ; + poss = {s = "??" ; v = vO ; sp = gnTable "??" "??" "??"} + } + } ; + + -- Second series object pronouns, Sayeed p. 74-75 -- For two non-3rd person object pronouns, e.g. "They took you away from me" secondObject : Agreement => Str = table { @@ -165,6 +209,7 @@ oper Pl2 => "kiin" ; _ => [] } ; + -------------------------------------------------------------------------------- -- Det, Quant, Card, Ord diff --git a/src/somali/StructuralSom.gf b/src/somali/StructuralSom.gf index 647778ff..aff86597 100644 --- a/src/somali/StructuralSom.gf +++ b/src/somali/StructuralSom.gf @@ -119,44 +119,15 @@ lin with_Prep = prep la ; -- Pron -- Pronouns are closed class, no constructor in ParadigmsSom. - - i_Pron = { - s = table {Nom => "aan" ; Voc => "aniga" ; _Abs => "i"} ; - a = Sg1 ; isPron = True ; - poss = {s = "ay" ; v = vA ; sp = gnTable "ayg" "ayd" "uwayg"} - } ; - youPol_Pron, -- TODO check - youSg_Pron = { - s = table {Nom => "aad" ; Voc => "adiga" ; _Abs => "ku"} ; - a = Sg2 ; isPron = True ; - poss = {s = "aa" ; v = vA ; sp = gnTable "aag" "aad" "uwaag"} - } ; it_Pron = he_Pron ** {s = \\_ => []} ; - he_Pron = { - s = table {Nom => "uu" ; Voc => "isaga" ; _Abs => []} ; - a = Sg3 Masc ; isPron = True ; - poss = {s = "iis" ; v = vI ; sp = gnTable "iis" "iis" "uwiis"} - } ; - she_Pron = { - s = table {Nom => "ay" ; Voc => "iyada" ; _Abs => []} ; - a = Sg3 Fem ; isPron = True ; - poss = {s = "eed" ; v = vE ; sp = gnTable "eed" "eed" "uweed"} - } ; - we_Pron = { - s = table {Nom => "aan" ; Voc => "innaga" ; _Abs => "na"} ; - a = Pl1 Excl ; isPron = True ; - poss = {s = "een" ; v = vE ; sp = gnTable "eenn" "eenn" "uweenn"} - } ; - youPl_Pron = { - s = table {Nom => "aad" ; Voc => "idinka" ; _Abs => "idin"} ; - a = Pl2 ; isPron = True ; - poss = {s = "iin" ; v = vI ; sp = gnTable "iinn" "iinn" "uwiinn"} - } ; - they_Pron = { - s = table {Nom => "ay" ; Voc => "iyaga" ; _Abs => []} ; - a = Pl3 ; isPron = True ; - poss = {s = "ood" ; v = vO ; sp = gnTable "ood" "ood" "uwood"} - } ; + i_Pron = pronTable ! Sg1 ; + youPol_Pron, -- TODO check + youSg_Pron = pronTable ! Sg2 ; + he_Pron = pronTable ! Sg3 Masc ; + she_Pron = pronTable ! Sg3 Fem ; + we_Pron = pronTable ! Pl1 Excl ; + youPl_Pron = pronTable ! Pl2 ; + they_Pron = pronTable ! Pl3 ; {- lin whatPl_IP = ; lin whatSg_IP = ;