Metadata-Version: 2.4
Name: sindhijev
Version: 0.1.0
Summary: Check Sindhi OCR text against the scan: per-letter dot-error flags with a 7M-parameter CPU model
Author: Arsalan Kaleem
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/ArsalanKaleem/sindhi-JEV
Project-URL: Issues, https://github.com/ArsalanKaleem/sindhi-JEV/issues
Keywords: sindhi,ocr,arabic-script,verification,low-resource
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: src/sindhijev/assets/OFL-NotoNaskhArabic.txt
Requires-Dist: numpy>=1.24
Requires-Dist: opencv-python-headless>=4.8
Requires-Dist: uharfbuzz>=0.39
Requires-Dist: freetype-py>=2.4
Requires-Dist: onnxruntime>=1.17
Provides-Extra: train
Requires-Dist: torch>=2.2; extra == "train"
Dynamic: license-file

# sindhijev

Check Sindhi OCR text against the scanned word and flag dot errors letter by letter.

Sindhi letters differ by dots (ب ٻ ڀ پ, ن ڻ, ج ڄ, د ڏ ڌ). OCR engines often get the shape right and the dots wrong,
and many such mistakes are still real words. `sindhijev` looks at the word crop and the OCR text together, scores how
likely the text is wrong, and flags the suspicious letters. It is a 7M-parameter model run with ONNX Runtime on CPU
(about 20 ms per crop); the model file (~30 MB) is downloaded once on first use and checked by SHA-256.

```
pip install sindhijev

sindhijev check word.png "ڪلوواٽ اهي"       # p_wrong=1.000, suspicious letter: ا
sindhijev repair word.png "ڪلوواٽ اهي"      # ڪلوواٽ آهي
sindhijev pick word.png --cand "..." --cand "..."  [--tesseract]
```

```python
from sindhijev.tool import Checker
r = Checker().check("word.png", "ڪلوواٽ اهي")
print(r["p_wrong"], r["suspicious"])
```

**Scope.** Built for crops of 1 to 4 printed Sindhi words. On a frozen, hand-labelled set of real scans it ranks
wrong OCR outputs above correct ones with AUROC 0.884 (0.935 on dot errors); on full lines it does not work.

- Documentation: https://arsalankaleem.me/sindhi-JEV/
- Live demo: https://huggingface.co/spaces/ArsalanKaleem/sindhijev
- Source, data and results: https://github.com/ArsalanKaleem/sindhi-JEV
- Licence: Apache-2.0 (bundled Noto Naskh Arabic font: SIL Open Font License)
