Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Learning Chatbot

A simple console-based chatbot developed using Python. The chatbot uses a JSON knowledge base to store questions and answers and employs fuzzy string matching (difflib) to identify the closest matching question.

Features

  • Interactive command-line chatbot
  • Fuzzy matching for user queries
  • Dynamic learning of new questions and answers
  • Automatic knowledge base updates using JSON
  • Simple and beginner-friendly implementation

Technologies Used

  • Python
  • JSON
  • difflib

How It Works

  1. The chatbot loads questions and answers from a JSON file.
  2. When a user enters a question, the chatbot searches for the closest matching question.
  3. If a match is found, the corresponding answer is displayed.
  4. If no match exists, the chatbot asks the user to provide an answer.
  5. The new question-answer pair is stored in the knowledge base for future interactions.

Project Structure

├── main.py ├── knowledge_base.json └── README.md

Future Improvements

  • GUI using Tkinter
  • Flask-based web interface
  • NLP integration using NLTK or spaCy
  • Speech-to-text and text-to-speech support
  • Database integration (MySQL/SQLite)

Author

Sri Sai Rishita Tadisetti B.Tech CSE | Aspiring AI/ML Engineer

About

A simple AI-inspired chatbot built using Python and JSON that can answer predefined questions and learn new responses from user interactions. The chatbot uses fuzzy string matching to find the closest question and updates its knowledge base dynamically.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages