Research and publications · Sanskrit and classical texts · Linguistics and scripts
Dharmamitra releases a free OCR model for printed Sanskrit
The model, mitra-sanskrit-ocr, was trained on about 37,000 pages from 346 printed Sanskrit editions and reads Devanagari and romanised Sanskrit. It can be downloaded or used online through the Dharmamitra service.

The Dharmamitra team has released mitra-sanskrit-ocr, a freely available model for reading printed Sanskrit from scanned pages, Sebastian Nehrdich of Tohoku University announced on the Indology mailing list on 4 December. The model is published on Hugging Face and is also the engine behind the OCR tool on the Dharmamitra website, where it runs in the browser with no installation.
It is a fine-tuned version of Surya-OCR-2, an open OCR model made by the company Datalab, and is aimed at Devanagari and romanised Sanskrit (IAST). Its Sanskrit training material, the announcement says, was some 37,000 scanned pages drawn from 346 printed editions held on archive.org. No one transcribed these pages by hand: each page was matched with an existing typed e-text of the same work, and the e-text overruled the machine reading only where a second, independent OCR agreed with it.
The team reports that on 60 pages from three editions kept out of training, the character error rate fell from 2.63 per cent for the base model to 1.72 per cent. In a test against a human-typed copy of a 1971 letterpress edition (24 pages), the developers counted 69 errors of its own for the new model, against 92 for the unmodified Surya-OCR-2, 115 for Google Cloud Vision and 168 for Chandra-OCR-2. These are the developers' own measurements.
The model is small, at under one billion parameters. It runs on a graphics card, and a separate version is offered for Apple Silicon Macs and other computers without an NVIDIA card. It is distributed under the same licence as its base model, which restricts commercial use.
The team warns that heavily damaged scans remain hard, and that very poor pages can lose lines or have them repeated in the output. It keeps misprints as printed, and it is not meant for manuscripts or Tibetan texts. Nehrdich asked users to send examples of pages where it fails.
Sources
- mitra-sanskrit-ocr, Hugging Face (buddhist-nlp)
- [INDOLOGY] New Dharmamitra OCR Model available, INDOLOGY mailing list, 2026-12-04
Written by Talaash Heritage from the sources above. Spotted an error? Write to talaashheritage@gmail.com and we will correct it on this page.
More from the Heritage desk · More in Sanskrit and classical texts · Background guide