This is a Python-based chatbot framework capable of handling conversations on specific topics like Health and Wellness, Technology and Innovation, and Personal Finance. The chatbot uses techniques such as regular expressions, keyword detection, semantic similarity, and named entity recognition (NER) to understand user input and provide relevant responses.
- Modular Design: Separate bots for different fields of expertise.
- Natural Language Processing: Utilizes spaCy for NER, lemmatization, and intent matching.
- Feedback System: Gathers user feedback to improve responses.
- Interactive User Interface: Users can choose a bot based on their interests.
- Exit Commands: Allows users to exit the conversation gracefully at any time.
Before running the project, ensure you have the following installed:
- Python 3.7 or later
- spaCy
- Required English language model (
en_core_web_sm
)
Install the dependencies using:
- pip install spacy
- python -m spacy download en_core_web_sm
- main.py: The entry point of the chatbot framework.
- health_and_wellness.py: Contains the implementation of the HealthBot.
- technology_and_innovation.py: Contains the implementation of the TechBot.
- personal_finance_and_innovation.py: Contains the implementation of the FinanceBot.
- Clone the repository.
- Navigate to the project directory.
- Run the main script: python main.py.
- Choose a bot to interact with by entering the corresponding number.
- The user selects a chatbot (Health, Technology, or Finance).
- The bot initiates the conversation by asking field-specific questions.
- User inputs are processed using:
- Regular Expressions for pattern matching.
- Lemmatization and Token Analysis using spaCy.
- Semantic Similarity for intent recognition.
- Named Entity Recognition (NER) to identify key entities like names, places, or dates.
- The bot responds based on detected intents or falls back to a default response if no match is found.
- The user provides feedback on the bot's response to improve its behavior.
You can add new bots or enhance existing ones by following these steps:
- Create a new Python file for the bot.
- Define the bot class with:
- Field-specific questions.
- User patterns and response handlers.
- Update main.py to include the new bot option.