Service · Documents & OCR

Arabic OCR annotation for document AI

Line, word, field and table ground truth for printed and handwritten Arabic documents, built on transcription rules agreed up front, checked against gold pages and hosted in-region by default.

Bayanat Labs provides Arabic OCR annotation for document AI teams: ground truth for printed and handwritten Arabic, with line, word and character geometry, exact transcriptions, right-to-left and mixed-direction reading order, key-value fields, tables and PII boxes. Native annotators follow transcription rules agreed before the first page, and every batch is checked against gold pages from your own documents. Data stays in-region by default, and you start with a fixed-scope pilot, usually within two weeks.

What our Arabic OCR annotation covers

Lines and words

Line polygons and word boxes with logical-order transcriptions, for PDFs, scans and photos. A word box spans every piece: وزارة ("ministry") is five unconnected letters.

Characters and diacritics

Character boxes where needed, with harakat and shadda as printed. Initial بـ تـ ثـ نـ يـ differ only in their dots, so dot errors are scored separately.

Fields and key-value pairs

Keys, values and explicit links on IDs, invoices, statements and forms, plus normalized Hijri and Gregorian dates, amounts and ID numbers.

Tables

Cell boxes, row and column indices, merged cells and headers, ordered right to left. Structure is scored separately from cell text.

Layout and reading order

Headers, columns, stamps, signatures and handwriting on printed forms, with reading order across RTL and bilingual layouts.

Redaction

Boxes and categories for names, national ID and Iqama numbers, phones, IBANs and addresses, for masked copies or a redaction model.

Why Arabic OCR is hard, and the rule each problem needs

KITAB-Bench (Heakl et al., 2025), an 8,809-sample benchmark across 9 domains, lists complex fonts, numerals, word elongation and table structure among the open problems of Arabic OCR. Script-level traps need written rules:

ProblemExampleGround-truth rule
Dots carry meaningخبر "news" vs حبر "ink"Mark a character doubtful when its dots are unclear; never guess from context.
Optional diacriticsدرس "he studied" vs درّس "he taught"Keep harakat and shadda as printed. Strip them at evaluation time, never in ground truth.
Obligatory ligaturesلا: one glyph, two lettersStore ل + ا. The Unicode Standard says letters from the main Arabic block, not presentation forms, should be used for interchange, yet some PDF text layers emit them.
Three digit sets0–9, ٠–٩, ۰–۹; ٤ and ۴ are different code pointsTranscribe digits as printed; normalize in a separate field.
Letter variantsFinal ي without dots, ة written like ه, hamza dropped from أChoose diplomatic (as written) or corrected (as intended), once.

Worked example: bidirectional text on a Saudi invoice

Saudi VAT Implementing Regulations (Article 53(5)) require the details on a tax invoice to appear in Arabic, with any other language shown as a translation, so Arabic sits beside Latin codes and digits. Unicode stores text in logical (reading) order and reorders only the display; annotators must recover the logical string from what they see:

On the scanWrong ground truthCorrect ground truth
رقم الفاتورة: INV-2024-0183ةروتافلا مقر: visual order, as some PDF text layers output itLogical order; key رقم الفاتورة ("invoice number") linked to value INV-2024-0183
A phone number with spaced digit groups inside an Arabic lineGroups copied in the order they display, which in an RTL line can differ from the order they were typed: a different number+966 11 123 4567 in logical order, value +966111234567. Digits within a group always run left to right.
الإجمالي: ١٬٢٥٠٫٠٠ ر.س1,250.00 (normalized too early), or ١٢٥٠٠٠ (separators lost: a different amount)١٬٢٥٠٫٠٠ with Arabic separators kept; value 1250.00 SAR

Reviewers render each transcription in RTL beside its crop, and normalized values get format checks.

Arabic document annotation specs we agree up front

UnitGeometryTranscription and labelsChecked with
RegionPolygon or boxRegion class and reading-order indexClass agreement, order errors
Text linePolygon, rotated box or baselineFull line in logical order; Latin runs tagged; illegible spans markedCharacter and word error rate (CER, WER)
Word / characterWord box covers dots and diacritics; character boxes optional, one per ligatureMatches the line transcription; base Unicode lettersBox overlap (IoU), dot errors
FieldKey box, value box, linkText as printed, normalized value, entity typeExact match per field
TableCell boxes with row, column and span indicesCell text in logical order, header flagsTEDS (tree-edit-distance similarity)
PIIBox and categoryOptional if you only redactRecall: a missed ID number costs more than an extra box

The spec also fixes tatweel, crossed-out text, stamps over text and output format (PAGE XML, ALTO or JSON); see our playbook on how to annotate Arabic text.

How an Arabic OCR annotation project runs

Each project follows Vet → Train → Produce → QA → Deliver:

  1. Scoping. Document types, handwriting share, capture quality, schema, volume and residency, checked on real pages.
  2. Spec and gold pages. A spec written around your documents; gold pages adjudicated by senior native linguists. Annotators pass screening before touching client data, then calibrate on gold.
  3. Pilot. Error rates and agreement measured; the spec revised where disagreement is systematic.
  4. Production with QA. Hidden gold pages in every queue, double transcription on a sample, adjudication and rework loops.
  5. Scale and delivery. Files in your schema, with quality reporting and an audit trail on every task.

Quality control for Arabic OCR training data

  • Gold pages from your documents, not generic test sheets, for calibration and hidden checks, plus agreement between independent transcribers.
  • Reported by slice: printed vs handwritten, Arabic vs Latin runs, document type, capture quality. A blended rate can hide failing digits on phone photos, so targets are set per slice.
  • Adjudication and rework: a senior native linguist resolves disagreements, repeated disagreement changes the spec, and failed items are reworked.

Security and residency for IDs, invoices and records

An ID card or bank statement is almost entirely personal data. Pages are hosted in-region by default, with on-prem and private-cloud options. Access is least-privilege, actions are logged, and contributors work under NDA. Our PDPL and data residency checklist lists the questions to ask before the first upload.

Arabic document AI use cases by industry

By industry: KYC on IDs, Iqamas and commercial registrations, statements and bilingual invoices in banking; archive digitization with Hijri dates, stamps and handwritten notes in government; contracts and court documents in legal; lab reports and handwritten prescriptions, reviewed by licensed physicians, in healthcare; receipts, packaging and newspaper archives in media and retail.

When to automate Arabic OCR labeling, and when to use human annotators

In the KITAB-Bench paper (February 2025), modern vision-language systems such as GPT-4o and Gemini outperformed traditional OCR engines (EasyOCR, PaddleOCR, Surya) by an average of 60% in character error rate, yet the best model, Gemini-2.0-Flash, reached only 65% accuracy on PDF-to-Markdown conversion. Model rankings move quickly, so treat these figures as a snapshot. Our LabelBench audit covers text labels, not OCR, but shows a similar gap: on the fixed held-out manifest, a local language model at 78% exact-match accuracy on binary Arabic toxicity fell to 25.3% on the real multi-label taxonomy. We decide with Safe Automation Coverage: the fraction of a queue that can be accepted while the 95% Wilson lower confidence bound on accuracy stays above a declared target.

PagesModel pre-labels?Human role
Clean printed MSA, one columnYes, once it clears your floor on goldCorrect flagged lines, audit a sample
Bilingual invoices and formsText yes, fields with careVerify digits, bidi order, every key-value link
Handwriting, diacritized text, historical print, poor photosRarelyHuman-first transcription
Gold and evaluation setsNoDouble transcription and adjudication

Synthetic rendered pages add fonts, not real scanners or hands: see the limits of synthetic data.

In-house team vs crowd platform vs specialist vendor

CriterionIn-house teamCrowd platformSpecialist Arabic vendor
Handwriting and diacriticsLimited to who you can hireReading level hard to verifyScreened native readers
Bidi and reading orderYour tooling and trainingOften left to the toolWritten into spec and QA
Best forStable, long-running document typesHigh-volume clean printHandwriting, bilingual forms, regulated documents, gold sets

Full scorecard: how to choose an Arabic data annotation vendor.

Pilot terms

A pilot has a fixed scope: one or two document types, an agreed set of your pages and the spec. It includes gold-standard QA and ends with a quality report: error rates by slice, an error taxonomy, spec revisions and how many pages could safely be pre-labeled. It usually completes within two weeks. To scope one through our contact page, send sample pages, your schema, volumes and residency constraints. Work then scales as a managed, embedded or enterprise engagement, alongside our wider Arabic data annotation services.

Frequently asked questions

What is OCR annotation?

OCR annotation pairs regions of a document image with the exact text they contain: boxes or polygons for lines, words or characters, each with a transcription, plus layout, reading order and field labels. It is the ground truth that text recognition and extraction models learn from and are tested against.

Can you annotate handwritten Arabic documents?

Yes. Native readers transcribe handwriting at line level, add word or character boxes when needed, and mark illegible spans instead of guessing. Gold pages should cover many writers, because hands vary far more than fonts. The public KHATT database has 1,000 forms from 1,000 writers, with ground truth at page, paragraph and line level.

Should Arabic OCR ground truth include diacritics?

Include them exactly where they are printed. Everyday Arabic mostly omits short vowels, but religious texts, poetry, children's books and textbooks carry them, and a shadda can change the word. Diacritics kept in ground truth can be stripped at evaluation time; diacritics never transcribed cannot be restored.

How much does Arabic OCR annotation cost?

We price per project after the pilot: a clean printed letter, a bilingual invoice with linked fields and a handwritten medical form are different jobs. The drivers are geometry level, handwriting share, fields and tables, PII handling and QA overlap. See our guide to Arabic data annotation cost.

Scope a pilot on your own data

Tell us the dialects, domain, modality and volume. We come back with a fixed-scope pilot, gold-standard QA and a quality report — usually within two weeks.

Talk to us