Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

🤖 PlainChat: Memory-Enabled Travel Assistant

Python Version License: MIT

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.


🌟 Key Features

  • 🧠 Contextual Memory
    The bot tracks the conversation state using a last_intent buffer. 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 with nltk, 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 the pyttsx3 library, providing a hands-free interactive experience.
  • 📊 Dynamic Knowledge Base
    All logic is decoupled from the code. The bot’s "brain" is stored in Keywordsv6.csv, making it incredibly easy to update responses or add new travel categories.

🛠️ Technical Architecture

PlainChat is built with a focus on modularity and efficiency:

  1. ChatbotV4.py: The core engine. It handles the NLP preprocessing, intent scoring, memory management, and the main conversation loop.
  2. Keywordsv6.csv: The external dataset containing intents, keywords, and randomised response variations.
  3. Scoring Logic: Instead of a "yes/no" match, the bot calculates a match score to ensure it provides the most statistically relevant answer.

🚀 Getting Started

Prerequisites

Ensure you have Python 3.x installed along with the following libraries:

pip install nltk pyttsx3

📖 Usage Example

You: "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."


📁 Project Structure

  • ChatbotV4.py — Main Python application.
  • Keywordsv6.csv — Knowledge base and intent mapping[cite: 1].
  • README.md — Project documentation.

👨‍💻 Author

Rishi Gupta
Grade 12 Student | Aspiring AI Developer


About

PlainChat is a Python-based conversational AI designed to streamline travel and hospitality inquiries. Unlike basic keyword-matching bots, PlainChat utilizes Natural Language Processing (NLP) and a contextual memory system to engage in meaningful, multi-turn dialogues..

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors