Building-a-Simple-Chatbot-in-Python-using-NLTK icon indicating copy to clipboard operation
Building-a-Simple-Chatbot-in-Python-using-NLTK copied to clipboard

Help to train on my own data set.

Open rashmisgh opened this issue 4 years ago • 5 comments

Hey, How can we train this algo on out sets of questions and answer?

rashmisgh avatar Apr 03 '20 09:04 rashmisgh

Hi rashmisgh, did you find the answer on how to train this bot?

anil-ajax avatar May 13 '20 19:05 anil-ajax

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 .

rashmisgh avatar Jun 26 '20 07:06 rashmisgh

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.

mumtazmalik avatar Aug 06 '20 12:08 mumtazmalik

Yes @mumtazmalik is right use corpus for this to build dataset and use that dataset to train this modal

Amit-Dagar avatar Aug 20 '20 04:08 Amit-Dagar

go to the article and have a code snippet of how to train your own dataset in python chatbot click to view

Deepak546 avatar Mar 24 '21 04:03 Deepak546