(Som) Fix bug in QuestSlash, new unit tests + comments.

This commit is contained in:
Inari Listenmaa
2019-09-13 14:04:28 +02:00
parent 52aa4c35e0
commit d52f1633b7
3 changed files with 35 additions and 10 deletions
+11 -3
View File
@@ -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 ;