The chatbot is an A.I. powered software. A chatbot is often described as one of the most advanced and promising expressions of interaction between humans and machines. However, from a technological point of view, a chatbot only represents the natural evolution of a Question-Answering system leveraging Natural Language Processing (NLP).
Sequence-to-sequence (seq2seq) models (Sutskever et al., 2014, Cho et al., 2014) have enjoyed great success in a variety of tasks such as machine translation, speech recognition, and text summarization. This chatbot is based on seq2seq neural network with an attention mechanism. The GRU(Gated recurrent unit) cell is being used in the seq2seq NN. For the word embedding, Glove pretrained model is being used.
- Tensorflow >= 1.10
- matplotlib
- sklearn
- numpy
- unicodedata
- re
- os
The Chatbot.py have Data preprocessing, Word embedding, Training, Evolution all the parts. I trained for three days on RTX2080ti on my own collected dataset and the results are pretty good. Change the parameter according to your machine configuration. The seq2seq model used the GRU(Gated recurrent unit) layer. For the word embedding layer glove.6B.100d model is being used. After that encoder's output pass to the decoder. "Teacher forcing algorithm" - feeding the target as the next input. For the prediction "Greedy search algorithm" is being used.