# praveengk09-rgb/government-scheme-information-extraction-using-nlp architecture

> Architecture diagram of the GitHub repository praveengk09-rgb/government-scheme-information-extraction-using-nlp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp
- Repository: https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp

## Overview

This is a Streamlit dashboard for turning government-scheme PDFs, web pages, or demo text into structured scheme information. The main workflow is document input, text extraction, field extraction, then viewing or exporting results. The dashboard also presents text metrics and a language badge. Source excerpts show the application’s calls into the scraper and extractor; internal parser details and some UI wiring are only partially shown, so the graph keeps those responsibilities at module level.

Main entry points: [`app.py`](https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/app.py) (PDF, URL, Demo Input), [`scraper_pdf.py`](https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/scraper_pdf.py) (PDF & Web Text Extraction), [`extractor.py`](https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/extractor.py) (Nine-Field Extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Dashboard"]
  node_dashboard["Streamlit Dashboard<br/>[app.py]"]
  node_input_modes["PDF, URL, Demo Input<br/>[app.py]"]
  node_results["Scheme Cards &amp; JSON<br/>[app.py]"]
  node_analytics["Text Analytics<br/>[app.py]"]
  node_json_export["JSON Export<br/>[app.py]"]
end

subgraph group_ingestion["Text Ingestion"]
  node_text_ingestion["PDF &amp; Web Text Extraction<br/>[scraper_pdf.py]"]
end

subgraph group_analysis["Scheme Analysis"]
  node_scheme_extraction["Nine-Field Extraction<br/>[extractor.py]"]
end

node_user(("User"))
node_source_document["Scheme Document"]
node_website["Scheme Website"]

node_user -->|"uses"| node_dashboard
node_user -->|"provides input"| node_input_modes
node_input_modes -->|"extracts text"| node_text_ingestion
node_website -->|"provides page"| node_text_ingestion
node_input_modes -->|"submits demo text"| node_scheme_extraction
node_text_ingestion -->|"passes text"| node_scheme_extraction
node_scheme_extraction -->|"returns fields"| node_results
node_results -->|"exports JSON"| node_json_export
node_dashboard -->|"shows metrics"| node_analytics

click node_dashboard "https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/app.py"
click node_input_modes "https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/app.py"
click node_results "https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/app.py"
click node_analytics "https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/app.py"
click node_json_export "https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/app.py"
click node_text_ingestion "https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/scraper_pdf.py"
click node_scheme_extraction "https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/extractor.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_dashboard,node_input_modes,node_results,node_analytics,node_json_export,node_user toneBlue
class node_text_ingestion toneAmber
class node_scheme_extraction toneMint
class node_source_document,node_website toneIndigo
```

## Components

### Dashboard

- [Streamlit Dashboard](https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/app.py): `app.py`
- [PDF, URL, Demo Input](https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/app.py): `app.py`
- [Scheme Cards & JSON](https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/app.py): `app.py`
- [Text Analytics](https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/app.py): `app.py`
- [JSON Export](https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/app.py): `app.py`

### Text Ingestion

- [PDF & Web Text Extraction](https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/scraper_pdf.py): `scraper_pdf.py`

### Scheme Analysis

- [Nine-Field Extraction](https://github.com/praveengk09-rgb/government-scheme-information-extraction-using-nlp/blob/main/extractor.py): `extractor.py`

### Other components

- **User**
- **Scheme Document**
- **Scheme Website**

## Connections

- User → Streamlit Dashboard: uses (evidence: `README.md`)
- User → PDF, URL, Demo Input: provides input (evidence: `README.md`)
- PDF, URL, Demo Input → PDF & Web Text Extraction: extracts text (evidence: `app.py`)
- Scheme Website → PDF & Web Text Extraction: provides page (evidence: `scraper_pdf.py`)
- PDF, URL, Demo Input → Nine-Field Extraction: submits demo text (evidence: `app.py`)
- PDF & Web Text Extraction → Nine-Field Extraction: passes text (evidence: `app.py`)
- Nine-Field Extraction → Scheme Cards & JSON: returns fields (evidence: `app.py`)
- Scheme Cards & JSON → JSON Export: exports JSON (evidence: `README.md`)
- Streamlit Dashboard → Text Analytics: shows metrics (evidence: `README.md`)
