AI Chatbot Practical File
AI Chatbot Practical File
Introduction:
This project aims to create an AI chatbot that can answer basic questions. The chatbot is
programmed using Python and the nltk library to simulate human-like conversations.
Objective:
Required Software:
- Python 3.x
- nltk library
Working Principle:
Python Code:
import random
import nltk
pairs = [
["how are you", ["I'm just a bot, but I'm doing well!", "I'm good! What about you?"]],
["what is your name", ["I'm a chatbot created for this project!", "You can call me AI Bot."]],
def chatbot():
chat.converse()
if __name__ == "__main__":
chatbot()
Output Example:
User: hi
Chatbot: Hello!
User: bye
Chatbot: Goodbye!
Conclusion:
This project showcases how a simple chatbot can be implemented using Python. It introduces the
concepts of Natural Language Processing and AI-based conversations. Future improvements can