Assamese OCR: ten free Tesseract runs, tested
93.3%
of letters: script/Bengali, Sauvola threshold
Use script/Bengali with Sauvola
We ran Tesseract 5.5.4 on 30 proofread Assamese pages from 10 books on as.wikisource.
| Run | Letters | Words |
|---|---|---|
| script/Bengali, Sauvola threshold | 93.3% | 82.3% |
| script/Bengali, --psm 6 | 92.9% | 81.5% |
| script/Bengali (fast) | 90.6% | 79.8% |
| asm best | 90.4% | 79.2% |
| asm (fast) | 90.2% | 78.7% |
| asm, tessdata repo | 90.2% | 78.7% |
| script/Bengali best | 90.2% | 79.1% |
| ben best | 88.6% | 69.4% |
| asm+eng | 86.0% | 77.2% |
| ben (fast) | 85.5% | 65.7% |
On the fast script/Bengali model, Sauvola added 601 letters and --psm 6 added 516.
asm best found 28 more letters than the fast asm; script/Bengali best found 69 fewer.
tessdata's asm is the fast asm plus one config line. It wrote the same text on all 30 pages.
The command: script/Bengali, Sauvola
curl -LO https://raw.githubusercontent.com/tesseract-ocr/tessdata_fast/4.1.0/script/Bengali.traineddata
mkdir -p tessdata && mv Bengali.traineddata tessdata/
tesseract page.png page --tessdata-dir tessdata -l Bengali -c thresholding_method=2
It writes page.txt. thresholding_method=2 is Sauvola. The
5.7 MB model took a median 1.6 s a page.
Homebrew's brew install tesseract-lang has the fast
asm, a 2.0 MB file. It read 90.2% of letters, with about 4 more
words in a hundred wrong than the command above.
ben has no ৱ: skip it
Assamese writes ra as ৰ and has a wa, ৱ. Bengali uses র and has no ৱ.
The pages hold ৱ 211 times. ben wrote it 0 times: where it was printed, ben wrote র 116 times.
| Run | ৰ right | ৱ right |
|---|---|---|
| script/Bengali, Sauvola | 1,334 | 198 |
| asm (fast) | 1,320 | 196 |
| ben best | 1,140 | 0 |
| ben (fast) | 1,014 | 0 |
ben wrote a lone ৰ as ব (ba) 218 times.
Top slip: the aa sign goes missing
| Printed | Read as | Times |
|---|---|---|
| ◌া aa sign | Nothing | 140 |
| ৰ ra | র Bengali ra | 57 |
| র Bengali ra | ৰ ra | 35 |
| ৰ ra | ব ba | 29 |
| ◌ো o sign | ◌ে e sign | 29 |
The pages hold 2,206 of these aa signs. asm lost 239.
Nearly all of rows two and three sit inside clusters such as প্ৰ, where the two ras print alike.
Each book: 87.4% to 95.6%
| Printed | script/Bengali, Sauvola | asm |
|---|---|---|
| 1903, verse | 95.6% | 95.3% |
| 1909 title, later reprint | 92.4% | 93.3% |
| 1910, verse | 94.0% | 94.4% |
| 1937, heavy type, blotchy scan | 87.4% | 77.3% |
| 1947, verse, tiny type | 94.4% | 93.7% |
| 1948, play, dark page edges | 94.7% | 91.7% |
| 1948, play, small type | 94.3% | 93.8% |
| 1949, verse | 95.3% | 94.8% |
| 2019, modern type | 95.1% | 81.0% |
| No year, verse, bold type | 88.2% | 87.9% |
Sauvola beat asm on 8 of 10 books. It helped most on the blotchy 1937 scan and the 2019 pages.
A scanned PDF: the same setup
mkdir -p tessdata
cp -r "$(brew --prefix)/share/tessdata/configs" tessdata/
curl -L -o tessdata/Bengali.traineddata \
https://raw.githubusercontent.com/tesseract-ocr/tessdata_fast/4.1.0/script/Bengali.traineddata
TESSDATA_PREFIX=$PWD/tessdata ocrmypdf -l Bengali --jobs 3 \
--tesseract-thresholding sauvola --sidecar book.txt scan.pdf book.pdf
It took 50.4 s on our 30-page PDF.
| From | Letters in order | Words |
|---|---|---|
| book.txt | 93.5% | 82.3% |
| book.pdf, pdftotext | 83.9% | 51.8% |
| book.pdf, pdftotext -raw | 93.5% | 52.4% |
| book.pdf, pdftotext -layout | 92.5% | 51.8% |
| book.pdf, PDFKit (macOS) | 85.7% | 67.7% |
pdftotext lost about 30 points of words. PDFKit kept 992 of the 1,422 i signs in book.txt. Search book.txt.
Without the cp line, OCRmyPDF stopped with
TesseractConfigError in our Bengali and Punjabi tests.
Five more things we checked
- asm has no ঐ, ঈ, ঝ or ঋ: 12 letters on our pages. Of the letters on our pages, script/Bengali lacks only ঐ and ঋ. No model has ঊ or ঔ (none on our pages).
- asm+eng wrote 973 Latin letters on the 30 pages with none. asm wrote none.
- No run left a page empty. Sauvola lost 431 letters in long skipped stretches, the default 958.
-
ben best warns
Failed loading language 'eng'on every page if eng is missing: its config asks for it. - Apple Vision on macOS 26.6 lists 30 languages, not Assamese.
How we ran it
- Pages marked proofread or validated on as.wikisource, from a seeded shuffle of books, 3 a book. Pages with footnote tags, tables or templates in the wiki text, or a passage typed twice, were left out.
- The books are dated 1903 to 2019; 1 gives no year. The 1909 book's pages come from the introduction of a later reprint. Every page is print. We looked at each one first.
- One page's proofread text ends with a 6-letter word the scan does not show. Without it each run scores 0.02 to 0.03 points higher.
- The 1909 book's pages are proofread but not validated: some words in the text differ from the scan. Ten we fixed by eye cost each run 0.01 to 0.05 points.
- The proofread text types 62 cluster ras as র and some o signs as two signs. Folding those, each run scores 0.5 to 1.3 points higher. We kept the strict scores.
- 12 pages came from DjVu files, the rest from PDFs, drawn up to 1,920 px wide.
- Scores count Assamese letters and signs, with ৰ and ৱ. Digits, the danda, punctuation, Latin letters and spaces are left out.
- Letters found in order is the longest common subsequence. Words: whole words right. Slips and long skipped stretches (20 or more letters in a row with nothing found) come from a second alignment, so counts are close, not exact.
- Models from tessdata_fast, tessdata_best and tessdata at tag 4.1.0.
- One thread a run, 3 runs at a time, at low priority, while other jobs ran. Times are rough.
- OCRmyPDF 17.13.0, pdftotext from Poppler 26.03.0, PDFKit on macOS 26.6. The PDF holds one JPEG scan a page.
- Licenses: Tesseract and tessdata are Apache-2.0, OCRmyPDF is MPL-2.0. Of the scan files, 8 are marked public domain and 2 are CC BY-SA 4.0. We show no page images and quote no passage.
Scanned pages to text, no install
Run it yourself. Our Apify Actor turns a scanned PDF into Markdown or text. $0.006 a scanned page. It reads 18 languages, not Assamese.
Or send us the scan. Tack, our AI, does the job for $29, up to 50 pages. First page free. For Assamese, ask first.
Questions people ask
Does Tesseract support Assamese?
Yes, with asm or script/Bengali. On our 30 pages, script/Bengali with a Sauvola threshold read 93.3% of letters and 82.3% of words.
Which Tesseract model is best for Assamese?
On our pages, script/Bengali with the Sauvola threshold (-c thresholding_method=2). It beat asm best by 2.9 points of letters and 3.1 points of words.
Can I use the Bengali model, ben, for Assamese?
Not well. ben has no ৱ, so it wrote 0 of the 211 on our pages. It read 85.5% of letters, the lowest of our ten runs.
Can I OCR an Assamese PDF?
Yes. OCRmyPDF with -l Bengali and --tesseract-thresholding sauvola found 93.5% of letters and 82.3% of words on our 30-page PDF.
Why does Tesseract write র for ৰ?
We did not test why. Inside a cluster such as প্ৰ the two print alike. Our Sauvola run wrote র for ৰ 56 times inside a cluster and once on its own.