Imagine the following exchange:
user: book off 3 days from next mon
bot: ok, that’s Monday 29th Feb to Wed 2nd Mar. Is that correct?
user: no just tuesday
The intention of the user was to change the period to a single day, next Tuesday.
The “no” is handled as an interjection (no problem with that), leaving “just tuesday” as the next sentence. But then “just” is removed as noise because it starts the sentence. That means my final sentence is merely the day name, which if the user had said that to begin with would have the intention of moving the 3 day period to start on that day, i.e. “no (from) tue”.
If the user says “no only tuesday” that I can match the “only” and perform the desired intention.
But I’m stumped as to a good way to proceed.
I don’t really want to change the livedata files, because of things like “just do it”. They seem perfectly good things to do in the vast majority of situations.
I’ve played around with changing $cs_token and using ^analyze() in a prepass topic but not wholly satisfactorily. I can detect the word “just” after the “no” and I can replace it with “only” for example. But when I reset $cs_token back to the standard default and do ^analyze() on the new string then the multiple sentence processing appears to break and only the “no” is handled. %more is true, but ^fail(SENTENCE) does go on to the next sentence as it would ordinarily do if I hadn’t done the ^analyze().