Here are some sample code I am learning to chat with, and I have tested each chat bot.
This chat robot mainly uses NLTK library to calculate the TF-IDF values of user input sentence and sentences in the corpus chatbot.txt, and then chooses the sentences in the corpus that are closest to the cosine angle of user input statements as the answers (if they exist).
RUN snips-nlu-tutorial for Slot Filling and Intent Prediction.ipynb