Research · Open kit v0.1

Arabic document OCR inspection kit

Six synthetic Arabic document pages, 169 boxed text regions and 22 field items for checking whether an OCR engine or vision-language model reads invoices, receipts, forms and letters correctly. Each item targets a known way Arabic document reading fails: Eastern Arabic digits and separators, Latin codes inside Arabic lines, right-to-left tables, Hijri dates, empty fields, a corrected value and a total that does not add up.

Bayanat Labs Research· · Synthetic pages · CC BY 4.0

An OCR engine can return every character on an Arabic invoice and still give you the wrong data. The errors are specific: ٣٨٫٧٥ loses its Arabic decimal separator and becomes ٣٨٧٥ (3875); the invoice number INV-0042 comes back reversed because it sits inside a right-to-left line; the totals column is paired with the label on the row above; a Hijri date is quietly turned into a Gregorian one; an empty phone-number field gets a number; a struck-through quantity is read as the current one. None of these shows up in a character error rate.

This kit is a short, repeatable test for those errors, and the place to start if you are looking for an Arabic OCR dataset to try a pipeline on before you collect your own. Bayanat Labs wrote six pages with Saudi conventions (riyal amounts, a 15% VAT line, Hijri and Gregorian dates, Eastern Arabic digits), marked every line and table cell with a box and its transcription in reading order, and wrote 22 field items, each with the value as printed, a normalized value and the regions that hold it. Two fields are empty on purpose, and one invoice has a printed total that does not match its own lines. Use it to compare OCR engines or model versions, to check a document pipeline before launch, and to agree a page-record format with your data supplier before a custom collection.

بالعربية: مجموعة مجانية ومفتوحة لفحص قدرة أنظمة التعرّف الضوئي على الحروف (OCR) ونماذج الرؤية واللغة على قراءة المستندات التجارية العربية: ست صفحات اصطناعية (فاتورتان ثنائيتا اللغة من القالب نفسه، إحداهما ضبابية وإجماليها المطبوع لا يتّسق مع بنودها بعد الخصم والضريبة، وإيصال شراء بالأرقام العربية المشرقية، ونموذج طلب صيانة فيه مربعات اختيار وحقل فارغ وقيمة مشطوبة صُحّحت، وسند تسليم فيه جدول ثنائي اللغة يُقرأ من اليمين إلى اليسار، وخطاب رسمي عليه ختم)، فيها 169 منطقة نصية بإحداثياتها ونصها كما طُبع بترتيب القراءة، و52 خلية جدول، و22 حقلًا للاستخراج، منها حقلان فارغان، ولكل حقل القيمة كما طُبعت والقيمة الموحّدة والمناطق التي تثبتها. وتضم المجموعة دليل فحص فيه 18 رمزًا للأخطاء، ومخططًا لسجل الصفحة يحدد نوع المصدر (حقيقي أو مجهّل أو اصطناعي) والجهة المُصدِرة والقالب ومجموعة التقسيم وطريقة الالتقاط، ويفصل كل حق من حقوق الاستخدام عن غيره. الصفحات أعدّتها Bayanat Labs، والمنشآت والأسماء والأرقام فيها متخيَّلة، والفاتورتان والإيصال نماذج توضيحية وليست مستندات ضريبية. لبيانات المستندات المخصصة، راجع مجموعات بيانات المستندات العربية.

What is in the kit

FileContents
pages/D01.png to D06.pngSix 1000 × 1400 PNG pages written by Bayanat Labs: two bilingual invoices from one template, a shop receipt, a maintenance request form, a delivery note and a formal letter. Fictional businesses and placeholder names; the invoice and receipt are marked as specimens.
fields.jsonl22 field items with an Arabic question and an English gloss, the value as printed, a normalized value, the evidence region IDs and the error codes each item can catch. Two fields (a mobile number and a receiver name) are empty, so the expected value is null.
annotations.jsonlOne record per page: 169 text regions with a box, the text as printed in logical order, a reading-order number, a script tag and a digit tag (22 regions use Eastern Arabic digits); 52 table cells with row and column; 8 non-text regions (three checkboxes, four empty lines, one stamp); the fields, validation checks, source type, issuer group, template, split group, capture and rights.
rubric.mdA six-step protocol, a default policy that keeps the printed text and the normalized value apart, 18 error codes for reading, layout, fields and records, the evidence and empty-field rules, and the record checks to agree with a supplier.
schema.jsonJSON Schema (draft 2020-12) for one annotated page: genuine, de-identified or synthetic source, issuer group, template, split group, capture method and degradation, regions with reading order and table cells, fields with two values each, validation checks and a separate field for each right.
README.md, SHA256SUMS.txt, LICENSE.txtNotes, checksums for every file, and the CC BY 4.0 license.
Synthetic bilingual invoice from Example Trading Est. (مؤسسة المثال التجارية), marked as a specimen and not a tax invoice: invoice number INV-0042, Gregorian and Hijri dates, a three-row right-to-left item table, discount, 15% VAT and a total of 747.50 riyals.

D01, invoice. Arabic and English headers, a Latin invoice number inside an Arabic line, two calendars, a right-to-left item table and a totals block whose labels sit far from their values. D06 uses the same template, blurred, and its printed total is 10 riyals too high.

Six pages and what each tests

PageWhat is on itField items and what they test
D01 invoiceSupplier and customer names, رقم الفاتورة: INV-0042, Gregorian and Hijri dates, three item rows, discount, VAT and total, Western digitsF01 invoice number (Latin inside Arabic); F02 and F03 the two dates (no silent conversion); F04 a line total (right row and column); F05 the total (the bottom row of the totals block, not the subtotal)
D02 receiptFour items and prices in Eastern Arabic digits with the Arabic decimal separator ٫, total, cash and changeF06 the total (digits and separator); F07 the price of the dates (row pairing); F08 the change
D03 formA maintenance request with filled entries in a second colour, an empty mobile-number line, three checkboxes, ٣ struck through and ٢ written beside it, a Hijri dateF09 the name (dots); F10 the mobile number, which is empty; F11 the ticked request type; F12 the device count after the correction; F13 the Hijri date, kept Hijri
D04 delivery noteA five-column right-to-left table with Arabic and English item names, the date 16/11/2026 day first, a Hijri date with the month name, empty receiver and signature linesF14 the date (day and month order); F15 and F16 table cells by row; F17 the receiver name, which is empty
D05 letterA two-script letterhead, the reference ٤٥/ب/١٤٤٨, a three-line body with a contract end date and a reply deadline, a stamp over the signature blockF18 the reference number (logical order with slashes); F19 the contract end date; F20 the reply deadline in days
D06 invoice, degradedThe D01 template with other values, rendered with blur, lower contrast and a tinted background; lines add up to 400.00, VAT is 60.00, the printed total is 470.00F21 the printed total, plus the validation check that it should be 460.00; F22 the invoice number on a blurred page

How to inspect an OCR engine or model with it

  1. Write the reading policy first. Decide how printed text and normalized values are compared: digits, separators, letter forms and date format. rubric.md has a default that keeps the text as printed and the normalized value apart; change it before you run, not after.
  2. Test reading, layout and fields separately. First ask for all the text on each page in reading order and compare it with the transcriptions. Then ask for the three tables as rows and columns. Then ask the 22 field items one at a time, for the value as printed and a normalized value.
  3. Ask whether the totals add up. D01 and D02 do; D06 does not. A pipeline that extracts 470.00 without a flag has a validation gap, even if every character is right.
  4. Check where each value came from. If the engine returns a box, compare it with the item's evidence regions (intersection over union of 0.5 or more). A right value from the wrong cell is luck.
  5. Report by error code, not one score. An engine that fails every Eastern Arabic amount needs different work from one that fills empty fields. Keep the failing outputs and run the same items after a fix.

Twenty-two items are a smoke test, not a benchmark. The pages are clean renders in one typeface; real scans, phone photos, faxes, stamps and handwriting are harder. Before launch, add your own pages in the same format. Our 10-point Arabic OCR dataset audit covers what to check in the data itself, and which metric to use at each level.

Synthetic maintenance request form in Arabic: the name filled in, an empty mobile-number line, the city Jeddah, three checkboxes with maintenance ticked, the device count 3 struck through and 2 written beside it, and a Hijri visit date.

D03, form. The mobile-number line is empty (F10 expects null), only one box is ticked (F11), and the device count was corrected from ٣ to ٢ (F12).

A worked example: the field that is not there

F10 asks ما رقم جوال العميل؟ ("What is the customer's mobile number?"). On D03 the line beside رقم الجوال: is empty. The failure to look for is a plausible Saudi mobile number in the output; nothing on the page supports one. The item is recorded as:

{"field_id": "F10", "page_id": "D03", "key": "mobile_number",
 "question_ar": "ما رقم جوال العميل؟",
 "value_as_printed": null, "value_normalized": null, "empty": true,
 "evidence_regions": ["D03-N1", "D03-R6"],
 "tests": ["FLD_HALLUC"]}

F17 (the receiver name on the delivery note) is the same case. F12 is different: the page holds two values, and the struck-through one is not the answer. F21 is different again: the printed value is the right extraction, and the error is accepting it without a validation flag. Keeping these cases apart is what tells you whether a pipeline fails at reading, at extraction or at checking.

Agree the page record before you collect

The schema gives every page the fields a buyer needs to trust a document dataset later. source.type is genuine, de-identified or synthetic, per page, and de_identification records how a page was changed (masked boxes or replacement values in the same format) and which fields that touched; every page in this kit is synthetic. issuer_group and template_id let template diversity be reported separately from page count. split_group keeps an issuer's pages on one side of a train/test split: here D01, D05 and D06 share an issuer and D01 and D06 share a template, so a random page split would leak. capture records flatbed scan, phone photo, fax or render, and the degradations. Each field keeps value_as_printed and value_normalized with evidence regions, and rights has one field each for model training, evaluation, redistribution and public display, each granted, not_granted or not_stated. A right that is not written down is not_stated, never assumed.

How it fits with the other open Arabic document sets

Bayanat Labs publishes three other open document resources, each for a different job. The Synthetic Saudi E-Invoices, Receipts and Bilingual Forms release has 25,000 generated records for testing a pipeline at volume. Arabic Form Field Extraction has 1,152 synthetic form images and 9,216 question rows for answers linked to field boxes. The Arabic Document Atlas has 200,286 images, mostly pages from older books, for OCR research. This kit is the small one: six pages you can read in full, built so that each item fails for a known reason. None of the four is a sample of custom delivery.

What this kit is not

  • Not scans. The six pages are rendered from HTML. D06 adds blur and low contrast, but nothing here stands in for real capture. Passing says little about your documents; failing is a clear signal.
  • Not a sample of a Bayanat dataset. Bayanat Documents is built to order. Bayanat Labs wrote these pages for this kit; the businesses, names and numbers are fictional, and the two invoices and the receipt are not valid tax documents.
  • Not a benchmark. It has no scores and ranks no engine or model. Twenty-two items show where a pipeline fails; they do not measure how often.
  • Not every document or script style. v0.1 has no handwriting (form entries are typed in a second colour), one typeface, Saudi conventions and single pages. Contracts, multi-page files, Maghrebi conventions and Persian digits are not covered.

Build Arabic document data with Bayanat Documents

Bayanat Documents builds a custom version of this kit from documents you can authorize, to your scope:

  • Labels beyond transcription. Choose transcription, coordinates, reading order, layout, normalized fields, evidence locations and validation checks, matched to the model you are building (Bayanat Documents label types).
  • Sources kept identifiable. Genuine, de-identified and synthetic documents remain distinguishable, and template diversity is reported separately from page count (Saudi and UAE procurement checks).
  • Tests on unfamiliar documents. Evaluation splits can separate issuers, templates, sources and writers, so you measure performance on documents the model has not seen (document scope and acceptance).
  • Permissions first. Source permissions are defined with you before collection, and use and delivery rights are set in the agreement (use rights).
  • Arabic readers from a vetted team. A team of 50,000+ expert annotators, including vetted native speakers and linguists who pass dialect and domain screening (Arabic OCR annotation services).
  • A pilot first. A fixed-scope pilot with gold-standard QA and a quality report, usually within two weeks, with in-region hosting by default and private-cloud or on-premises options (start a pilot).

Cite or reuse

Free to use, adapt and redistribute under CC BY 4.0 with attribution:

Bayanat Labs (2026). Arabic Document OCR Inspection Kit v0.1. https://www.bayanatlabs.com/research/arabic-document-ocr-kit

Found an error, or want pages for another document type, region or script style? Write to hello@bayanatlabs.com.

Scope an Arabic document dataset with Bayanat Documents

Tell us which documents your model reads, the fields and labels you need, the sources you can authorize and how the data will be used. We come back with a fixed-scope pilot plan and the permissions to agree.

Scope a Bayanat Documents dataset
Bayanat Labs © 2026 Bayanat Labs · Riyadh