You only see 1 sentence at a time. PERIOD. so you cant trap ~emohello and another sentence using a single pattern.
Normally the system will see the first sentence (~emohello) and generate a response. It will then see the second sentence and generate a 2nd response. This would be the “normal” or “default” way of doing things. When you want something different to happen, you have to code your control script or your regular script differently.
The question is…. what do you want to do.
If the user says Hello! I have a dog.
What output do you want out of your chatbot. Do you want it to reply:
Hello back. That’s nice that you have a dog.
Or ignore hello or ignore the dog or what?
first, I am going to release a tiny update probably tonight to be more efficient about it. Here is an example of how I would use it….
The issue is a user answering the question “do you have any pets” might say:
Yes, I have a dog.
Yes. I have a dog.
The 2nd 2 inputs are the same to chatscript, because it breaks off the interjection into its own sentence.
If the user says just yes, you want to ask what kind. If the user is already going to answer that question you don’t want to ask it.
t: Do you have any pets
a: (~yes) refine()
b: (%more) NextInput() refine()
c: (~pets) ….. react to pet
c: () ^retry(SENTENCE) # return to try input from scratch
b: () What kind do you have?
c: (~pets) …. react to pet
The current coding would require
c: (_*) input(‘_0) fail(SENTENCE)
but that forces the system to receive the new input again and reanalyze it again. Since the analysis done by NextInput is still valid, this is wasteful and hence ^retry now takes what kind of thing to retry and for sentence doesnt redo the prep work. This retry FAILS all the way back to initial processing of the sentence then comes in “as though it were doing this second sentence normally”.