Hi all,
I am making a chatbot as a semester project and i am keenly interested in it. I am trying to implement it using relational databases. All the chatbots i know have been implemented using files, xml or aiml(extension of xml i.e Artificial markup language) .
Now that i am doing it using databases i am having few problems. Main problem is modelling | structuring database. For now what i have thought is something like this:
Lets say i want to store keywords and responses. Lets say user say “hi” that is a keyword and it will be searched in database for keywords and corresponding response that might be “hiya” is displayed to user. This is the most simple thing we can do.
being one step forward i need to do something like this.
for example a list of similar keywords can have simialar responses like
“hi” “hello” “hey” can have any of “hi, how r u?” “hey, nice to meet you” .here we have 3 similar keywords and 2 responses to each keyword. response will be picked randomly for now. I want to ask how to implement it?
What i am thinking to do is creating a main keyword which have multiple responses. and managing a list of all keywords that ultimately point to the main similar keyword.
for example
————————————
main keywords table
—————————-
id keyword responses
1 hi 1
2 bye 2
————————————————
All keywords table
————————-
id keywords main keyword
1 hey 1
2 hello 1
3 hiya 1
4 hi 1
5 bye 2
6 goodbye 2
——————————-
responses table
————————————-
id responses
1 hey how are you
2 Bye!
now whenever user say “hey” it will be searched in a big list of all the keywords then it will point to main keyword and from their it will point to responses.
how to store similar responses?
Is it the right approach?
wont it make the system to complex and cluttered? because eventually there is going to be a lot of data.
Is there any good approach to handle this, or you can refer to some material available about chatbots using databases?
In attachment is a database diagram which i will be working upon. I am afraid to say here, but its totally noob:)
if i couldnt convey the message well, Kindly ask for further explanation. Your help will be duely appreciated.
Thanks in advance