forked from GitHub/gf-rgl
(Som) Fix bug in QuestSlash, new unit tests + comments.
This commit is contained in:
@@ -21,9 +21,17 @@ concrete QuestionSom of Question = CatSom ** open
|
||||
-- : IP -> ClSlash -> QCl ; -- whom does John love
|
||||
QuestSlash ip cls =
|
||||
let clsIPFocus = cls ** {
|
||||
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.
|
||||
} ;
|
||||
subj = cls.subj ** { -- place IP first in the sentence,
|
||||
noun = ip.s ! Nom -- keep old subject pronoun.
|
||||
} ;
|
||||
obj2 = cls.obj2 ** { -- move old subject noun before object.
|
||||
s = cls.subj.noun ++ cls.obj2.s
|
||||
} ;
|
||||
stm : ClType=>Polarity=>Str =
|
||||
\\clt,p => case <clt,p> of {
|
||||
<_,Pos> => "baa" ;
|
||||
_ => cls.stm ! clt ! p }
|
||||
} ;
|
||||
in cl2qclslash (notB ip.contractSTM) clsIPFocus ;
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ lin how_IAdv = mkIAdv u "sidee" False ;
|
||||
|
||||
-- lin how8much_IAdv = ss "" ;
|
||||
-- lin when_IAdv = ss "" ;
|
||||
-- lin where_IAdv = ss "" ;
|
||||
lin where_IAdv = mkIAdv noPrep "xaggee" False ;
|
||||
lin why_IAdv = let mx = mkIAdv u "maxaa" True in mx ** {s = "waayo"} ;
|
||||
|
||||
{-lin always_AdV = ss "" ;
|
||||
|
||||
@@ -82,20 +82,37 @@ Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (RelNP (UseP
|
||||
|
||||
-- Question clauses
|
||||
|
||||
-- to whom did mother give the meat
|
||||
-- subject pronoun 'ay' included, because whom is an object
|
||||
LangSom: yaa ay siisey hooyo hilib BIND ka
|
||||
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPast ASimul) PPos (QuestSlash whoSg_IP (SlashVP (MassNP (UseN2 mother_N2)) (Slash3V3 give_V3 (DetCN (DetQuant DefArt NumSg) (UseN meat_N))))))) NoVoc
|
||||
|
||||
-- LangEng: who wants to go
|
||||
-- subject pronoun not included, because who is a subject
|
||||
-- subject pronoun not included, because who is a subject. STM merged to pron.
|
||||
LangSom: yaa rabaa in uu tago
|
||||
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestVP whoSg_IP (ComplVV want_VV (UseV go_V))))) NoVoc
|
||||
|
||||
-- to whom did mother give the meat
|
||||
-- subject pronoun 'ay' included, because whom is an object. STM merged.
|
||||
LangSom: yaa ay siisey hooyo hilib BIND ka
|
||||
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPast ASimul) PPos (QuestSlash whoSg_IP (SlashVP (MassNP (UseN2 mother_N2)) (Slash3V3 give_V3 (DetCN (DetQuant DefArt NumSg) (UseN meat_N))))))) NoVoc
|
||||
|
||||
-- LangEng: which cat teaches him
|
||||
-- subject pronoun not included, STM not merged.
|
||||
LangSom: bisad BIND dee baa ku bartaa
|
||||
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestVP (IdetCN (IdetQuant which_IQuant NumSg) (UseN cat_N)) (ComplSlash (SlashV2a teach_V2) (UsePron he_Pron))))) NoVoc
|
||||
|
||||
-- LangEng: which woman did you see
|
||||
-- subject pronoun included, STM not merged.
|
||||
LangSom: naag BIND tee baa aad aragtay
|
||||
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPast ASimul) PPos (QuestSlash (IdetCN (IdetQuant which_IQuant NumSg) (UseN woman_N)) (SlashVP (UsePron youSg_Pron) (SlashV2a see_V2))))) NoVoc
|
||||
|
||||
-- LangEng: where did you go
|
||||
-- subject pronoun included, because IAdv xaggee 'where' is fronted and aad 'you' is subject. STM not merged.
|
||||
LangSom: xaggee baa aad tagtay
|
||||
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPast ASimul) PPos (QuestIAdv where_IAdv (PredVP (UsePron youSg_Pron) (UseV go_V))))) NoVoc
|
||||
|
||||
-- LangEng: why did you go
|
||||
-- subject pronoun included, STM merged.
|
||||
LangSom: maxaa aad u tagtay
|
||||
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPast ASimul) PPos (QuestIAdv why_IAdv (PredVP (UsePron youSg_Pron) (UseV go_V))))) NoVoc
|
||||
|
||||
--- Longer example, unsure about word order -- TODO check
|
||||
-- LangEng: how does your mother paint the house black
|
||||
LangSom: sidee baa ay hooya BIND daa madow u rinjiyeysaa guri BIND ga
|
||||
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestIAdv how_IAdv (PredVP (DetCN (DetQuant (PossPron youSg_Pron) NumSg) (UseN2 mother_N2)) (ComplSlash (SlashV2A paint_V2A (PositA black_A)) (DetCN (DetQuant DefArt NumSg) (UseN house_N))))))) NoVoc
|
||||
|
||||
Reference in New Issue
Block a user