943,082 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 1175
  • MySQL RSS
Jan 4th, 2010
0

Chatbot Database Issue

Expand Post »
Ok, I'm developing a chat bot for a client. But I'm having a hard time figuring out the best way to do this.

Because the bot isn't that big, I thought use a table with the phrase and the response. Then use LIKE. Not as easy as I thought though.

Lets say I had the phrase "server down" and the response was "please contact db@site.com". If the user typed in "Help, my server has gone down today for about 5 hours what can I do".

.... The issue is how should that be fed into the database to get that response?

Someone recommended creating a blacklist of words, like 'help', 'my', 'has', 'gone', 'today', 'for', 'about', 'five' .... Or a white list of common words.

Sort of lost. What would you recommened. I cant find anything on Google about it.
Similar Threads
Reputation Points: 17
Solved Threads: 0
Newbie Poster
JayOne is offline Offline
13 posts
since Dec 2009
Jan 5th, 2010
0
Re: Chatbot Database Issue
Whether you use a blacklist or a whitelist... I think you must create the one which is smallest and/or with the least impact. I think a blacklist would be smaller, if you allow no words smaller than 4 characters to be used anyway.

You could add tagging to a response. So for example in your example the response is tagged with 'server' and 'down'. It would be possible to create a search on the tags.
Sponsor
Featured Poster
Reputation Points: 546
Solved Threads: 716
Bite my shiny metal ass!
pritaeas is offline Offline
4,143 posts
since Jul 2006
Mar 16th, 2010
0
Re: Chatbot Database Issue
I created a simple chat bot a year or so ago now. The way i went about it was to store keywords in the database that relate to a specific question, or desired output. (This is compiled with a very simple form)

To search the database I break the input down into an array of single words and use a group of functions to search for the entries whos keywords are all in the input array. I can if i want have a selection of different outputs for any set of keywords.

-- I did say it was simple! --

This is a very basic method but it does work. and allows an automated response from a "question".

A lack of spare time has prevented me from developing my chat bot much, but I would love to have a system that not just replies but can ask related questions back and be a little more interactive than just a dead end response, I have some ideas for that but its a huge task, and somewhat complex! If anyone has any ideas on how to structure this I would like to hear from you.
Reputation Points: 13
Solved Threads: 0
Newbie Poster
TheWabbit is offline Offline
2 posts
since Mar 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in
Next Thread in MySQL Forum Timeline: find in set BIG PROBLEM do not understand this





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC