change type of np and add helper function to construct string from split category

This commit is contained in:
Herbert Lange
2019-06-28 16:21:30 +02:00
parent de44443068
commit e2ba2023e1
13 changed files with 63 additions and 58 deletions
+5 -4
View File
@@ -36,7 +36,7 @@ concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in {
SlashPrep cl prep = cl ** {c2 = prep.s} ;
--
-- SlashVS np vs slash =
-- mkClause (np.s ! Nom) np.a
-- mkClause (combineNounPhrase np ! PronNonDrop ! Nom) np.a
-- (insertObj (\\_ => conjThat ++ slash.s) (predV vs)) **
-- {c2 = slash.c2} ;
--
@@ -50,9 +50,10 @@ concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in {
-- UseQCl : Temp -> Pol -> QCl -> QS -- maybe use mkQuestion
UseQCl t p cl =
{
s = \\q => case q of {
QDir => t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV ++ cl.o ! PreV ;
QIndir => t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.o ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV
s = let qs = combineClause cl t t.a p VQTrue in
\\q => case q of {
QDir => cl.q ++ combineSentence qs ! SPreS ! PreV ! CPostV ! SVO ; -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV ++ cl.o ! PreV ;
QIndir => cl.q ++ combineSentence qs ! SPreS ! PreV ! CPostV ! SOV -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.o ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV
}
} ;