# sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews architecture

> Architecture diagram of the GitHub repository sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews
- Repository: https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews

## Overview

This is a Streamlit sentiment-analysis application. Users provide text directly or through URL, PDF, or CSV input; the app extracts text where needed, translates it to English, analyzes it with the selected VADER or BiLSTM model, and displays sentence-level results. A separate training script prepares sample data and saves the BiLSTM model and tokenizer used at runtime. The README documents these input and analysis capabilities; the sampled app source shows their implementation in one module.

Main entry points: [`sentiment_project_full/app.py`](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py) (Streamlit interface), [`sentiment_project_full/artifacts`](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/tree/main/sentiment_project_full/artifacts) (Model and tokenizer files), [`sentiment_project_full/training/train_bilstm.py`](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/training/train_bilstm.py) (BiLSTM training), [`sentiment_project_full/utils/text_utils.py`](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/utils/text_utils.py) (Training text cleaning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Input and UI"]
  node_app_ui["Streamlit interface<br/>[app.py]"]
  node_text_input["Text input<br/>[app.py]"]
  node_url_extract["URL extraction<br/>[app.py]"]
  node_pdf_extract["PDF extraction<br/>[app.py]"]
  node_csv_extract["CSV extraction<br/>[app.py]"]
end

subgraph group_analysis["Analysis"]
  node_process["Analysis selection<br/>[app.py]"]
  node_vader["VADER analysis<br/>[app.py]"]
  node_bilstm_inference["BiLSTM inference<br/>[app.py]"]
  node_results["Results display<br/>[app.py]"]
end

subgraph group_model["Model lifecycle"]
  node_training["BiLSTM training<br/>[train_bilstm.py]"]
  node_clean_text["Training text cleaning<br/>[text_utils.py]"]
  node_artifacts["Model and tokenizer files"]
end

node_user(("User"))
node_web["Web page"]
node_translation["Translation service"]

node_user -->|"uses"| node_app_ui
node_app_ui -->|"accepts text"| node_text_input
node_app_ui -->|"selects URL"| node_url_extract
node_app_ui -->|"selects PDF"| node_pdf_extract
node_app_ui -->|"selects CSV"| node_csv_extract
node_url_extract -->|"fetches page"| node_web
node_app_ui -->|"submits text"| node_process
node_process -->|"translates text"| node_translation
node_process -->|"selects VADER"| node_vader
node_process -->|"selects BiLSTM"| node_bilstm_inference
node_vader -->|"returns scores"| node_results
node_bilstm_inference -->|"returns predictions"| node_results
node_results -->|"shows results"| node_user
node_training -->|"cleans samples"| node_clean_text
node_training -->|"saves model"| node_artifacts
node_app_ui -->|"loads model"| node_artifacts
node_bilstm_inference -->|"uses tokenizer"| node_artifacts

click node_app_ui "https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py"
click node_text_input "https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py"
click node_url_extract "https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py"
click node_pdf_extract "https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py"
click node_csv_extract "https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py"
click node_process "https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py"
click node_vader "https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py"
click node_bilstm_inference "https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py"
click node_results "https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py"
click node_training "https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/training/train_bilstm.py"
click node_clean_text "https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/utils/text_utils.py"
click node_artifacts "https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/tree/main/sentiment_project_full/artifacts"

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_app_ui,node_text_input,node_url_extract,node_pdf_extract,node_csv_extract,node_user toneBlue
class node_process,node_vader,node_bilstm_inference,node_results toneAmber
class node_training,node_clean_text,node_artifacts toneMint
class node_web,node_translation toneIndigo
```

## Components

### Input and UI

- [Streamlit interface](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py): `sentiment_project_full/app.py`
- [Text input](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py): `sentiment_project_full/app.py`
- [URL extraction](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py): `sentiment_project_full/app.py`
- [PDF extraction](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py): `sentiment_project_full/app.py`
- [CSV extraction](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py): `sentiment_project_full/app.py`

### Analysis

- [Analysis selection](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py): `sentiment_project_full/app.py`
- [VADER analysis](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py): `sentiment_project_full/app.py`
- [BiLSTM inference](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py): `sentiment_project_full/app.py`
- [Results display](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/app.py): `sentiment_project_full/app.py`

### Model lifecycle

- [BiLSTM training](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/training/train_bilstm.py): `sentiment_project_full/training/train_bilstm.py`
- [Training text cleaning](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/blob/main/sentiment_project_full/utils/text_utils.py): `sentiment_project_full/utils/text_utils.py`
- [Model and tokenizer files](https://github.com/sinchana-gowda26/nlp-model-foe-sentiment-analysis-to-classify-text-tweets-comments-and-reviews/tree/main/sentiment_project_full/artifacts): `sentiment_project_full/artifacts`

### Other components

- **User**
- **Web page**
- **Translation service**

## Connections

- User → Streamlit interface: uses
- Streamlit interface → Text input: accepts text
- Streamlit interface → URL extraction: selects URL
- Streamlit interface → PDF extraction: selects PDF
- Streamlit interface → CSV extraction: selects CSV
- URL extraction → Web page: fetches page
- Streamlit interface → Analysis selection: submits text
- Analysis selection → Translation service: translates text
- Analysis selection → VADER analysis: selects VADER
- Analysis selection → BiLSTM inference: selects BiLSTM
- VADER analysis → Results display: returns scores
- BiLSTM inference → Results display: returns predictions
- Results display → User: shows results
- BiLSTM training → Training text cleaning: cleans samples
- BiLSTM training → Model and tokenizer files: saves model
- Streamlit interface → Model and tokenizer files: loads model
- BiLSTM inference → Model and tokenizer files: uses tokenizer
