# sabin-chacko/get_address_from_docx architecture

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

- Interactive diagram: https://gitdiagram.com/sabin-chacko/get_address_from_docx
- Repository: https://github.com/sabin-chacko/get_address_from_docx

## Overview

This small Python script scans `data_folder` for DOCX files, reads each document’s paragraphs, sends each non-empty line (truncated to 260 characters) to Wit.ai for location extraction, and prints the extracted addresses per file. The graph reflects the calls shown in `main.py`; it does not infer additional behavior from the sample documents.

Main entry points: [`main.py`](https://github.com/sabin-chacko/get_address_from_docx/blob/master/main.py) (Script entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Address extraction"]
  node_entry["Script entry<br/>[main.py]"]
  node_file_scan["DOCX discovery<br/>[main.py]"]
  node_document_read["Paragraph extraction<br/>[main.py]"]
  node_line_extract["Line address lookup<br/>[main.py]"]
  node_print_results["Print results<br/>[main.py]"]
end

node_user(("User"))
node_wit["Wit.ai API"]

node_user -->|"runs"| node_entry
node_entry -->|"calls"| node_file_scan
node_entry -->|"calls"| node_print_results
node_file_scan -->|"selects files"| node_document_read
node_document_read -->|"looks up lines"| node_line_extract
node_line_extract -->|"queries"| node_wit
node_document_read -->|"returns addresses"| node_print_results

click node_entry "https://github.com/sabin-chacko/get_address_from_docx/blob/master/main.py"
click node_file_scan "https://github.com/sabin-chacko/get_address_from_docx/blob/master/main.py"
click node_document_read "https://github.com/sabin-chacko/get_address_from_docx/blob/master/main.py"
click node_line_extract "https://github.com/sabin-chacko/get_address_from_docx/blob/master/main.py"
click node_print_results "https://github.com/sabin-chacko/get_address_from_docx/blob/master/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_entry,node_file_scan,node_document_read,node_line_extract,node_print_results,node_user toneBlue
class node_wit toneMint
```

## Components

### Address extraction

- [Script entry](https://github.com/sabin-chacko/get_address_from_docx/blob/master/main.py): `main.py`
- [DOCX discovery](https://github.com/sabin-chacko/get_address_from_docx/blob/master/main.py): `main.py`
- [Paragraph extraction](https://github.com/sabin-chacko/get_address_from_docx/blob/master/main.py): `main.py`
- [Line address lookup](https://github.com/sabin-chacko/get_address_from_docx/blob/master/main.py): `main.py`
- [Print results](https://github.com/sabin-chacko/get_address_from_docx/blob/master/main.py): `main.py`

### Other components

- **User**
- **Wit.ai API**

## Connections

- User → Script entry: runs (evidence: `readme.md`)
- Script entry → DOCX discovery: calls (evidence: `main.py`)
- Script entry → Print results: calls (evidence: `main.py`)
- DOCX discovery → Paragraph extraction: selects files (evidence: `main.py`)
- Paragraph extraction → Line address lookup: looks up lines (evidence: `main.py`)
- Line address lookup → Wit.ai API: queries (evidence: `main.py`)
- Paragraph extraction → Print results: returns addresses (evidence: `main.py`)
