AI Zone Admin Forum Add your forum

CHATBOT MEETUP CHATBOT MEETUP CHATBOT MEETUP CHATBOT CHATBOT MEETUP CHATBOT MEETUP CHATBOT MEETUP CHATBOT MEETUP

On Wed 31th, 2017 we're organizing a Chatbot Meetup in Amsterdam, The Netherlands. Feel free to join!'

AI Bot
 
 

Hi There!,

I am trying to build my own chat bot called “Jerry” using PHP as a scripting language and MYSQL as database.

I am wondering if anyone can explain how does program-o parser parse user input and find best score?

really excited to get started

 

 
  [ # 1 ]

Hello and welcome, Syed! smile

Program O uses several algorithms to accomplish the task of selecting the correct AIML category to process. First, the script “casts a wide net”, gathering all potential matches from the database, based on the current topic, what the chatbot’s most recent response was, and the user’s input is. What gets returned is a rather large array of potential matches (most of the time). This array is then passed to several functions designed to reject irrelevant entries and to assign point values to each element of the array, based on a series of ever more stringent “rules”. The remaining array is then sorted by these point values, with the element having the highest “score” becoming the selected AIML category. In the case of ties, the “winning” category is selected at random from among the remaining highest scoring entries.

All of this takes place in the file chatbot/core/aiml/find_aiml.php. In fact, that’s the entire purpose of find_aiml.php smile

 

 
  [ # 2 ]

Dave,

You are the veritable fountain of knowledge. Very nicely explained as usual!;)

 

 
  [ # 3 ]

Thanks, Art. Much appreciated. smile

 

 
  login or register to react