# medhabhat-codes/python_project architecture

> Architecture diagram of the GitHub repository medhabhat-codes/python_project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/medhabhat-codes/python_project
- Repository: https://github.com/medhabhat-codes/python_project

## Overview

This is a single-file, interactive customer-feedback analyzer. Its workflow accepts a message (or built-in samples), extracts and masks PII while removing it from analytical text, then cleans the text and computes sentiment, keyword frequencies, and spam status before printing a report. The stages are implemented in one script rather than separate modules. The README documents these capabilities; the source excerpt confirms their processing order and shared implementation.

Main entry points: [`CUSTOMER_FEEDBACK_ANALYSIS.py`](https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py) (PII Extraction & Masking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Message Analysis"]
  node_clean["Text Cleaning"]
  node_sentiment["Sentiment Scoring"]
  node_keywords["Keyword Frequencies"]
  node_spam["Spam Screening"]
end

subgraph group_privacy["Privacy Processing"]
  node_pii["PII Extraction &amp; Masking"]
end

subgraph group_interaction["Input and Reporting"]
  node_input["Message Input"]
  node_samples["Sample Messages"]
  node_report["Analysis Report"]
end

node_operator(("User"))

node_operator -->|"enters message"| node_input
node_input -->|"selects samples"| node_samples
node_input -->|"provides message"| node_pii
node_samples -->|"provides messages"| node_pii
node_pii -->|"passes sanitized text"| node_clean
node_clean -->|"provides words"| node_sentiment
node_clean -->|"provides words"| node_keywords
node_clean -->|"provides words"| node_spam
node_pii -->|"provides original text"| node_spam
node_sentiment -->|"reports mood"| node_report
node_keywords -->|"reports top terms"| node_report
node_spam -->|"reports classification"| node_report
node_pii -->|"reports masked data"| node_report
node_report -->|"displays results"| node_operator

click node_input "https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py"
click node_samples "https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py"
click node_pii "https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py"
click node_clean "https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py"
click node_sentiment "https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py"
click node_keywords "https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py"
click node_spam "https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py"
click node_report "https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_clean,node_sentiment,node_keywords,node_spam,node_operator toneBlue
class node_pii toneAmber
class node_input,node_samples,node_report toneMint
```

## Components

### Message Analysis

- [Text Cleaning](https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py): `CUSTOMER_FEEDBACK_ANALYSIS.py`
- [Sentiment Scoring](https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py): `CUSTOMER_FEEDBACK_ANALYSIS.py`
- [Keyword Frequencies](https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py): `CUSTOMER_FEEDBACK_ANALYSIS.py`
- [Spam Screening](https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py): `CUSTOMER_FEEDBACK_ANALYSIS.py`

### Privacy Processing

- [PII Extraction & Masking](https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py): `CUSTOMER_FEEDBACK_ANALYSIS.py`

### Input and Reporting

- [Message Input](https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py): `CUSTOMER_FEEDBACK_ANALYSIS.py`
- [Sample Messages](https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py): `CUSTOMER_FEEDBACK_ANALYSIS.py`
- [Analysis Report](https://github.com/medhabhat-codes/python_project/blob/main/CUSTOMER_FEEDBACK_ANALYSIS.py): `CUSTOMER_FEEDBACK_ANALYSIS.py`

### Other components

- **User**

## Connections

- User → Message Input: enters message (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
- Message Input → Sample Messages: selects samples (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
- Message Input → PII Extraction & Masking: provides message (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
- Sample Messages → PII Extraction & Masking: provides messages (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
- PII Extraction & Masking → Text Cleaning: passes sanitized text (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
- Text Cleaning → Sentiment Scoring: provides words (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
- Text Cleaning → Keyword Frequencies: provides words (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
- Text Cleaning → Spam Screening: provides words (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
- PII Extraction & Masking → Spam Screening: provides original text (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
- Sentiment Scoring → Analysis Report: reports mood (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
- Keyword Frequencies → Analysis Report: reports top terms (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
- Spam Screening → Analysis Report: reports classification (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
- PII Extraction & Masking → Analysis Report: reports masked data (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
- Analysis Report → User: displays results (evidence: `CUSTOMER_FEEDBACK_ANALYSIS.py`)
