Use it
Command line
One command, three subcommands. Every subcommand takes a word-crop image and Sindhi text.
sindhijev [--weights FILE] [--json] {check,repair,pick} ...
| Option | Meaning |
|---|---|
--weights FILE | Path to sindhijev_v2.onnx. Default: SINDHIJEV_WEIGHTS, then the download cache. |
--json | Print machine-readable JSON instead of text. |
check
Scores one OCR text for one crop.
sindhijev check IMAGE TEXT
Text output: p_wrong and the flagged letters with their positions (0-based, in reading order).
JSON output:
{
"text": "ڪلوواٽ آهي",
"p_wrong": 0.00025,
"chars": [{"i": 0, "char": "ڪ", "score": 0.0}, ...],
"suspicious": []
}
| Field | Meaning |
|---|---|
p_wrong | Probability that the text does not match the image (temperature-scaled on synthetic validation data, T = 1.145). |
chars[].score | Per-letter probability that this letter is wrong. |
suspicious | Positions whose score is above 0.817 (threshold chosen on synthetic validation data). Spaces are never flagged. |
repair
Fixes likely dot errors in one OCR text.
sindhijev repair IMAGE TEXT
For the three most suspicious letters it tries every reviewed dot partner (for example ن and
ڻ), re-scores, and keeps the best swap only if p_wrong drops by at least 0.6. It
repeats at most twice. Prints the repaired text and each change.
Measured on synthetic data onlyFixes 980 of 1,000 real-word dot swaps in
training fonts and 869 of 1,000 in unseen fonts, breaking 1 to 2 correct texts in 2,000. It has not been measured on
real scans.
pick
Scores several OCR outputs for the same crop and ranks them, lowest p_wrong first.
sindhijev pick IMAGE --cand TEXT [--cand TEXT ...] [--tesseract [PATH]]
| Option | Meaning |
|---|---|
--cand TEXT | A candidate text. Repeat for each candidate. |
--tesseract [PATH] | Also run the installed Tesseract models snd, urd, ara, fas (single-line mode). Missing models are skipped. |
Use check for triageOn real word crops, keeping the output that v2 trusts most
did not beat always using Tesseract
snd (CER 0.215 vs 0.181). Ranking which crops to review works better
than choosing the text automatically.Exit codes
0 on success, 2 when pick has no candidates. Errors (unreadable image,
missing weights) raise with a message.
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.