PlainChat is a lightweight, context-aware chatbot designed for the travel and hospitality industry. It moves beyond simple keyword matching by implementing Natural Language Processing (NLP) and a turn-based memory system, allowing for more fluid and human-like interactions.
- 🧠 Contextual Memory
The bot tracks the conversation state using alast_intentbuffer. This allows users to ask follow-up questions like "Tell me more" or "How much does it cost?" without restating the topic. - 🔡 Advanced NLP Pipeline
Integrated withnltk, the system uses Porter Stemming to normalize user input (e.g., converting "booking," "booked," and "books" to the root "book") for higher accuracy. - 🗣️ Text-to-Speech (TTS)
Built-in auditory responses using thepyttsx3library, providing a hands-free interactive experience. - 📊 Dynamic Knowledge Base
All logic is decoupled from the code. The bot’s "brain" is stored inKeywordsv6.csv, making it incredibly easy to update responses or add new travel categories.
PlainChat is built with a focus on modularity and efficiency:
ChatbotV4.py: The core engine. It handles the NLP preprocessing, intent scoring, memory management, and the main conversation loop.Keywordsv6.csv: The external dataset containing intents, keywords, and randomised response variations.- Scoring Logic: Instead of a "yes/no" match, the bot calculates a match score to ensure it provides the most statistically relevant answer.
Ensure you have Python 3.x installed along with the following libraries:
pip install nltk pyttsx3You: "I need help with my flight status."
Chatbot: "I can certainly help with flight updates. Please provide your flight number."
You: "What time does it arrive?" (Contextual Follow-up)
Chatbot: "The current scheduled arrival is at 4:30 PM."
ChatbotV4.py— Main Python application.Keywordsv6.csv— Knowledge base and intent mapping[cite: 1].README.md— Project documentation.
Rishi Gupta
Grade 12 Student | Aspiring AI Developer