How invincibleagam/amazon-ml-challenge works
This repository implements a business-record entity-resolution pipeline: it finds Source 2 and Source 3 records matching each Source 1 business, prioritizing precision under macro F0.5. The documented workflow normalizes records, retrieves candidates, prunes them, then refines pair scores through similarity, difference, and collective-context models before decoding matches. Shared feature and model helpers support the stages; optional text-model scores can enrich Stage 4. The graph follows documented stages and visible imports; unsampled implementation details are not inferred beyond those relationships.
Main entry points: preprocess.py Normalize records · stage1.py Stage 1 pruning · stage2.py Stage 2 matching · stage3.py Stage 3 corrections
Components 17
Input preparation
- Normalize records
code/business_entity_resolution/src/preprocess.py - Text normalization
code/business_entity_resolution/src/normalize.py - Indic transliteration
code/business_entity_resolution/src/translit.py - Shared data access
code/business_entity_resolution/src/common.py
Candidate matching
- Candidate blocking
code/business_entity_resolution/src/blocking.py - Stage 1 pruning
code/business_entity_resolution/src/stage1.py - Pair features
code/business_entity_resolution/src/features.py - Boosted models
code/business_entity_resolution/src/models.py
Score refinement
- Stage 2 matching
code/business_entity_resolution/src/stage2.py - Stage 3 corrections
code/business_entity_resolution/src/stage3.py - Word-swap analysis
code/business_entity_resolution/src/swap.py - Stage 4 context
code/business_entity_resolution/src/stage4.py - Text-model scores
code/business_entity_resolution/src/text_model.py
Decision and output
- Match decoding
code/business_entity_resolution/src/stage2.py - Submission output
code/business_entity_resolution/src/make_submission.py - Macro F0.5
code/business_entity_resolution/src/evaluate.py
Other components
- Challenge records
Connections 18
- Challenge records → Normalize records: reads records
README.md - Normalize records → Text normalization: normalizes with
code/business_entity_resolution/src/preprocess.py - Normalize records → Indic transliteration: transliterates with
code/business_entity_resolution/src/preprocess.py - Normalize records → Shared data access: reads through
code/business_entity_resolution/src/preprocess.py - Normalize records → Candidate blocking: provides normalized records
README.md - Candidate blocking → Stage 1 pruning: generates candidates for
README.md - Stage 1 pruning → Pair features: builds pruning features
code/business_entity_resolution/src/stage1.py - Stage 1 pruning → Boosted models: fits and scores with
code/business_entity_resolution/src/stage1.py - Stage 1 pruning → Stage 2 matching: passes pruned pairs
README.md - Stage 2 matching → Pair features: builds pair features
code/business_entity_resolution/src/stage2.py - Stage 2 matching → Boosted models: fits and scores with
code/business_entity_resolution/src/stage2.py - Stage 2 matching → Stage 3 corrections: passes pair scores
README.md - Stage 3 corrections → Word-swap analysis: describes word differences
code/business_entity_resolution/src/stage3.py - Stage 3 corrections → Stage 4 context: passes uncertain pairs
README.md - Stage 4 context → Text-model scores: uses optional scores
code/business_entity_resolution/src/stage4.py - Stage 4 context → Match decoding: refines candidate scores
README.md - Match decoding → Macro F0.5: tunes against
code/business_entity_resolution/src/stage2.py - Match decoding → Submission output: writes matches for
README.md