From db8356aa498dc24c48599522d53e484f5e1c701e Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 26 Aug 2019 15:25:41 +0200 Subject: [PATCH] (Som) Add Predets --- src/somali/CatSom.gf | 2 +- src/somali/NounSom.gf | 15 ++++++++++++--- src/somali/StructuralSom.gf | 7 ++++--- 3 files changed, 17 insertions(+), 7 deletions(-) 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/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/StructuralSom.gf b/src/somali/StructuralSom.gf index 7ed8ddce3..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 = "" } ;