Nukta placement changes meaning
A single nukta distinguishes ب/پ and د/ذ — different letters, different words. Misplacing it corrupts meaning, not just shape.
Urdu in the Nasta'liq style — a connected, right-to-left script.
Urdu administrative and literary records from north-west India are written in Nasta'liq, a flowing connected script that is hard for OCR. Available through the Python package.
A single nukta distinguishes ب/پ and د/ذ — different letters, different words. Misplacing it corrupts meaning, not just shape.
A standalone hamza (ء) needs the right carrier (أ, ئ, …) depending on context.
Tesseract can split a single connected glyph into separate letters with spurious spaces.
| Raw OCR | gurmukhifix | What happened |
|---|---|---|
اردو زبان | اردو زبان | Valid — passes through |
محبت کا پیغام | محبت کا پیغام | Valid — untouched |
Tesseract turns pixels into characters. It has no linguistic knowledge — it can't know that a dependent vowel may not begin a word, or that a sign written to the left of a letter must be encoded after it. gurmukhifix adds exactly those rules.
A blind substitution table rewrites correct letters too and corrupts good text. gurmukhifix is evidence-gated: a fix is applied only when it makes the text more valid, so already-correct Unicode is never changed.
Raw OCR often looks right but is malformed Unicode — wrong code-point order, dropped marks. That silently breaks search, indexing, fonts and copy-paste. gurmukhifix produces canonical, well-formed text.