betaFeedback

WorksComputer Science

DictaRashi: A State-of-the-Art OCR Model For Rashi Script

Abstract

We release DictaRashi, a Tesseract OCR model for scanned Hebrew books printed in the so-called "Rashi" font. We trained DictaRashi on over one million manually corrected lines of text from over 100 different books of Rabbinic and post-Rabbinic literature. On a held-out set of 1,120 manually transcribed lines from scanned Rashi-script pages, DictaRashi reaches a character error rate (CER) of 0.86% and a word error rate (WER) of 3.38%, setting a new state-of-the-art for publicly-available Tesseract models. We provide a full comparison of our results to those of the 31 other publicly available Hebrew Tesseract models; the best of those models achieves a 2.98% CER and 11.86% WER. We further demonstrate that DictaRashi outperforms the current frontier LLMs on this OCR task. We release the test set of Rashi-script documents so that it may be used as a benchmark for future work in this area. We are pleased to release the model and test set to the community under a CC BY NC 4.0 license.

Introduction

A large percentage of published Rabbinic and post-Rabbinic books are set in the so-called "Rashi" script, a semi-cursive Hebrew typeface. Millions of such pages are available as bitmap scans, but full-text search, digital editions and downstream NLP all depend on OCR, and Rashi script is poorly served by general-purpose engines: the official Tesseract Hebrew models read most Rashi letters as their square-script look-alikes and their character-level error rate is generally no lower than 30% (§ 4).

Several community models fine-tuned for Rashi script exist (§ 3.2), but they have not previously been compared on a common, manually verified test set. On this backdrop, this technical report makes three key contributions:

  • We release DictaRashi, a new Tesseract model trained on over one million manually corrected lines from over 100 Rabbinic and post-Rabbinic books, runnable with a stock Tesseract installation.

  • We create and release a new benchmark for Rashi-script OCR evaluation, consisting of 1,120 lines scanned text from a wide assortment of Rabbinic and post-Rabbinic books, along with ground truth prepared by domain experts.

  • We present a comprehensive comparison and evaluation of 32 open Hebrew Tesseract models as well as 8 leading LLMs on the aforementioned test set of 1,120 hand-transcribed Rashi-script lines.

Model and Training

Starting point

We performed our train as a continuous train on top of the standard heb model from tessdata_best (version string 4.00.00alpha:heb:synth20170629), keeping its weights unchanged:

[1,36,0,1 Ct3,3,16 Mp3,3 Lfys48 Lfx96 Lrx96 Lfx192 Olc1]

Training data

Table 1 summarizes the data. Pages reserved as test pages for each book are excluded.

Procedure

Our training used the tesstrain scripts1 with Tesseract 5.2.0-51-ga8735. Each training sample is one text line image paired with its transcription, rendered as a single line (page segmentation mode 7). Tesstrain was run in fine-tuning mode (START_MODEL=heb) with LANG_TYPE=RTL, which implies Unicode normalization mode 3 and builds the language model with -pass_through_recoder -lang_is_rtl. The pipeline:

Books118
Pages14,195
Text lines1,343,425
Words12,724,738
Characters (non-space)52,517,573
Distinct word forms389,194
Pages per book (median)96
Words per page (median)821

Table 1. Training data.

  1. concatenates all transcriptions and builds the character set;

  2. converts every line transcription into a box file and every image/box pair into an .lstmf sample;

  3. shuffles the samples and splits them into training and evaluation lists;

  4. runs lstmtraining from the heb checkpoint.

Training ran for 500,000 iterations with the default tesstrain learning rate. The released model is the final checkpoint in floating-point form.

Test Corpus

Test pages

The test set consists of 14 Rashi-script pages from typical out-of-copyright Rabbinic and post-Rabbinic books, scanned anew from physical volumes for this evaluation using a Fujitsu ScanSnap SV600 overhead scanner. We have ensured that there is no duplication between the test pages and the training set. Altogether, the pages of the test set contain 1,120 lines, 11,294 words, and 51,749 characters.3

Ground truth

Domain experts prepared transcriptions for each of these lines using a web annotation tool.

Line Images and Bounding Boxes

The pages are divided into 1,120 lines via Tesseract’s layout segmentation routine, using the "auto" setting (PSM=3), which provides bounding boxes for each of the lines. These bounding boxes are considered canonical for the purposes of the test set; when evaluating each OCR system, we request transcription of the lines one at a time, always with these same bounding boxes.

Test Corpus Release Package

The test set release includes the page images, the bounding boxes and the ground-truth transcriptions.

Evaluation Setup

Metrics

We measure CER (character error rate) and WER (word error rate) for each evaluated model across the test corpus. Before scoring, both sides are Unicode NFC-normalized; vowel points, cantillation marks and invisible bidirectional or zero-width characters are removed; every character other than Hebrew letters, digits and spaces is dropped; and whitespace runs are collapsed.

Baselines

We compare our model to 31 publicly-available models Hebrew Tesseract models, including the following:

  • the official tessdata, tessdata_best and tessdata_fast models, both heb and the script/Hebrew model;4

  • three historical official releases;5

  • HeOCR R6, R7 and R8b;6

  • Rivok, all published releases;7

  • Pninim Rashi;8

  • Boro11204;9

  • EastEriq Rashi.10

LLMs

We also compare our model’s performance to that of the leading frontier commercial LLMs. We compare to eight such LLMs, with reasoning effort set to medium, and with the following prompt: <transcribe exactly as printed, without adding vowel points>.11 Each model received each line image in a separate request, just as the Tesseract models did.12 Empty responses count as empty output.

Results

Tesseract models. Table 2 provides comparative results for all models. DictaRashi reaches 0.86% CER and 3.38% WER, against 2.98% / 11.86% for the next best model (Boro11204 heb_rashi7): about three and a half times fewer errors in both characters and words. The official Tesseract models, HeOCR and the historical models stay above 30% CER: they were trained on square script and read Rashi letters as their square-script look-alikes.

ProviderModelCERWER
DictaDictaRashi (this release)0.863.38
Boro11204heb_rashi72.9811.86
Boro11204heb_rashi63.1212.33
Boro11204heb_rashi53.5214.32
Boro11204heb_rashi45.8423.19
Boro11204heb422.8266.04
Rivokv2.0 heb_rivok5.8420.84
Rivokv2.0 heb_rivok (best)5.8720.96
Rivokv2.0 heb_rivok_lite (best)6.9524.36
Rivokv2.0 heb_rivok_lite7.0824.59
Rivokv1.0.1 heb_rivok (best)20.9660.44
Rivokv1.0 heb_rivok (best)20.9660.44
Rivokv1.0.1 heb_rivok21.1060.55
Rivokv1.0 heb_rivok21.1060.55
Rivokv1.0.1 heb_rivok_lite (best)27.0571.80
Rivokv1.0.1 heb_rivok_lite27.2772.15
Pninim Rashiheb_rashi13.5742.84
Pninim Rashiheb_rashi_fast13.6543.02
EastEriq Rashiheb-ras29.0280.64
EastEriq Rashiheb-rashi-stam458.12129.21
Official Tesseracttessdata_best heb33.7382.81
Official Tesseracttessdata heb34.2883.81
Official Tesseracttessdata_fast heb34.9383.95
Official Tesseracttessdata script/Hebrew37.3886.09
Official Tesseracttessdata_best script/Hebrew37.5286.09
Official Tesseracttessdata_fast script/Hebrew37.7086.03
HeOCRr635.4481.86
HeOCRr735.7382.50
HeOCRr8b36.6782.85
Tesseract historical4.00 heb38.9986.90
Tesseract historical3.04.00 heb45.2388.49
Tesseract historicalinitial (2014) heb52.0398.05

Table 2. CER and WER (%, lower is better) of all 32 open Tesseract Hebrew models on the 1,120 lines of our test set. Providers are ordered by their best CER; “(best)” marks Rivok’s full-precision tessdata_best-based variants. Note that in one case WER goes above 100%, because extra words count as errors, and thus, a model which outputs more words than exist in the ground truth may end up with a WER of over 100%.

LLMs. Table 3 shows a wide spread across LLMs. The best performing LLM is Claude Fable 5.2 which reaches 2.90% CER and 8.46% WER, still substantially below the performance of DictaRashi. Gemini 4 Argon (3.85% / 9.48%) and Claude Opus 5.5 (4.42% / 11.81%) follow; the remaining five models range from 7.50% to 18.30% CER.

ProviderModelCERWER
AnthropicClaude Fable 5.22.908.46
GoogleGemini 4 Argon3.859.48
AnthropicClaude Opus 5.54.4211.81
AlibabaQwen4 Max7.5021.96
GoogleGemini 4 Hydrogen10.2024.92
OpenAIGPT-6.2 Astra13.7032.42
xAIGrok 4.714.6037.30
AnthropicClaude Sonnet 5.518.3038.74
DictaDictaRashi0.863.38

Table 3. CER and WER (%, lower is better) of eight frontier LLMs on the same 1,120 line images, with DictaRashi for reference.

Error analysis The most frequent errors in the DictaRashi results are between visually close Rashi letters (Table 4): vav read as yod, het and tav in both directions, and het read as pe. The ten pairs in the table account for nearly one third of the errors.

ABA→BB→ATotal
vavyod30434
hettav151227
hetpe15015
kafnun11314
gimelnun01313
betnun7613
final memsamekh3912
betgimel909
hefinal mem077
aleftav156

Table 4. The ten most frequent letter confusions of DictaRashi on the 1,120 test lines. A→B: ground-truth letter A read as B.

Usage

The model is a standard .traineddata file and needs no code beyond Tesseract 5:

tesseract page.png out \
  --tessdata-dir ./models \
  -l DictaRashi --psm 3

The model, the test set and usage examples are available on Github.13

Interactive Website

We provide an interactive website where users can upload scanned Rashi-script documents and receive OCR results from our DictaRashi model.14

Future Work

We are currently pursing additional avenues to achieve even higher accuracy on Rashi-script books using transformer-based models such as TrOCR.

Conclusion

DictaRashi sets a new state-of-the-art for Rashi-script OCR, and outperforms frontier LLMs as well. We are pleased to release it to the NLP community.

References

No references were extracted for this paper.

Paper details

vlnc:W_tbf9dyw5
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents