# syed-waheed/web-scraping-nlp-content-analyzer architecture

> Architecture diagram of the GitHub repository syed-waheed/web-scraping-nlp-content-analyzer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/syed-waheed/web-scraping-nlp-content-analyzer
- Repository: https://github.com/syed-waheed/web-scraping-nlp-content-analyzer

## Overview

This is a single-script content analytics pipeline: URLs are scraped into article text, analyzed for sentiment and readability metrics, then exported as a spreadsheet and PDF analytics report. The implementation is concentrated in main.py, so nodes distinguish its domain stages rather than implying separate services. The excerpts show scraping, article-file reads and writes, metric computation, and report generation; the README documents the end-to-end outputs and chart capabilities.

Main entry points: [`main.py`](https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py) (Web scraper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Content collection"]
  node_url_input["Article URLs"]
  node_scraper["Web scraper<br/>[main.py]"]
  node_article_archive[("Article text archive<br/>[main.py]")]
end

subgraph group_analysis["Text analytics"]
  node_text_analysis["Text analysis<br/>[main.py]"]
  node_lexicons["Sentiment lexicons<br/>[main.py]"]
  node_metric_computation["Metric computation<br/>[main.py]"]
end

subgraph group_reporting["Analytics outputs"]
  node_spreadsheet_export["Excel dataset export<br/>[main.py]"]
  node_visual_analytics["Visual analytics<br/>[main.py]"]
  node_pdf_report["PDF report<br/>[main.py]"]
end

node_operator(("Pipeline operator"))
node_web_pages["Web articles"]

node_operator -->|"provides"| node_url_input
node_url_input -->|"supplies URLs"| node_scraper
node_scraper -->|"fetches pages"| node_web_pages
node_scraper -->|"writes article text"| node_article_archive
node_article_archive -->|"provides text"| node_text_analysis
node_text_analysis -->|"loads word lists"| node_lexicons
node_text_analysis -->|"provides analyzed text"| node_metric_computation
node_metric_computation -->|"exports metrics"| node_spreadsheet_export
node_metric_computation -->|"summarizes metrics"| node_visual_analytics
node_visual_analytics -->|"adds charts"| node_pdf_report

click node_scraper "https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py"
click node_article_archive "https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py"
click node_text_analysis "https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py"
click node_lexicons "https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py"
click node_metric_computation "https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py"
click node_spreadsheet_export "https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py"
click node_visual_analytics "https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py"
click node_pdf_report "https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.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_url_input,node_scraper,node_article_archive toneBlue
class node_text_analysis,node_lexicons,node_metric_computation toneAmber
class node_spreadsheet_export,node_visual_analytics,node_pdf_report toneMint
class node_operator,node_web_pages toneIndigo
```

## Components

### Content collection

- **Article URLs**
- [Web scraper](https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py): `main.py`
- [Article text archive](https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py): `main.py`

### Text analytics

- [Text analysis](https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py): `main.py`
- [Sentiment lexicons](https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py): `main.py`
- [Metric computation](https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py): `main.py`

### Analytics outputs

- [Excel dataset export](https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py): `main.py`
- [Visual analytics](https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py): `main.py`
- [PDF report](https://github.com/syed-waheed/web-scraping-nlp-content-analyzer/blob/main/main.py): `main.py`

### Other components

- **Pipeline operator**
- **Web articles**

## Connections

- Pipeline operator → Article URLs: provides (evidence: `README.md`)
- Article URLs → Web scraper: supplies URLs (evidence: `README.md`)
- Web scraper → Web articles: fetches pages (evidence: `main.py`)
- Web scraper → Article text archive: writes article text (evidence: `main.py`)
- Article text archive → Text analysis: provides text (evidence: `main.py`)
- Text analysis → Sentiment lexicons: loads word lists (evidence: `main.py`)
- Text analysis → Metric computation: provides analyzed text (evidence: `main.py`)
- Metric computation → Excel dataset export: exports metrics (evidence: `main.py`)
- Metric computation → Visual analytics: summarizes metrics (evidence: `main.py`)
- Visual analytics → PDF report: adds charts (evidence: `main.py`)
