[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"readme:receipt-ocr":3},"\u003Ch1>Receipt OCR Engine\u003C\u002Fh1>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbhimrazy\u002Freceipt-ocr\u002Factions\u002Fworkflows\u002Freceipt-ocr.yml\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fbhimrazy\u002Freceipt-ocr\u002Factions\u002Fworkflows\u002Freceipt-ocr.yml\u002Fbadge.svg\" alt=\"Build Status\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Fbhimrazy\u002Freceipt-ocr\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Fbhimrazy\u002Freceipt-ocr\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg\" alt=\"Code Coverage\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbhimrazy\u002Freceipt-ocr\u002Fblob\u002Fmain\u002FLICENSE\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fbhimrazy\u002Freceipt-ocr\" alt=\"License\" \u002F>\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>An efficient \u003Cstrong>OCR\u003C\u002Fstrong> engine for receipt image processing.\u003C\u002Fp>\n\u003Cp>This repository provides a comprehensive solution for \u003Cstrong>Optical Character Recognition (OCR)\u003C\u002Fstrong> on receipt images, featuring both a dedicated Tesseract OCR module and a general receipt processing package using LLMs.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fbhimrazy\u002Freceipt-ocr\u002Fassets\u002F46085301\u002F305df68d-50d8-41d4-81d0-9324966fb6c9\" alt=\"image\" \u002F>\u003C\u002Fp>\n\u003Ch2>Star History\u003C\u002Fh2>\n\u003Ca href=\"https:\u002F\u002Fstar-history.com\u002F#bhimrazy\u002Freceipt-ocr&amp;type=Date\" rel=\"nofollow ugc noopener\">\n \u003Cpicture>\n   \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=bhimrazy\u002Freceipt-ocr&amp;type=Date&amp;theme=dark\">\u003C\u002Fsource>\n   \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=bhimrazy\u002Freceipt-ocr&amp;type=Date&amp;theme=dark\">\u003C\u002Fsource>\n   \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=bhimrazy\u002Freceipt-ocr&amp;type=Date\" \u002F>\n \u003C\u002Fpicture>\n\u003C\u002Fa>\u003Ch2>Table of Contents\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"#receipt-ocr-engine\" rel=\"nofollow ugc noopener\">Receipt OCR Engine\u003C\u002Fa>\u003Cul>\n\u003Cli>\u003Ca href=\"#star-history\" rel=\"nofollow ugc noopener\">Star History\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#table-of-contents\" rel=\"nofollow ugc noopener\">Table of Contents\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#quick-start\" rel=\"nofollow ugc noopener\">Quick Start\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#project-structure\" rel=\"nofollow ugc noopener\">Project Structure\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#prerequisites\" rel=\"nofollow ugc noopener\">Prerequisites\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#how-to-use-receipt-ocr\" rel=\"nofollow ugc noopener\">How to Use Receipt OCR\u003C\u002Fa>\u003Cul>\n\u003Cli>\u003Ca href=\"#receipt-ocr-module-structured-data-extraction\" rel=\"nofollow ugc noopener\">Receipt OCR Module (Structured Data Extraction)\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#tesseract-ocr-module-raw-text-extraction\" rel=\"nofollow ugc noopener\">Tesseract OCR Module (Raw Text Extraction)\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#troubleshooting\" rel=\"nofollow ugc noopener\">Troubleshooting\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#contributing\" rel=\"nofollow ugc noopener\">Contributing\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#linkedin-post\" rel=\"nofollow ugc noopener\">LinkedIn Post\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#license\" rel=\"nofollow ugc noopener\">License\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Quick Start\u003C\u002Fh2>\n\u003Cp>\u003Cstrong>Extract structured data from a receipt in 3 steps:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cp>\u003Cstrong>Install the package:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">pip install receipt-ocr\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fli>\n\u003Cli>\u003Cp>\u003Cstrong>Set up your API key:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">export OPENAI_API_KEY=\"your_openai_api_key_here\"\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fli>\n\u003Cli>\u003Cp>\u003Cstrong>Process a receipt:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">receipt-ocr images\u002Freceipt.jpg\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>For Docker or advanced usage, see \u003Ca href=\"#how-to-use-receipt-ocr\" rel=\"nofollow ugc noopener\">How to Use Receipt OCR\u003C\u002Fa> below.\u003C\u002Fp>\n\u003Ch2>Project Structure\u003C\u002Fh2>\n\u003Cp>The project is organized into two main modules:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>\u003Ccode>src\u002Freceipt_ocr\u002F\u003C\u002Fcode>\u003C\u002Fstrong>: A new package for abstracting general receipt processing logic, including CLI, programmatic API, and a production \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbhimrazy\u002Freceipt-ocr\u002Fblob\u002FHEAD\u002Fapp\u002F\" rel=\"nofollow ugc noopener\">FastAPI web service\u003C\u002Fa> for LLM-powered structured data extraction from receipts.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>src\u002Ftesseract_ocr\u002F\u003C\u002Fcode>\u003C\u002Fstrong>: Contains the Tesseract OCR FastAPI application, CLI, utility functions, and Docker setup for performing raw OCR text extraction from images.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Prerequisites\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Python 3.x\u003C\u002Fli>\n\u003Cli>Docker &amp; Docker-compose(for running as a service)\u003C\u002Fli>\n\u003Cli>Tesseract OCR (for local Tesseract CLI usage) - \u003Ca href=\"https:\u002F\u002Ftesseract-ocr.github.io\u002Ftessdoc\u002FInstallation.html\" rel=\"nofollow ugc noopener\">Installation Guide\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>How to Use Receipt OCR\u003C\u002Fh2>\n\u003Ch3>Receipt OCR Module (Structured Data Extraction)\u003C\u002Fh3>\n\u003Cp>This module provides a higher-level abstraction for processing receipts, leveraging LLMs for parsing and extraction.\u003C\u002Fp>\n\u003Cp>To use the \u003Ccode>receipt-ocr\u003C\u002Fcode> CLI, first install it:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">pip install receipt-ocr\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Col>\n\u003Cli>\u003Cp>\u003Cstrong>Configure Environment Variables:\u003C\u002Fstrong>\nCreate a \u003Ccode>.env\u003C\u002Fcode> file in the project root or set environment variables directly. This module supports multiple LLM providers.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Supported Providers:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cp>\u003Cstrong>OpenAI:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>Get API key from: \u003Ca href=\"https:\u002F\u002Fplatform.openai.com\u002Fapi-keys\" rel=\"nofollow ugc noopener\">https:\u002F\u002Fplatform.openai.com\u002Fapi-keys\u003C\u002Fa>\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Cpre>\u003Ccode>OPENAI_API_KEY=\"your_openai_api_key_here\"\nOPENAI_MODEL=\"gpt-4o\"\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fli>\n\u003Cli>\u003Cp>\u003Cstrong>Gemini (Google):\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>Get API key from: \u003Ca href=\"https:\u002F\u002Faistudio.google.com\u002Fapp\u002Fapikey\" rel=\"nofollow ugc noopener\">https:\u002F\u002Faistudio.google.com\u002Fapp\u002Fapikey\u003C\u002Fa>\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Cpre>\u003Ccode>OPENAI_API_KEY=\"your_gemini_api_key_here\"\nOPENAI_BASE_URL=\"https:\u002F\u002Fgenerativelanguage.googleapis.com\u002Fv1beta\u002Fopenai\u002F\"\nOPE\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fli>\n\u003C\u002Fol>\n",1788219550152]