How bhardwajtanuj/insurance-document-parser works
This is a command-line insurance document extraction engine. Its main workflow loads a PDF or text file, preprocesses the text, selects insurer patterns, extracts fields with regex and fuzzy matching, scores confidence, and prints results. The graph follows the sampled runtime calls; the README describes insurer pattern modules, but those files are not present in the supplied tree, so their implementation is not represented.
Main entry points: main.py CLI Workflow · extractor.py Field Extractor · loader.py Document Loader · preprocessor.py Text Preprocessor
Components 11
Input Handling
- CLI Workflow
main.py - Document Loader
loader.py - OCR Engine
- Text Preprocessor
preprocessor.py
Extraction
- Pattern Selection
main.py - Field Extractor
extractor.py - Regex Matching
extractor.py - Fuzzy Matching
extractor.py - Confidence Scoring
scorer.py
Results
- Result Formatting
main.py
Other components
- Document User
Connections 11
- Document User → CLI Workflow: provides document
main.py - CLI Workflow → Document Loader: loads document
main.py - Document Loader → OCR Engine: uses OCR
loader.py - CLI Workflow → Text Preprocessor: cleans text
main.py - CLI Workflow → Pattern Selection: selects patterns
main.py - CLI Workflow → Field Extractor: invokes extraction
main.py - Field Extractor → Regex Matching: tries first
extractor.py - Field Extractor → Fuzzy Matching: falls back
extractor.py - Field Extractor → Confidence Scoring: calculates confidence
extractor.py - CLI Workflow → Result Formatting: prints results
main.py - Field Extractor → Result Formatting: returns results
main.py