diff --git a/src/somali/NounSom.gf b/src/somali/NounSom.gf index e1d7d12c..5ae95f4a 100644 --- a/src/somali/NounSom.gf +++ b/src/somali/NounSom.gf @@ -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 ; diff --git a/src/somali/ResSom.gf b/src/somali/ResSom.gf index 7d677ccc..0529e6f0 100644 --- a/src/somali/ResSom.gf +++ b/src/somali/ResSom.gf @@ -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 "??" "??" "??"} } } ; @@ -684,8 +696,8 @@ oper insertComp : VPSlash -> NounPhrase -> VerbPhrase = \vp,np -> let noun : Str = case of { => np.s ! Abs ; - -- => (pronTable ! np.a).sp ; -- uncomment if you want to add long object pronoun for 3rd person object - _ => [] } -- no long object for other pronouns + -- => 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 = {