All Projects → slgero → receipt_parser

slgero / receipt_parser

Licence: MIT license
Allow parsing Russian receipts

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to receipt parser

Url To Pdf Api
Web page PDF/PNG rendering done right. Self-hosted service for rendering receipts, invoices, or any content.
Stars: ✭ 6,544 (+13823.4%)
Mutual labels:  receipt
Manta
🎉 Flexible invoicing desktop app with beautiful & customizable templates.
Stars: ✭ 5,160 (+10878.72%)
Mutual labels:  receipt
apple-receipt
Apple InAppPurchase Receipt - Models, Parser, Validator
Stars: ✭ 25 (-46.81%)
Mutual labels:  receipt
ReceiptQuickLook
A QuickLook plugin to inspect App Store receipts.
Stars: ✭ 35 (-25.53%)
Mutual labels:  receipt
payantNG-php
PHP Library for PayantNG
Stars: ✭ 14 (-70.21%)
Mutual labels:  receipt
veryfi-go
Go module for communicating with the Veryfi OCR API
Stars: ✭ 18 (-61.7%)
Mutual labels:  receipt
ESCPOS
A ESC/POS Printer Commands Helper
Stars: ✭ 26 (-44.68%)
Mutual labels:  receipt
DYFStoreKit
([Swift] https://github.com/chenxing640/DYFStore) A lightweight and easy-to-use iOS library for In-App Purchases (Objective-C). DYFStoreKit uses blocks and notifications to wrap StoreKit, provides receipt verification and transaction persistence and doesn't require any external dependencies.
Stars: ✭ 52 (+10.64%)
Mutual labels:  receipt
escpos-tools
Utilities to read ESC/POS print data
Stars: ✭ 145 (+208.51%)
Mutual labels:  receipt
receipt-parser-server
Receipt parser server written in python.
Stars: ✭ 64 (+36.17%)
Mutual labels:  receipt
chrome-raw-print
Chrome app to enable raw printing from a browser
Stars: ✭ 57 (+21.28%)
Mutual labels:  receipt
receipt-manager-webapp
Receipt parser webapplication written in javascript and python.
Stars: ✭ 37 (-21.28%)
Mutual labels:  receipt
esc pos bluetooth
ESC/POS (thermal, receipt) printing for Flutter & Dart (Android/iOS)
Stars: ✭ 177 (+276.6%)
Mutual labels:  receipt
receipt-manager-app
Receipt parser application written in dart.
Stars: ✭ 140 (+197.87%)
Mutual labels:  receipt
itunes receipt validator
Validate iTunes Transaction and Unified style receipts with local decoding and remote validation.
Stars: ✭ 38 (-19.15%)
Mutual labels:  receipt-validation


Version GitHub Workflow Status Upload Python Package CodeFactor GitHub

Receipt parser🧾

What is it?

receipt_parser - Python библиотека, помогающая распознавать товарную позицию из чеков. Для это задачи есть хороший сервис от Тинькофф, однако он не справляется с грязными данными, как на картинке выше. Изначально была задумка использовать нейронные сети, однако в процессе работы, понял, что на разметку нужно потратить много времени/денег, да и модель, основанная на правилах и словарях, даёт хороший результат.

Features

  • распознавание продукта;
  • определение категории товара;
  • распознавание брендов;
  • перевод англицизмов (хугарден --> hoegaarden)🍺

Where to get it

Исходный код в размещен на GitHub.

Библиотека размещёна на Python package index:

pip install receipt-parser

Если возникнет ошибка при установке пакета: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-izdic4qt/youtokentome/ То установите Cython и повторите попытку: pip install Cython

Usage

Для распознавания сейчас доступна только RuleBased модель.

На вход можно подавать как строку:

from receipt_parser import RuleBased

product_desription = 'Нап.пив.ХУГАР.ГРЕЙПФ.н/ф 0.47л'
rb = RuleBased()
rb.parse(product_desription)

output:

name product_norm brand_norm cat_norm
0 Нап.пив.ХУГАР.ГРЕЙПФ.н/ф 0.47л напиток, пиво hoegaarden Воды, соки, напитки

Так и pd.DataFrame (колонка с товарной позицией должна называться name):

from receipt_parser import RuleBased

rb = RuleBased()
rb.parse(df)

Также в библиотеке есть два вспомогательных класса:

  • Normalizer - для нормализации;
  • Finder - для поиска по словарям.

Future work

  • Добавить тесты
  • Дополнить словари и собранные датасеты
  • Поднять сервис
  • Перейти на нейронные сети...

Support the project 🤗

Буду рад, если вы:

  • найдёте баги;
  • сможете оптимизировать код;
  • дополните словари и датасеты;
  • поможете с разметкой.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].