# james1203-bogart/lda architecture

> Architecture diagram of the GitHub repository james1203-bogart/lda, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/james1203-bogart/lda
- Repository: https://github.com/james1203-bogart/lda

## Overview

This is a Flask application for analyzing student feedback, with an upload-to-report workflow and supporting topic, sentiment, evaluation, and export features. README text is only a title, so the workflow and capabilities shown here are based on the sampled application code and module descriptions. The app.py excerpt is partial; unsampled routes and subsystem links are omitted where their ownership is not evidenced.

Main entry points: [`app.py`](https://github.com/james1203-bogart/lda/blob/main/app.py) (Flask workflow), [`modules/preprocessing.py`](https://github.com/james1203-bogart/lda/blob/main/modules/preprocessing.py) (Text preprocessing), [`modules/topic_modeling.py`](https://github.com/james1203-bogart/lda/blob/main/modules/topic_modeling.py) (LDA modeling), [`modules/pretrained_model.py`](https://github.com/james1203-bogart/lda/blob/main/modules/pretrained_model.py) (Feedback classifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web workflow"]
  node_webapp["Flask workflow<br/>[app.py]"]
  node_upload["Dataset upload<br/>[app.py]"]
  node_column["Text column selection<br/>[app.py]"]
  node_state[("Analysis state store<br/>[app.py]")]
end

subgraph group_analysis["Feedback analysis"]
  node_preprocess["Text preprocessing<br/>[preprocessing.py]"]
  node_lda["LDA modeling<br/>[topic_modeling.py]"]
  node_classifier["Feedback classifier"]
  node_sentiment["Sentiment analysis<br/>[sentiment.py]"]
  node_evaluation["Model evaluation<br/>[evaluation.py]"]
  node_config["Analysis configuration<br/>[config.py]"]
end

subgraph group_reporting["Results and reporting"]
  node_visualization["Chart generation<br/>[visualization.py]"]
  node_results["Analysis results<br/>[results.html]"]
  node_export["Spreadsheet export<br/>[app.py]"]
end

node_user(("Analyst"))
node_browser(("Web browser"))
node_csv["CSV or Excel file"]

node_user -->|"uses"| node_browser
node_browser -.->|"submits requests"| node_webapp
node_webapp -->|"routes upload"| node_upload
node_csv -.->|"provides dataset"| node_upload
node_upload -->|"stores analysis"| node_state
node_webapp -->|"routes selection"| node_column
node_column -->|"updates analysis"| node_state
node_webapp -->|"preprocesses texts"| node_preprocess
node_webapp -->|"analyzes ratings"| node_sentiment
node_webapp -->|"classifies feedback"| node_classifier
node_webapp -->|"trains topics"| node_lda
node_webapp -->|"evaluates model"| node_evaluation
node_webapp -->|"generates charts"| node_visualization
node_webapp -->|"loads settings"| node_config
node_webapp -->|"persists analyses"| node_state
node_webapp -->|"renders report"| node_results
node_webapp -->|"builds workbook"| node_export
node_export -->|"reads analysis"| node_state

click node_webapp "https://github.com/james1203-bogart/lda/blob/main/app.py"
click node_upload "https://github.com/james1203-bogart/lda/blob/main/app.py"
click node_column "https://github.com/james1203-bogart/lda/blob/main/app.py"
click node_preprocess "https://github.com/james1203-bogart/lda/blob/main/modules/preprocessing.py"
click node_lda "https://github.com/james1203-bogart/lda/blob/main/modules/topic_modeling.py"
click node_classifier "https://github.com/james1203-bogart/lda/blob/main/modules/pretrained_model.py"
click node_sentiment "https://github.com/james1203-bogart/lda/blob/main/modules/sentiment.py"
click node_evaluation "https://github.com/james1203-bogart/lda/blob/main/modules/evaluation.py"
click node_visualization "https://github.com/james1203-bogart/lda/blob/main/modules/visualization.py"
click node_config "https://github.com/james1203-bogart/lda/blob/main/config.py"
click node_state "https://github.com/james1203-bogart/lda/blob/main/app.py"
click node_results "https://github.com/james1203-bogart/lda/blob/main/templates/results.html"
click node_export "https://github.com/james1203-bogart/lda/blob/main/app.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_webapp,node_upload,node_column,node_state,node_browser toneBlue
class node_preprocess,node_lda,node_classifier,node_sentiment,node_evaluation,node_config toneAmber
class node_visualization,node_results,node_export toneMint
class node_user,node_csv toneIndigo
```

## Components

### Web workflow

- [Flask workflow](https://github.com/james1203-bogart/lda/blob/main/app.py): `app.py`
- [Dataset upload](https://github.com/james1203-bogart/lda/blob/main/app.py): `app.py`
- [Text column selection](https://github.com/james1203-bogart/lda/blob/main/app.py): `app.py`
- [Analysis state store](https://github.com/james1203-bogart/lda/blob/main/app.py): `app.py`

### Feedback analysis

- [Text preprocessing](https://github.com/james1203-bogart/lda/blob/main/modules/preprocessing.py): `modules/preprocessing.py`
- [LDA modeling](https://github.com/james1203-bogart/lda/blob/main/modules/topic_modeling.py): `modules/topic_modeling.py`
- [Feedback classifier](https://github.com/james1203-bogart/lda/blob/main/modules/pretrained_model.py): `modules/pretrained_model.py`
- [Sentiment analysis](https://github.com/james1203-bogart/lda/blob/main/modules/sentiment.py): `modules/sentiment.py`
- [Model evaluation](https://github.com/james1203-bogart/lda/blob/main/modules/evaluation.py): `modules/evaluation.py`
- [Analysis configuration](https://github.com/james1203-bogart/lda/blob/main/config.py): `config.py`

### Results and reporting

- [Chart generation](https://github.com/james1203-bogart/lda/blob/main/modules/visualization.py): `modules/visualization.py`
- [Analysis results](https://github.com/james1203-bogart/lda/blob/main/templates/results.html): `templates/results.html`
- [Spreadsheet export](https://github.com/james1203-bogart/lda/blob/main/app.py): `app.py`

### Other components

- **Analyst**
- **Web browser**
- **CSV or Excel file**

## Connections

- Analyst → Web browser: uses
- Web browser → Flask workflow: submits requests
- Flask workflow → Dataset upload: routes upload (evidence: `app.py`)
- CSV or Excel file → Dataset upload: provides dataset
- Dataset upload → Analysis state store: stores analysis (evidence: `app.py`)
- Flask workflow → Text column selection: routes selection (evidence: `app.py`)
- Text column selection → Analysis state store: updates analysis (evidence: `app.py`)
- Flask workflow → Text preprocessing: preprocesses texts (evidence: `app.py`)
- Flask workflow → Sentiment analysis: analyzes ratings (evidence: `app.py`)
- Flask workflow → Feedback classifier: classifies feedback (evidence: `app.py`)
- Flask workflow → LDA modeling: trains topics (evidence: `app.py`)
- Flask workflow → Model evaluation: evaluates model (evidence: `app.py`)
- Flask workflow → Chart generation: generates charts (evidence: `app.py`)
- Flask workflow → Analysis configuration: loads settings (evidence: `app.py`)
- Flask workflow → Analysis state store: persists analyses (evidence: `app.py`)
- Flask workflow → Analysis results: renders report (evidence: `app.py`)
- Flask workflow → Spreadsheet export: builds workbook (evidence: `app.py`)
- Spreadsheet export → Analysis state store: reads analysis (evidence: `app.py`)
