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..

How do I allow for specific inputs multiple sentences?
 
 

For certain questions I want to allow the user to input multiple sentences.

However, if they do that, standard AIML uses the sentence delimiter to break it up into multiple sequential inputs.

How do I allow say multiple sentences as a single input blob?

 

 
  [ # 1 ]

You can use input index to refer to the previous messages said by the user. Create a variable combining as many of the previous messages as you wish to check.

In this example, the word “Matched” is displayed if the user says, “Hello. How are you? I am Steve”. This would normally count as 3 messages.

<category>
    <
pattern>TEST INPUT</pattern>
        <
template>
            <
think>
                <
set name="combined"><input index="4"/> <input index="3"/> <input index="2"/></set>
            </
think>
            <
condition name="combined">
                <
li value="hello how are you I am Steve">Matched</li>
                <
li>No match</li>
            </
condition>
        </
template>
</
category
 

 
  [ # 2 ]

@Steve thank you! I need something for a problem really close to this… you saved my day
i’m way too much newbie here

 

 
  [ # 3 ]

Hi, Andrea, and welcome to chatbots.org! smile

Steve is our “resident guru” here for all things AIML, and I’m pretty sure he’s the world’s leading expert in the language (or at the very least in the top 5). If anyone knows how to do something in AIML, he does. wink

 

 
  [ # 4 ]

My pleasure Andrea. Always happy to help anyone with any AIML queries.

Dave - Stop it. My head will be too large to fit through the door.

 

 
  [ # 5 ]

Um… Steve? False modesty is nearly as bad as outright hubris. raspberry

Ok, kidding, but how many times have you placed in the top 3 of the Loebners? And Mitsuku is the #1 Skype bot, and has been for a while now. Seriously, I’m pretty darned good with AIML, but you make me look like an amateur. smile

 

 
  [ # 6 ]

Thanks Dave. That’s very kind of you.

Yes, Mitsuku is the most popular bot on Skype. You can talk to it by clicking the robot head icon on Skype. Microsoft have even promoted it above their own bots.

It’s been online for 2 months and had 12 million interactions so far with almost 400,000 users!

 

 
  [ # 7 ]

And to think, I knew her when she was but a wee lass…
seems like such a long time ago.  She’s all grown up now
and me…well, I’m still the same age. <ahem…cough…hack…> wink

I see you Steve! Beaming with pride like only a proud dad would!

 

 
  login or register to react