Hebrew printed-text recognition for Tesseract, fine-tuned from tessdata_best heb on real public-domain NLI and Internet Archive scans with Project Ben-Yehuda text (HeOCR R7)
Year: 2026
Type: article
Abstract: HeOCR R7: Hebrew printed-text recognition for Tesseract R7 is a Tesseract language model (.traineddata) for printed modern Hebrew. HeOCR made it by fine-tuning Tesseract's own heb model from tessdata_best on 95,151 real scanned lines from 30 public-domain books. Seven of the books are National Library of Israel "public domain, free use" scans; 23 are university-library scans from the Internet Archive. Each line is labelled with the Project Ben-Yehuda transcription of the same edition, never with OCR output. It has the same recipe and the same base as HeOCR R6, on about seven times as many lines from six times as many books. It does not continue from R6. What it gains, and what it does not. R7 is better than stock Tesseract on printed Hebrew pages, but no better than R6: - On 38 real printed pages with human-adjudicated references, it lowers the character error rate (CER) from 0.226 (stock) to 0.209, and the word error rate (WER) from 0.473 to 0.393. - Against R6 it is a tie on CER (0.2089 against 0.2094; R7 − R6 = −0.0005 [−0.0072, +0.0061]). Its WER is slightly lower, but the interval includes zero. - On the 10 hardest of those pages it is no better than stock Tesseract or R6, and its CER point estimate is slightly worse (see Evaluation). R7 supersedes nothing. R6 remains valid. Use R7 if you want the newer model trained on more varied books; it has no measured page-level gain over R6. It is released on its own, with no link to HeOCR's kraken pipeline (R4d, A1, R3h). File heocr_r7.traineddata (trained as heb.traineddata), 3,628,595 bytes sha256 95faab81fba6fe57f854f973c1ccad2b0d1059fb951f34b17277385ceea8b303 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 Base model tessdata_best heb.traineddata at e12c65a (Apache-2.0), sha256 dbaa827aea6bc21215638447f17783a1004987c2d0bf5573d111fee397abdae5, fine-tuned (modified) by HeOCR Licence Apache-2.0, Copyright (c) 2026 HeOCR maintainers (see LICENSE and NOTICE) Training record r7_training_run.json (heocr_tesseract_training_run.v1) Code HeOCR/heocr-engine Uses OCR of printed Hebrew pages, books and periodicals in the square script, such as 19th- and early-20th-century book type, without niqqud. 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 R6: the two differ only in their training lines. Out of scope Handwriting. R7 was trained on print only. Niqqud (vowel points) and cantillation. The training labels have none, and fully pointed books were left out (see Training data). How R7 behaves on pointed text was not measured. Rashi script and other non-square Hebrew scripts, and medieval or other historical hands. Unsupervised transcription. Its CER on real pages is still about 0.21 (one character in five). Check the output. Documents that are not mainly Hebrew. No Latin text was in the training lines. How to get started with the model Install Tesseract 4 or 5 (tested with 5.5.3). Put heocr_r7.traineddata in a directory, say DIR, and pass that directory and the language name heocr_r7. Whole pages: page segmentation mode 3 (automatic layout, Tesseract's default). The page figures below use it. tesseract page.png out -l heocr_r7 --tessdata-dir DIR --psm 3 This writes out.txt, in logical (reading) order. Single line images: psm 13 (raw line). 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. R7 has the same recognizer and was not tested separately for this. tesseract line.png out -l heocr_r7 --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_r7.traineddata in your installation's own tessdata directory and drop --tessdata-dir. - The language name is the file name without .traineddata. heocr_r7 follows tessdata's naming (chi_sim, deu_latf). It combines with other models in the usual way, for example -l heocr_r7+eng, which runs but was not evaluated. Training details Training data Lines: 95,151 real line images, the train split of HeOCR's bynli_lines_v2 line set (Ben-Yehuda × NLI and Internet Archive), after two filters (below). They come from 30 books: 19,820 lines from 7 NLI scans and 75,331 from 23 Internet Archive scans. Each record is capped at 6,100 lines, so no book has more than 6.4% of the lines; Smolenskin's collected works, three Internet Archive volumes, have 18.6% together. Source Record Book Lines NLI 990017640460205171 Leo Tolstoy (1828–1910), Anna Karenina, Hebrew translation by Yosef Eliyahu Triwosch (1855–1940), Moscow: A. Y. Stybel, 1918–1922 6,100 NLI 990020308000205171 Yeshayahu Berashadsky (1871–1908), Ketavim Aharonim, Warsaw: Tushiya, 1910 6,076 NLI 990020495520205171 Shmuel Leib Citron (1860–1930), Me-Ahorei ha-Pargod, Vilna: Z. Matz, 1923–1925 6,052 NLI 990020522850205171 Shmuel Tchernowitz (1879–1929), Im Shahar, Jerusalem: Ha-Madpis, 1927 1,511 NLI 990020466440205171 David Frischmann (1859–1922), Be-Yom ha-Kippurim, Warsaw: Y. Alapin, 1881 72 NLI 990019385920205171 Azriel Natan Frank (1863–1924), Sefer Agadot ha-Zohar, Warsaw: Ahiasaf, 1923–1924 8 NLI 990013538860205171 Yitzhak Katzenelson (1885–1944), Shirim, Lodz: Hovevei Shira, 1938 1 IA kolsifreperetsbe03smoluoft Peretz Smolenskin (d. 1885), Kol Sifre, vol. 3, Vilna: M. Katzenellenbogen, 1905 6,100 IA sifrehazikhronot00mont Israel Hayyim Tavyov (d. 1920), Sifre ha-Zikhronot le-Sir Moshe Montefiore, Warsaw: Tushiya, 1898 6,100 IA kolsifreperetsbe01smoluoft Peretz Smolenskin (d. 1885), Kol Sifre, vol. 1, Vilna: M. Katzenellenbogen, 1905 6,096 IA kolsifreperetsbe05smoluoft Peretz Smolenskin (d. 1885), Kol Sifre, vol. 5, Vilna: M. Katzenellenbogen, 1905 5,489 IA miyarketetevel008800 Zvi Kasdai (d. 1937), Mi-Yarkete Tevel, Jerusalem: A. M. Luncz, 1914 4,760 IA ldpd_15772050_000 Ludwig Philippson (d. 1889), Ya'akov Tirado, translated by Samuel Joseph Fuenn (d. 1891), Vilna: S. Y. Fuenn, 1881 4,639 IA mabeothayehudims00raff Samuel Raffaeli (d. 1923), Matbe'ot ha-Yehudim, Jerusalem: E. Dainard, 1913 4,135 IA atn3681.0001.001.umich.edu Menahem Mendel Dolitzky (d. 1931), Shevet Sofer, Vienna: G. Brag, 1883 4,027 IA maloketravseadya00bornuoft Hayyim Yehiel Bornstein (d. 1928), Mahloket Rav Sa'adyah Ga'on u-Ben Meir, Warsaw: Schuldberg, 1904 3,643 IA mimitsrayimhusef00fran Ludwig August Frankl (d. 1894), Mi-Mitsrayim, translated by Abraham Baer Gottlober (d. 1899) and Meir Halevi Letteris (d. 1871), Vienna: J. Holzwarth, 1862 3,529 IA ademataidibruivr00benyuoft Eliezer Ben-Yehuda (d. 1922), Ad Ematai Dibru Ivrit?, New York: Kadima, 1919 2,980 IA agadothatanaim11bach Wilhelm Bacher (d. 1913), Agadot ha-Tanna'im, translated by Alexander Siskind Rabinovitz (d. 1945), Berlin and Jerusalem: Dvir, 1922 2,977 IA motsaegolahzikhr00rabbuoft Saul Pinchas Rabinowitz (d. 1910), Motsa'e Golah, Warsaw: Ahiasaf, 1894 2,836 IA peereakhmemedina00gree Jekuthiel Judah Greenwald (d. 1955), Pe'ere Hakhme Medinatenu, Sighet: A. Kaufman, 1910 2,776 IA imanuelharomimon0000tche Shaul Tchernichovsky (d. 1943), Immanuel ha-Romi, Berlin: Eshkol, 1924 2,572 IA mishnatrishonimt0000klat Jacob Klatzkin (d. 1948), Mishnat Rishonim, Berlin: Eshkol, 1924 2,553 IA igrothaasirmeiha00drey Alfred Dreyfus (d. 1935), Igrot ha-Asir me-I ha-Shedim, translated by Abraham Shalom Friedberg (d. 1902), Warsaw: M. Spektor and E. Berman, 1898 2,487 IA masaleeretsyirae00lewi Elhanan Leib Lewinsky (d. 1910), Massa le-Erets Yisra'el bi-Shnat 800, Berlin: Kelal, 1922 1,917 IA sepherhayyeyehud01mode Leon of Modena (d. 1648), Sefer Hayye Yehudah, Kiev, 1912 1,491 IA reginahashkenazi00ginsuoft Pesach Ginzburg (d. 1947), Regina Ashkenazi, London: Iyim, 1918 1,304 IA anshekayruan00pozn Samuel Abraham Poznański (d. 1921), Anshe Kairuan, Berlin, 1909 1,218 IA maamarmagenetsin00mode Leon of Modena (d. 1648), Ma'amar Magen ve-Tsinah, edited by Abraham Geiger (d. 1874), Breslau: H. Sulzbach, 1856 1,145 IA hegyoneshpinozah00rubi Salomon Rubin (d. 1910), Hegyone Shpinozah, Krakow: A. Faust, 1897 557 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: each item was scanned by a university library, named in the NOTICE (the University of Toronto for 15 of them; also Michigan, Columbia, Duke, Brandeis, Illinois, Ohio State and Florida). None was digitized by Google or comes from NLI. They were fetched from the Internet Archive, which publishes them without an explicit licence; the original conditions of each item on the Internet Archive still apply. Each item passed HeOCR's Internet Archive rights gate, and each book has its own recorded rights justification (author death years, publication year and place, digitizer, route), listed by id in the training record. Text: the Project Ben-Yehuda public-domain transcription of the same edition (public domain dump, release 2026-03), placed on each scanned line by HeOCR's alignment tool (hocrgen F8f). Lines were kept only where the alignment scored at least 0.9 and its text agreed with Tesseract's reading of the line at a similarity of at least 0.7. Tesseract only located the lines and chose between candidate spans at a line's edges; no label is OCR output. Label normalisation: Unicode NFC, logical order. Niqqud removed; … written as ...,
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: W7225825506
FWCI:
Cites:
Cited by:
Related to:
