The Brief – Python Chatbot:
In the practical session you will create an interactive Python chatbot. This should engage the user in interesting and intelligent conversation. The bot should be able to ask and answer questions. Try to make it as realistic and life-like as possible.
Below is a demonstration of the completed chatbot script:
The main features of the script are:
- Use of stop words to filter out non-meaningful user input
- User’s name is checked against a dictionary of 5000+ common first names
- The Python Wikipedia library is used to provide responses to user’s questions
- The urllib and Beautiful Soup libraries are used to present a set of ‘interesting facts’ about the user’s year of birth, scraped from the web