(Som) Fixes in question clauses

This commit is contained in:
Inari Listenmaa
2019-09-12 16:56:50 +02:00
parent 7c03949472
commit 52aa4c35e0
6 changed files with 61 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
concrete QuestionSom of Question = CatSom ** open
Prelude, ResSom, ParadigmsSom, (VS=VerbSom), (NS=NounSom), (AS=AdverbSom) in {
Prelude, ResSom, ParadigmsSom, (VS=VerbSom), (NS=NounSom), (SS=StructuralSom) in {
-- A question can be formed from a clause ('yes-no question') or
-- with an interrogative.
@@ -24,7 +24,7 @@ concrete QuestionSom of Question = CatSom ** open
subj = cls.subj ** {noun = ip.s ! Nom} ; -- place IP first in the sentence, keep old subject pronoun.
obj2 = cls.obj2 ** {s = cls.subj.noun ++ cls.obj2.s} -- move old subject noun before object.
} ;
in cl2qcl (notB ip.contractSTM) clsIPFocus ;
in cl2qclslash (notB ip.contractSTM) clsIPFocus ;
-- : IAdv -> Cl -> QCl ; -- why does John walk
@@ -34,14 +34,20 @@ concrete QuestionSom of Question = CatSom ** open
cl : ClSlash = clRaw ** {
stm = \\clt,p => case <clt,p> of {
-- IAdv is focused with baa, and subject comes after
<_,Pos> => "baa" ++ sbj.pron ++ sbj.noun;
<_,Pos> => case iadv.contractSTM of {
True => [] ; _ => "baa"}
++ sbj.pron ++ sbj.noun ;
-- TODO how do negative questions work
_ => clRaw.stm ! Question ! p ++ sbj.pron ++ sbj.noun } ;
_ => case iadv.contractSTM of {
True => [] ; _ => clRaw.stm ! Question ! p}
++ sbj.pron ++ sbj.noun } ;
subj = sbj ** {noun, pron = []} -- to force subject after baa
} ;
in cl2qcl True cl ; -- TODO: add contractSTM field to IAdv as well
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 = ;
-- Interrogative pronouns can be formed with interrogative
@@ -64,9 +70,7 @@ concrete QuestionSom of Question = CatSom ** open
-- Interrogative adverbs can be formed prepositionally.
-- : Prep -> IP -> IAdv ; -- with whom
PrepIP prep ip =
let ipAbs : Str = ip.s ! Abs
in prepNP (mkPrep prep ipAbs [] []) emptyNP ;
PrepIP prep ip = SS.prepIP prep (ip.s ! Abs) False ;
-- They can be modified with other adverbs.