Building-a-Simple-Chatbot-in-Python-using-NLTK
Building-a-Simple-Chatbot-in-Python-using-NLTK copied to clipboard
Help to train on my own data set.
Hey, How can we train this algo on out sets of questions and answer?
Hi rashmisgh, did you find the answer on how to train this bot?
No
On Thu, May 14, 2020 at 1:05 AM Anil Kumar [email protected] wrote:
Hi rashmisgh, did you find the answer on how to train this bot?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/parulnith/Building-a-Simple-Chatbot-in-Python-using-NLTK/issues/4#issuecomment-628201764, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI657KNZDPWG5FC55MWDUBTRRLY6LANCNFSM4L3YDW3Q .
stionHi rashmisgh and anil-ajaz, if you want to train this or make this bot work on your set of questions and answers, the idea is fairly simple. There is a function response that returns idx-th sentence from the corpus. All you have to do is put all your questions in chatbot.txt, get the index of the most similar que. Now, you have to put all your answers in the same order as the questions are. Say we have a pair of question and answer. Q: How do you define physics? A: Physics is blah blah blah..........
Assume your question is 40th question the corpus of questions, the answer should be the 40th answer in the list of answers and you will simply return the 40th answer if the 40th question is asked/the response function predicts the question index to be 40.
I hope this gives you a fair idea; if not, let me know if I should explain it more.
Yes @mumtazmalik is right use corpus for this to build dataset and use that dataset to train this modal
go to the article and have a code snippet of how to train your own dataset in python chatbot click to view