جSindhi-Jev
Understand it

How it works

Render the OCR text, look at the scan and the render together, and score every letter.

Scanword crop, height 48 px
→
Two CNN encodersscan tokens + render tokens
(one token per 4 px of width)
→
Transformer decoderone query per letter + one for the whole text
OCR textrendered with HarfBuzz in Noto Naskh Arabic
↗
Letter alignmenteach letter's query starts from the render tokens under that letter
→
Outputsp(text wrong)
p(letter wrong) for every letter
The model is 7.1 M parameters: two 4-block CNN encoders, a 4-layer transformer decoder (width 256, 8 heads).

The idea

An OCR engine gives text. Sindhi-Jev draws that text (the render) and asks: does the scan look like this drawing, letter by letter? A dot error changes only a few pixels, so the model gets both pictures plus the letter sequence, and each letter's query is tied to the part of the render where that letter is drawn.

Training data

All training data is synthetic, generated from Sindhi Wikipedia text:

  • Scans: the true text drawn in 9 open-licence Naskh-style fonts, then degraded: skew, paper texture, ink spread, blur, noise, JPEG, slivers of neighbouring lines, bleed-through, uneven lighting and binarisation.
  • Candidates: half are correct; the rest have dot swaps from a confusion set reviewed by a native speaker (for example ن ↔ ڻ, ب ↔ ٻ), substitutions, deletions or insertions.
  • Real-word swaps: dot swaps that turn one dictionary word into another. A spell checker cannot catch these, so they force the model to use the image.

Fonts are split three ways: 9 for training, Mirza for model selection, and Harmattan and Noto Kufi Arabic only for the final synthetic test.

Training

Binary cross-entropy on the whole-text label and on each letter's label, 60,000 steps of batch 128, mixed precision on one Kaggle T4 (9.7 GPU hours for the reported model). The reported model is the checkpoint at the end of the schedule, not the best one on any test set.

Evaluation

The real test set was cut from 14 printed Sindhi sources, labelled by hand, frozen with SHA-256 hashes, and used exactly once for the final results. Every access is logged in the repository.

Sindhi-Jev by Arsalan Kaleem (ORCID 0009-0002-9054-6965) · Apache-2.0 · source on GitHub · numbers on this site come from the repository's result files; nothing here was tuned on the real test set.