# gabrielandrus/sherlock-homes architecture

> Architecture diagram of the GitHub repository gabrielandrus/sherlock-homes, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gabrielandrus/sherlock-homes
- Repository: https://github.com/gabrielandrus/sherlock-homes

## Overview

##### Project Type & Purpose
- The project is a Python-based chatbot tailored for real-estate inquiries in Toronto. Its purpose is to process user input, analyze it (possibly extracting real-estate-related entities using NER), and provide suitable responses using local data (CSV and dataset.zip). This is not a full-stack web application—instead, it is a modular command-line (or simple UI) bot with distinct processing components.

##### Analyzing the File Structure
- Key Files:
- main.py: Likely the entry point for the application.
- sherlock_chatbot.py: Contains the primary chatbot logic.
- ner_model.py: Implements the Named Entity Recognition (NER) module, probably used to extract relevant data (like addresses, property details, etc.) from user inputs.
- real-estate-data.csv and dataset.zip: Data assets that may provide the listings or training data.
- requirements.txt: Lists the Python libraries and dependencies.
- Directories:
- The “SherlockHomesChatbot” directory (with its __pycache__) might house additional modules or assets related to the chatbot.
- .idea folder indicates the use of an IDE (such as PyCharm) but is not directly part of the runtime logic.
- Overall, the file structure suggests a loosely layered design where data processing, NER, and chatbot logic are separated into distinct modules.

## Diagram (Mermaid)

```mermaid
flowchart TD
    UI["User Interface/Input"]:::ui
    Entry["Application Entry Point: main.py"]:::entry
    Chatbot["Chatbot Logic Module: sherlock_chatbot.py"]:::chatbot
    NER["NER Processing Module: ner_model.py"]:::ner
    subgraph "Data Layer"
        CSV["real-estate-data.csv"]:::data
        DS["dataset.zip"]:::data
    end
    Deps["Dependencies & Configuration: requirements.txt"]:::deps

    UI -->|"sends_input"| Entry
    Entry -->|"initializes"| Chatbot
    Chatbot -->|"invokes"| NER
    Chatbot -->|"queries"| CSV
    Chatbot -->|"queries"| DS
    NER -->|"queries"| CSV
    NER -->|"queries"| DS
    Entry -->|"loads"| Deps
    Chatbot -->|"uses"| Deps

    click Entry "https://github.com/gabrielandrus/sherlock-homes/blob/main/main.py"
    click Chatbot "https://github.com/gabrielandrus/sherlock-homes/blob/main/sherlock_chatbot.py"
    click NER "https://github.com/gabrielandrus/sherlock-homes/blob/main/ner_model.py"
    click CSV "https://github.com/gabrielandrus/sherlock-homes/blob/main/real-estate-data.csv"
    click DS "https://github.com/gabrielandrus/sherlock-homes/blob/main/dataset.zip"
    click Deps "https://github.com/gabrielandrus/sherlock-homes/blob/main/requirements.txt"

    classDef ui fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
    classDef entry fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef chatbot fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
    classDef ner fill:#D7BDE2,stroke:#8E44AD,stroke-width:2px;
    classDef data fill:#A9DFBF,stroke:#27AE60,stroke-width:2px;
    classDef deps fill:#FAD7A0,stroke:#D35400,stroke-width:2px;
```
