# abhi9-git/amazonml_challenge_2026 architecture

> Architecture diagram of the GitHub repository abhi9-git/amazonml_challenge_2026, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abhi9-git/amazonml_challenge_2026
- Repository: https://github.com/abhi9-git/amazonml_challenge_2026

## Overview

This repository is a partial business-entity-resolution challenge solution. Its visible workflow normalizes train/test entity records, then generates candidate matches using token, character n-gram MinHash/LSH, and embedding-based search. A separate validator checks submission TSVs against test entities and warns when final matches fall outside the candidate set. The tree and excerpts do not show a final matching/scoring implementation, so that stage is represented only as an external artifact; the README provides no further workflow detail.

Main entry points: [`utils/validate_submission.py`](https://github.com/abhi9-git/amazonml_challenge_2026/blob/main/utils/validate_submission.py) (Submission checks), [`code/business_entity_resolution/src/blocking.py`](https://github.com/abhi9-git/amazonml_challenge_2026/blob/main/code/business_entity_resolution/src/blocking.py) (Candidate generation), [`code/business_entity_resolution/src/normalize.py`](https://github.com/abhi9-git/amazonml_challenge_2026/blob/main/code/business_entity_resolution/src/normalize.py) (Record normalization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_resolution["Entity Resolution"]
  node_normalize["Record normalization<br/>[normalize.py]"]
  node_blocking["Candidate generation<br/>[blocking.py]"]
end

subgraph group_validation["Submission Validation"]
  node_validator["Submission checks"]
end

subgraph group_data["Data Artifacts"]
  node_raw_data["Train/test sources"]
  node_normalized_data["Normalized records"]
  node_candidate_data["Candidate pairs"]
  node_match_data["Matching results"]
  node_test_data["Test source files"]
end

node_user(("Challenge participant"))
node_embedding_model["Sentence-transformer model"]
node_matcher["Final match producer"]
node_submission["Validated submission"]

node_user -->|"runs"| node_normalize
node_raw_data -->|"reads"| node_normalize
node_normalize -->|"writes"| node_normalized_data
node_user -->|"runs"| node_blocking
node_normalized_data -->|"reads"| node_blocking
node_blocking -->|"encodes names"| node_embedding_model
node_blocking -->|"writes"| node_candidate_data
node_candidate_data -.->|"candidate input"| node_matcher
node_matcher -->|"produces"| node_match_data
node_user -->|"runs"| node_validator
node_validator -->|"reads"| node_test_data
node_validator -->|"validates"| node_match_data
node_validator -->|"cross-checks"| node_candidate_data
node_validator -->|"reports status"| node_submission

click node_normalize "https://github.com/abhi9-git/amazonml_challenge_2026/blob/main/code/business_entity_resolution/src/normalize.py"
click node_blocking "https://github.com/abhi9-git/amazonml_challenge_2026/blob/main/code/business_entity_resolution/src/blocking.py"
click node_validator "https://github.com/abhi9-git/amazonml_challenge_2026/blob/main/utils/validate_submission.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_normalize,node_blocking toneBlue
class node_validator toneAmber
class node_raw_data,node_normalized_data,node_candidate_data,node_match_data,node_test_data toneMint
class node_user,node_embedding_model,node_matcher,node_submission toneIndigo
```

## Components

### Entity Resolution

- [Record normalization](https://github.com/abhi9-git/amazonml_challenge_2026/blob/main/code/business_entity_resolution/src/normalize.py): `code/business_entity_resolution/src/normalize.py`
- [Candidate generation](https://github.com/abhi9-git/amazonml_challenge_2026/blob/main/code/business_entity_resolution/src/blocking.py): `code/business_entity_resolution/src/blocking.py`

### Submission Validation

- [Submission checks](https://github.com/abhi9-git/amazonml_challenge_2026/blob/main/utils/validate_submission.py): `utils/validate_submission.py`

### Data Artifacts

- **Train/test sources**
- **Normalized records**
- **Candidate pairs**
- **Matching results**
- **Test source files**

### Other components

- **Challenge participant**
- **Sentence-transformer model**
- **Final match producer**
- **Validated submission**

## Connections

- Challenge participant → Record normalization: runs
- Train/test sources → Record normalization: reads
- Record normalization → Normalized records: writes
- Challenge participant → Candidate generation: runs
- Normalized records → Candidate generation: reads
- Candidate generation → Sentence-transformer model: encodes names
- Candidate generation → Candidate pairs: writes
- Candidate pairs → Final match producer: candidate input
- Final match producer → Matching results: produces
- Challenge participant → Submission checks: runs
- Submission checks → Test source files: reads
- Submission checks → Matching results: validates
- Submission checks → Candidate pairs: cross-checks
- Submission checks → Validated submission: reports status
