Hebrew printed-text recognition for Tesseract, continued from HeOCR R7 on real NLI and Internet Archive scans, born-digital Reshumot lines and synthetic lines (HeOCR R8b)
Year: 2026
Type: article
Abstract: Erratum (2026-11-13): training/evaluation text overlap was rechecked; the R8b figures barely move (at most 0.015 CER points) and the release gate holds. Details are on the model card at huggingface.co/HeOCR/heocr-r8b-tesseract-heb and in HeOCR/heocr-engine#79; the README.md file in this record predates the erratum. HeOCR R8b: Hebrew printed-text recognition for Tesseract R8b is a Tesseract language model (.traineddata) for printed Hebrew. HeOCR made it by continuing to train HeOCR R7, itself a fine-tune of Tesseract's own heb model from tessdata_best, for one pass over 196,275 lines: - 158,104 real scanned lines from 45 public-domain books (8 National Library of Israel "public domain, free use" scans and 37 Internet Archive scans), labelled with the Project Ben-Yehuda transcription of the same edition; - 19,533 lines rendered from 48 born-digital booklets of Israel's laws and regulations (Reshumot), labelled with the publisher's own text layer; - 11 lines of one Hebrew Wikisource proofread page; - 18,627 synthetic lines. No label is OCR output. What it gains, and what it does not. R8b reads modern Hebrew print better than R7, and its character set adds geresh ׳, gershayim ״ and the em dash —. It is worse than R7 on one scanned book: - On 3,254 lines of scanned Reshumot booklets (laws and regulations, 1953–2003), a silver dev set, it lowers the character error rate (CER) from R7's 2.934% to 2.129%; on the 2,028 lines whose labels two readings confirm, from 1.320% to 0.735%. Both intervals exclude zero (see Evaluation). This dev set decided the release; it is not a test score. - On the two held-out selection books, from the 1920s and the 1880s, it lowers CER from 0.848% to 0.757% and from 1.336% to 1.019%. Those books also chose its checkpoint, so these margins are optimistic. - It is worse than R7 on Brainin's collected works as scanned on the Internet Archive: 0.743% CER against R7's 0.635%. The likely cause is that scan: small, dark and grainy, and little like R8b's training lines. - There is no human-reviewed test score yet. R8b has not been scored on the 38 E2d4c pages that R6's and R7's cards report. R8b supersedes nothing. R7 remains valid. Use R8b for modern printed Hebrew, and for text with ׳ ״ —, which R7 cannot output. R7 may still read small, dark, grainy scans like Brainin's Internet Archive copy better. R7's card, record and deposit are unchanged. It is released on its own, with no link to HeOCR's kraken pipeline (R4d, A1, R3h). File heocr_r8b.traineddata (trained as heb.traineddata), 3,633,477 bytes sha256 8cb22dbeb195c3c0ffbe9c66cf956d8c2052d3b1c4a872234a85c975c4526117 Model type recognition (line-level LSTM, CTC); Tesseract does the page layout Format Tesseract 4/5 LSTM traineddata, LSTM only (--oem 1; no legacy engine). Trained and tested with Tesseract 5.5.3 Continued from HeOCR R7 (10.5281/zenodo.24126449), the checkpoint R7 was packed from Base model tessdata_best heb.traineddata at e12c65a (Apache-2.0), sha256 dbaa827aea6bc21215638447f17783a1004987c2d0bf5573d111fee397abdae5, fine-tuned (modified) by HeOCR as R7 and then R8b Licence Apache-2.0, Copyright (c) 2026 HeOCR maintainers (see LICENSE and NOTICE) Training record r8b_training_run.json (heocr_tesseract_training_run.v1) Code HeOCR/heocr-engine Uses OCR of printed Hebrew pages in the square script without niqqud: modern print such as government gazettes, and 19th- and early-20th-century book type. Use it in place of Tesseract's heb. Line recognition of single printed Hebrew line images, for example lines found by another segmenter. A research baseline for Hebrew OCR on real scans, and for comparison with R7. Out of scope Handwriting. R8b was trained on print only. Niqqud (vowel points) and cantillation. The training labels have none. How R8b behaves on pointed text was not measured. Rashi script and other non-square Hebrew scripts. R8b's recipe left out the rabbinic line set that was tested in a second arm. Unsupervised transcription. Check the output. Documents that are not mainly Hebrew. Latin letters are not in its character set; Reshumot lines containing them were left out. How to get started with the model Install Tesseract 4 or 5 (tested with 5.5.3). Put heocr_r8b.traineddata in a directory, say DIR, and pass that directory and the language name heocr_r8b. Whole pages: page segmentation mode 3 (automatic layout, Tesseract's default). tesseract page.png out -l heocr_r8b --tessdata-dir DIR --psm 3 This writes out.txt, in logical (reading) order. Whole-page accuracy was not measured for R8b. Single line images: psm 13 (raw line). Every figure on this card was measured on line images read this way. Do not use psm 7 on line crops: with stock heb and with R6, psm 7 returned empty text on crops that carry a sliver of the neighbouring line. tesseract line.png out -l heocr_r8b --tessdata-dir DIR --psm 13 Notes: - --tessdata-dir replaces Tesseract's data directory. Output formats other than plain text (tsv, hocr, pdf, alto) read their config files from DIR/configs. Link or copy the configs folder of your Tesseract installation into DIR, or put heocr_r8b.traineddata in your installation's own tessdata directory and drop --tessdata-dir. - The language name is the file name without .traineddata. heocr_r8b follows tessdata's naming. It combines with other models in the usual way, for example -l heocr_r8b+eng, which runs but was not evaluated. - Maqaf and quotation marks. R8b writes the maqaf ־ (U+05BE) where many texts write -, and it writes ׳ ״ where many texts write ' ". Fold them if your downstream text uses the ASCII forms. Training details Training data Lines: 196,275 in one seeded-shuffle list (seed 20261111). Every label character is in the character set. Source Line set Lines Rights R7's 30 books: 7 NLI and 23 Internet Archive university-library scans bynli_lines_v2 95,296 NLI "public domain, free use"; Internet Archive, original conditions apply 15 more books: 1 NLI scan and 14 Internet Archive scans (4 of them digitized by Google) bynli_lines_v3 62,808 as above 48 Reshumot booklets, Sefer ha-Hukim (12,602) and Kovetz ha-Takanot (6,931), 2006–2026, rendered from born-digital PDFs reshumotlines_v1 19,533 PD-IL (Copyright Act 2007 §6) One Wikisource proofread page: Buber, Sifrei de-Agadeta, Vilna 1886, p. 136 wslines_v1 11 text CC BY-SA 4.0 (Hebrew Wikisource contributors) Synthetic lines from HeOCR's S17a generator s17a_addon_v1.1 18,627 CC0 R7's lines are the 95,151 R7 trained on, plus 145 lines with ׳, ״ or — that R7's character set could not hold. Their authors, titles and editions are in R7's card and in the NOTICE. By record, with R8b's line counts: NLI: 990017640460205171 (6,100), 990020308000205171 (6,076), 990020495520205171 (6,052), 990020522850205171 (1,511), 990020466440205171 (72), 990019385920205171 (8), 990013538860205171 (1); Internet Archive (university-library scans): kolsifreperetsbe03smoluoft (6,100), sifrehazikhronot00mont (6,100), kolsifreperetsbe01smoluoft (6,096), kolsifreperetsbe05smoluoft (5,489), miyarketetevel008800 (4,760), ldpd_15772050_000 (4,639), mabeothayehudims00raff (4,137), atn3681.0001.001.umich.edu (4,065), maloketravseadya00bornuoft (3,658), mimitsrayimhusef00fran (3,590), ademataidibruivr00benyuoft (2,980), agadothatanaim11bach (2,977), motsaegolahzikhr00rabbuoft (2,852), peereakhmemedina00gree (2,777), imanuelharomimon0000tche (2,572), mishnatrishonimt0000klat (2,553), igrothaasirmeiha00drey (2,498), masaleeretsyirae00lewi (1,917), sepherhayyeyehud01mode (1,491), reginahashkenazi00ginsuoft (1,305), anshekayruan00pozn (1,218), maamarmagenetsin00mode (1,145), hegyoneshpinozah00rubi (557). The 15 new books (bynli_lines_v3): Source Record Book Lines IA zikhronotlebetda01reck Abraham Shalom Friedberg (d. 1902), Zikhronot le-Vet David, Warsaw, 1893 6,100 IA sifruthahisoriya11kaha Abraham Kahana (d. 1946), Sifrut ha-Historiyah ha-Yisre'elit, Warsaw, 1922 6,094 IA yotsrehasifrutha00zitr Shmuel Leib Citron (d. 1930), Yotsre ha-Sifrut ha-Ivrit ha-Hadashah, Vilna, 1922 6,039 IA (Google) afahleneemaniml00fngoog Samuel Joseph Fuenn (d. 1891), Safah le-Ne'emanim, Vilna, 1881 5,750 IA kolkitveylkatsen018800 Judah Leib Katzenelson (d. 1917), Kol Kitve Y. L. Katsenelson, St Petersburg, 1905 5,716 IA seferhademaotmeo0000bern Simon Bernfeld (d. 1940), Sefer ha-Dema'ot, Berlin, 1923 5,350 IA divreyemeolam02schuuoft Kalman Schulman (d. 1899), Divre Yeme Olam, Vilna, 1868 4,668 IA bioretletoldotha01gott Abraham Baer Gottlober (d. 1899), Bikoret le-Toldot ha-Kara'im, Vilna, 1865 4,662 IA zikhronotlevetda01frie Abraham Shalom Friedberg (d. 1902), Zikhronot le-Vet David, Warsaw, 1904 4,150 IA tserorperaimvehu00kovn Abraham Uri Kovner (d. 1909), Tseror Perahim, Odessa, 1868 3,616 IA (Google) mikhtavimmiarsh00mezagoog Yehoshua Mezah (d. 1917), Mikhtavim mi-Sar shel Yam, Warsaw, 1886 3,452 IA (Google) korothayehudimb00friegoog Abraham Shalom Friedberg (d. 1902), Korot ha-Yehudim bi-Sefarad, Warsaw, 1893 2,968 NLI 990026910840205171 Yaakov Bachrach (1824–1896), Sefer ha-Massa le-Erets ha-Kedoshah, Warsaw, 1884 2,319 IA sipurim00nombuoft Hirsh David Nomberg (d. 1927), Sipurim, Warsaw, 1905 1,291 IA (Google) tsitsimuferaimm00geiggoog Abraham Geiger (d. 1874), Tsitsim u-Ferahim, Leipzig, 1856 633 NLI scans: From the collections of the National Library of Israel / מאוסף הספרייה הלאומית. Each record's IIIF manifest carries NLI's "public domain, free use" licence. They were fetched from NLI's IIIF service. No Google-digitized "public domain, non-commercial use" scan was used. Internet Archive scans: 33 were scanned by university libraries, named in the NOTICE. Four were digitized by Google, and each is credited as "Digitized by Google; retrieved via the Internet Archive" with its contributing library: afahleneemaniml00fngoog, korothayehudimb00friegoog and tsitsimuferaimm00geiggoog (University of Cal
Authors: Palachy Affek, Shay, HeOCR maintainers
Language: English
Subfield: Computer Vision and Pattern Recognition
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7225901415
