From d061595a2a6f5143c9b45ec7092a0c09fad18345 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 13 Sep 2019 15:12:50 +0200 Subject: [PATCH] (Som) Add IComp + related functions --- src/somali/CatSom.gf | 2 +- src/somali/QuestionSom.gf | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/somali/CatSom.gf b/src/somali/CatSom.gf index 538816379..52af918d0 100644 --- a/src/somali/CatSom.gf +++ b/src/somali/CatSom.gf @@ -23,7 +23,7 @@ concrete CatSom of Cat = CommonX - [Adv,IAdv] ** open ResSom, Prelude in { -- Constructed in QuestionSom. QCl = ResSom.QClause ; - IComp = SS ; -- interrogative complement of copula e.g. "where" + IComp = ResSom.Complement ; -- interrogative complement of copula e.g. "where" IDet = ResSom.Determiner ; -- interrogative determiner e.g. "how many" IQuant = ResSom.Quant ; -- interrogative quantifier e.g. "which" IP = ResSom.NounPhrase ** {contractSTM : Bool} ; -- like NP but may contract with STM diff --git a/src/somali/QuestionSom.gf b/src/somali/QuestionSom.gf index 410038c84..095d3409c 100644 --- a/src/somali/QuestionSom.gf +++ b/src/somali/QuestionSom.gf @@ -58,9 +58,12 @@ concrete QuestionSom of Question = CatSom ** open in cl2qcl True cl ; -- True because we handle STM placement in cl.stm -- : IComp -> NP -> QCl ; -- where is John? - -- Saeed p. 212 Ninkii ay raaceen waa ayo? man-the they accompanied DM who - -- 'The man they travelled with is who?' - -- QuestIComp icomp np = ; + QuestIComp icomp np = + let cls = predVP np (VS.UseComp icomp) ; + -- cl = cls ** { -- TODO: neg. questions + -- stm : ClType=>Polarity=>Str = \\_,_ => "waa" + -- } + in cl2sentence False cls ; -- copula is dropped and STM is waa -- Interrogative pronouns can be formed with interrogative -- determiners, with or without a noun. @@ -93,10 +96,15 @@ concrete QuestionSom of Question = CatSom ** open -- pronouns. -- : IAdv -> IComp ; - --CompIAdv iadv = iadv ; -- where (is it) - + CompIAdv iadv = { -- where (is it) + comp = \\_ => <[], iadv.s> ; + stm = Waa NoCopula ; + } ; -- : IP -> IComp ; - --CompIP ip = { s = ip.s ! Abs } ; -- who (is it) + CompIP ip = { -- who (is it) + comp = \\_ => <[], ip.s ! Abs> ; + stm = Waa NoCopula ; + } ; {- -- More $IP$, $IDet$, and $IAdv$ are defined in $Structural$.