AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

New to Chatscript - some questions
 
 

Hey everyone, I’ve been wanting to build a chatbot for ages and I’ve recently downloaded chatscript.

I just have a quick question, I’m sorry if I’m not very clear as this is my first time with chatscript/programming so bear with me.

Under interjections in the manual, it says that stuff like yes, no, haha (which are under the ~yes ~no and ~emohappy etc) will get broken off into it’s own sentence, with whatever comes after in a new sentence.

For example: the input ‘Yes, I would like ham on my sandwich’ would get broken down into ~yes in the first sentence, and ‘I would like ham on my sandwich’ in the second.

I tried building a simple sandwich building bot to test stuff out.
Using this:
s: (~yes * ham) How many slices?

Doesn’t catch the input ‘Yes, I would like ham on my sandwich’ because it’s not one sentence, but two (after the substitute has broken it down). Is there a way to write something that catches both the ~yes and the ‘ham’ part? I tried just using

s: (ham) How many slices?

But that would also catch ‘no, I don’t want any ham’ which is bad.


Thanks, I hope I made myself clear.

 

 
  [ # 1 ]

If you are saying someone is going to say yes or no, is it in response to something the chatbot says?
If so, one maybe doesn’t need the 2nd sentence.
e.g,

t: Would you like a ham sandwich?
    a: (~yes)
    a: (~no)

But if you are saying you expect out of the blue to get this (which is improbable) you could have something process the first sentence and set a flag….e.g.

s: (~yes %more ) $$yes = true ^fail(sentence)
s: (~no %more) $$no = true ^fail(sentence)

the above process detect this sentence, detect that there is another sentence to follow, so set a flag and stop processing this sentence to move on to the next. then

s: (ham $$yes)  I’m out of ham, sorry.

s: (ham $$no)  If not ham then what?

 

 
  [ # 2 ]

Thanks for the help, it was exactly what I was looking for! =)

 

 
  [ # 3 ]

Ah, but you never did clarify what it was that you were looking for. It’s great that Bruce was able to help, but for the sake of some future individual who has an issue, could you please let us know which of the two solutions that Bruce proposed was the one that did the trick? smile

 

 
  login or register to react