# abhinaythurlapati/covid19 architecture

> Architecture diagram of the GitHub repository abhinaythurlapati/covid19, 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/abhinaythurlapati/covid19
- Repository: https://github.com/abhinaythurlapati/covid19

## Overview

This repository is a COVID-19 research-paper corpus processing and question-search application. Its main workflow loads paper JSON, extracts and cleans text, builds an inverted index, then uses QA tasks to form search terms, retrieve matching document IDs, and load the papers. Separate pipelines generate vocabulary and word counts; exploratory modules analyze corpus identifiers, vocabulary, and URLs. The graph reflects sampled calls and documented imports; several capabilities are represented by their exact source paths, but their internal behavior was not sampled.

Main entry points: [`covid19/QnAtask.py`](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/QnAtask.py) (QA search runner), [`covid19/pipelines/generate_inverted_index.py`](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/pipelines/generate_inverted_index.py) (Index generation), [`covid19/DataManagement/loaddata.py`](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/DataManagement/loaddata.py) (Paper JSON data), [`covid19/pipelines/generate_vocabulary.py`](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/pipelines/generate_vocabulary.py) (Vocabulary generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Corpus data"]
  node_paper_data[("Paper JSON data<br/>[loaddata.py]")]
  node_paper_model["Research paper<br/>[researchpaper.py]"]
  node_settings["Paths and settings<br/>[__init__.py]"]
  node_columns["Table columns<br/>[columns.py]"]
  node_json_keys["Index keys<br/>[json_keys.py]"]
  node_table_formats["Table formats<br/>[table_formats.py]"]
end

subgraph group_processing["Text processing"]
  node_preprocessing["Text preprocessing"]
  node_buffer["Batch buffer<br/>[buffer.py]"]
end

subgraph group_indexing["Corpus indexing"]
  node_index_pipeline["Index generation"]
  node_vocab_pipeline["Vocabulary generation"]
  node_wordcount_pipeline["Word-count generation"]
  node_inverted_index[("Inverted index<br/>[inverted_index.py]")]
end

subgraph group_search["Question search"]
  node_qa_tasks["QA task definitions<br/>[qa.py]"]
  node_task_base["Task interface<br/>[tasks.py]"]
  node_qa_runner["QA search runner<br/>[QnAtask.py]"]
  node_summary_tasks["Summary-table tasks<br/>[summary_tables.py]"]
end

subgraph group_analysis["Corpus analysis"]
  node_uid_analysis["UID analysis<br/>[analyze_uids.py]"]
  node_vocabulary_analysis["Vocabulary analysis"]
  node_url_analysis["URL matching<br/>[matching_urls.py]"]
end

node_researcher(("Researcher"))

node_paper_data -->|"reads paths"| node_settings
node_index_pipeline -->|"loads papers"| node_paper_data
node_index_pipeline -->|"extracts text"| node_paper_model
node_index_pipeline -->|"cleans text"| node_preprocessing
node_index_pipeline -->|"batches terms"| node_buffer
node_index_pipeline -->|"updates index"| node_inverted_index
node_vocab_pipeline -->|"loads papers"| node_paper_data
node_vocab_pipeline -->|"extracts sentences"| node_paper_model
node_vocab_pipeline -->|"normalizes words"| node_preprocessing
node_vocab_pipeline -->|"batches words"| node_buffer
node_wordcount_pipeline -->|"references loader"| node_paper_data
node_wordcount_pipeline -->|"references paper model"| node_paper_model
node_wordcount_pipeline -->|"references preprocessing"| node_preprocessing
node_wordcount_pipeline -->|"references buffer"| node_buffer
node_inverted_index -->|"uses index keys"| node_json_keys
node_qa_runner -->|"loads tasks"| node_qa_tasks
node_qa_tasks -->|"inherits interface"| node_task_base
node_qa_runner -->|"cleans questions"| node_preprocessing
node_qa_runner -->|"searches terms"| node_inverted_index
node_qa_runner -->|"loads matches"| node_paper_data
node_qa_runner -->|"wraps papers"| node_paper_model
node_researcher -.->|"runs search"| node_qa_runner
node_uid_analysis -->|"references settings"| node_settings
node_vocabulary_analysis -->|"references settings"| node_settings
node_url_analysis -->|"uses columns"| node_columns
node_table_formats -->|"uses columns"| node_columns

click node_paper_data "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/DataManagement/loaddata.py"
click node_paper_model "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/lib/objects/researchpaper.py"
click node_settings "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/__init__.py"
click node_columns "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/definitions/columns.py"
click node_json_keys "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/definitions/json_keys.py"
click node_table_formats "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/definitions/table_formats.py"
click node_preprocessing "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/DataManagement/datapreprocessing.py"
click node_buffer "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/lib/objects/buffer.py"
click node_index_pipeline "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/pipelines/generate_inverted_index.py"
click node_vocab_pipeline "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/pipelines/generate_vocabulary.py"
click node_wordcount_pipeline "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/pipelines/generate_words_count.py"
click node_inverted_index "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/lib/objects/inverted_index.py"
click node_qa_tasks "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/lib/objects/tasks/qa.py"
click node_task_base "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/lib/objects/tasks/tasks.py"
click node_qa_runner "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/QnAtask.py"
click node_summary_tasks "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/lib/objects/tasks/summary_tables.py"
click node_uid_analysis "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/exploratory_data_analysis/analyze_uids.py"
click node_vocabulary_analysis "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/exploratory_data_analysis/anaylze_global_vocabulary.py"
click node_url_analysis "https://github.com/abhinaythurlapati/covid19/blob/master/covid19/exploratory_data_analysis/matching_urls.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_paper_data,node_paper_model,node_settings,node_columns,node_json_keys,node_table_formats toneBlue
class node_preprocessing,node_buffer toneAmber
class node_index_pipeline,node_vocab_pipeline,node_wordcount_pipeline,node_inverted_index toneMint
class node_qa_tasks,node_task_base,node_qa_runner,node_summary_tasks toneRose
class node_uid_analysis,node_vocabulary_analysis,node_url_analysis,node_researcher toneIndigo
```

## Components

### Corpus data

- [Paper JSON data](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/DataManagement/loaddata.py): `covid19/DataManagement/loaddata.py`
- [Research paper](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/lib/objects/researchpaper.py): `covid19/lib/objects/researchpaper.py`
- [Paths and settings](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/__init__.py): `covid19/__init__.py`
- [Table columns](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/definitions/columns.py): `covid19/definitions/columns.py`
- [Index keys](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/definitions/json_keys.py): `covid19/definitions/json_keys.py`
- [Table formats](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/definitions/table_formats.py): `covid19/definitions/table_formats.py`

### Text processing

- [Text preprocessing](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/DataManagement/datapreprocessing.py): `covid19/DataManagement/datapreprocessing.py`
- [Batch buffer](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/lib/objects/buffer.py): `covid19/lib/objects/buffer.py`

### Corpus indexing

- [Index generation](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/pipelines/generate_inverted_index.py): `covid19/pipelines/generate_inverted_index.py`
- [Vocabulary generation](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/pipelines/generate_vocabulary.py): `covid19/pipelines/generate_vocabulary.py`
- [Word-count generation](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/pipelines/generate_words_count.py): `covid19/pipelines/generate_words_count.py`
- [Inverted index](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/lib/objects/inverted_index.py): `covid19/lib/objects/inverted_index.py`

### Question search

- [QA task definitions](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/lib/objects/tasks/qa.py): `covid19/lib/objects/tasks/qa.py`
- [Task interface](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/lib/objects/tasks/tasks.py): `covid19/lib/objects/tasks/tasks.py`
- [QA search runner](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/QnAtask.py): `covid19/QnAtask.py`
- [Summary-table tasks](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/lib/objects/tasks/summary_tables.py): `covid19/lib/objects/tasks/summary_tables.py`

### Corpus analysis

- [UID analysis](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/exploratory_data_analysis/analyze_uids.py): `covid19/exploratory_data_analysis/analyze_uids.py`
- [Vocabulary analysis](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/exploratory_data_analysis/anaylze_global_vocabulary.py): `covid19/exploratory_data_analysis/anaylze_global_vocabulary.py`
- [URL matching](https://github.com/abhinaythurlapati/covid19/blob/master/covid19/exploratory_data_analysis/matching_urls.py): `covid19/exploratory_data_analysis/matching_urls.py`

### Other components

- **Researcher**

## Connections

- Paper JSON data → Paths and settings: reads paths (evidence: `covid19/DataManagement/loaddata.py`)
- Index generation → Paper JSON data: loads papers (evidence: `covid19/pipelines/generate_inverted_index.py`)
- Index generation → Research paper: extracts text (evidence: `covid19/pipelines/generate_inverted_index.py`)
- Index generation → Text preprocessing: cleans text (evidence: `covid19/pipelines/generate_inverted_index.py`)
- Index generation → Batch buffer: batches terms (evidence: `covid19/pipelines/generate_inverted_index.py`)
- Index generation → Inverted index: updates index (evidence: `covid19/pipelines/generate_inverted_index.py`)
- Vocabulary generation → Paper JSON data: loads papers (evidence: `covid19/pipelines/generate_vocabulary.py`)
- Vocabulary generation → Research paper: extracts sentences (evidence: `covid19/pipelines/generate_vocabulary.py`)
- Vocabulary generation → Text preprocessing: normalizes words (evidence: `covid19/pipelines/generate_vocabulary.py`)
- Vocabulary generation → Batch buffer: batches words (evidence: `covid19/pipelines/generate_vocabulary.py`)
- Word-count generation → Paper JSON data: references loader (evidence: `covid19/pipelines/generate_words_count.py`)
- Word-count generation → Research paper: references paper model (evidence: `covid19/pipelines/generate_words_count.py`)
- Word-count generation → Text preprocessing: references preprocessing (evidence: `covid19/pipelines/generate_words_count.py`)
- Word-count generation → Batch buffer: references buffer (evidence: `covid19/pipelines/generate_words_count.py`)
- Inverted index → Index keys: uses index keys (evidence: `covid19/lib/objects/inverted_index.py`)
- QA search runner → QA task definitions: loads tasks (evidence: `covid19/QnAtask.py`)
- QA task definitions → Task interface: inherits interface (evidence: `covid19/lib/objects/tasks/qa.py`)
- QA search runner → Text preprocessing: cleans questions (evidence: `covid19/QnAtask.py`)
- QA search runner → Inverted index: searches terms (evidence: `covid19/QnAtask.py`)
- QA search runner → Paper JSON data: loads matches (evidence: `covid19/QnAtask.py`)
- QA search runner → Research paper: wraps papers (evidence: `covid19/QnAtask.py`)
- Researcher → QA search runner: runs search
- UID analysis → Paths and settings: references settings (evidence: `covid19/exploratory_data_analysis/analyze_uids.py`)
- Vocabulary analysis → Paths and settings: references settings (evidence: `covid19/exploratory_data_analysis/anaylze_global_vocabulary.py`)
- URL matching → Table columns: uses columns (evidence: `covid19/exploratory_data_analysis/matching_urls.py`)
- Table formats → Table columns: uses columns (evidence: `covid19/definitions/table_formats.py`)
