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 to make an interpreter in PHP, MYSQL? 
 
 

Hello Sir,
I am a beginner to chatbot, but i have a good knowledge of php and My SQL. From the last week i searched a lot about virtual agent. Up to some extent i get to know about AIML, natural language processing etc.
I read your article about “How To Create Your Own Customized Chatbot For Beginners - Chatbots 101”
(http://www.chatbots.org/ai_zone/viewthread/492/). here you have mentioned every thing except PHP AIML interpreter. Can you please direct me towards the any tutorial regarding this?

Promptly waiting for reply…
thanks

 

 
  [ # 1 ]

Our very own 8-man would probably be the best to advise you. What he doesn’t know about PHP isn’t worth knowing. Hopefully, he will pop along soon.

 

 
  [ # 2 ]

Actually, Steve, the article he mentioned was one that I wrote, and while Tom (A.K.A. 8pla.net) can certainly provide some excellent guidance in this area (quite possibly better than I could, all things considered), I think the question was directed at me. raspberry

Hari, I did mention a PHP-based AIML interpreter, but only briefly. There are several PHP-based AIML interpreters available, two of which I’ve got at least a little bit of experience with:

1.) Program E
2.) Program O

8pla.net has also created an AIML interpreter in PHP, but I have no details about that, so we’ll have to see what he has to say about it.

Of the two that I’ve listed, only Program O is in active development. I’m the lead developer for this project, and while I don’t have a lot of time to work on it this time of year (lots of family stuff going on, you see), I usually have time to answer questions.

 

 
  [ # 3 ]

Thanks Steve and Dave Sir for your replies. I am waiting for you TOM(A.K.A. 8pla.net) . :O

 

 
  [ # 4 ]

Hi Hari,  I’ve been coding my own Perl based bot engine in the last few months.  I’ve been experimenting with SQLite, mySQL, and eventually decided using a Perl Hash to store the bot database.

I’ve also played with my own bot “language” if you will, using a simple mySQL database backend that worked reasonably well.

Here’s my advice… If you plan on developing a non-AIML bot engine, then the floor is yours.  You can create a simple table or two in a database, pop it full of rules, and write a nice PHP interface into that table.  That is really easy (so to speak).  I did the same, but I had some issues.  My biggest problem was the lack of features.. The more I tried to add features, the more I realized that AIML was already servicing those.  So I ended up scratching that code, and starting again.

My new code (called AIMLPerl) will now read AIML, and store it in memory.  I did have it in a database originally, but it was a bit slow.  Using an internal memory hash was much faster.  I have a built in AIML parser that will analyze the <template> tags, and figure out what the various tags inside it means.

So basically, with enough programming you can build it from scratch.  I find that by picking a language, be it AIML, Chatscript, RiveScript, or any of the others out there, you allow your bot to be portable, and you allow some portability of code.

 

 
  [ # 5 ]

Dr. Wallace hasn’t granted clearance for Program 8 to launch yet.  So, in the meantime, you should take Dave’s first-class advice.  I’ll just mention that, as a beginner, you may enjoy Program O, more than Program E.

 

 
  [ # 6 ]

SimpleAIML

A lightweight limited AIML interpreter,
based on PHP SimpleXML,
for educational use.

http://www.Elizabot.com/SimpleAIML

 

 
  login or register to react