mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-23 18:21:11 -06:00
(Som) Fixes in question clauses
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user