Tesseract's Hebrew, fine-tuned for real documents.
Tesseract is the OCR engine inside OCRmyPDF, Paperless-ngx and countless scripts. Its Hebrew models were trained in 2017 on clean, computer-rendered text, and it shows on scans, invoices and old print. We fine-tuned Google's own models on damaged synthetic documents and are releasing the result as one drop-in file, under Apache 2.0.
- What it is
- heb_rivok: a Tesseract 5 model file for printed Hebrew, with English and
digits in the same model. Copy it into Tesseract's folder and use
-l heb_rivok. No new software. - Accuracy
- On 403 lines cut from real Hebrew documents, Ubuntu's standard Hebrew model gets 4.7% of characters wrong and heb_rivok 1.4%; on lines with numbers, 4.5% and 1.6%. It also beats the Google model it was fine-tuned from on every test, including two public benchmarks. Full comparison below.
- Also
- heb_rivok_lite: the same recipe applied to Tesseract's standard Hebrew
model. Smaller and about three times faster per line; use it with
+eng. - Licence
- Apache-2.0, commercial use included, like the Google models it is built on.
- Not for
- Handwriting, Rashi script or cantillation marks. For single lines that mix Hebrew and English, see the limits.
The same page, read by each model
Each example is one page, read as a whole by Ubuntu's standard Hebrew model and by
heb_rivok, with Tesseract's default settings. Two are real book pages, printed
in 1872 and 1922. Two use text we wrote, set in fonts the model never saw in training and
damaged the way paper gets damaged.
We chose these pages to show the errors heb_rivok fixes, and each one opens
with the lines it reads better. Show all lines shows the rest,
including the ones it gets wrong. Across all seven documents we wrote, not only the two
shown, Ubuntu's model got 4.5% of characters wrong and
heb_rivok 1.0%.
Whole page ↗
Characters read wrong, whole page. Of its 10 lines, heb_rivok reads 5 better, 2 worse and 3 the same.
Text we wrote, set in Miriam CLM, a font the model never saw in training, sent through a simulated fax: half the vertical resolution, pure black and white.
Ubuntu hebבנק הדוגמה בע"מ, סניף 642, רח
2 errors׳י יפור 97, ירושליםheb_rivokבנק הדוגמה בע"מ, סניף 642, רח' יפו 97, ירושלים
✓
Ubuntu hebלכבוד: מר יוסף כהן
✓heb_rivokלכבוד: מר יוסף כהן
✓
Ubuntu hebהנדון: עדכון פרטי חשבון
4 errorsמס‘ON 99-+642-0458321heb_rivokהנדון: עדכון פרטי חשבון מ
1 errorסם׳ 99-642-0458321
Ubuntu hebיתרת החשבון
4 errorsליוםOV? 31.10.2026 עומדת על 18,452.37 ₪.heb_rivokיתרת החשבון ליום 31.10.2026 עומדת על 18,452.37 ₪.
✓
Ubuntu hebהלוואה
6 errorsמס‘ON 7781-22 תיפרע ב-36 תשלומים של 1,2480.00₪.4heb_rivokהלוואה מס׳ 7781-22 תיפרע ב־36 תשלומים של 1,240.00 ₪.
✓
Ubuntu hebהריבית השנתית: פריים + 1.5% (סה"כ 7.5%).
✓heb_rivokהריבית השנתית: פריים + 1.5% (סה״"כ 7.5%
2 errors)(.
Ubuntu hebלבירורים: 0
8 errors35-12354567, שלוחה48, בימים א'-ה' בין 08:30ל־15:/00.77heb_rivokלבירורים: 03-1234567, שלוחה 4, בימים א
1 error׳״-ה׳ בין 08:30 ל־15:00.
Ubuntu hebאנא שמרו מכתב זה לתיעוד.
✓heb_rivokאנא שמרו מכתב זה לתיעוד
1 error.,
Ubuntu hebבכבוד רב,
✓heb_rivokבכבוד רב,
✓
Ubuntu hebמחלקת שירות לקוחות
✓heb_rivokמחלקת שירות לקוחות
✓
Whole page ↗
Characters read wrong, whole page. Of its 9 lines, heb_rivok reads 5 better, 2 worse and 2 the same.
Text we wrote, set in Frank Ruehl CLM, a font the model never saw in training, damaged like a worn photocopy.
Ubuntu hebהסכם שכירות בלתי מוגנת
✓heb_rivokהסכם שכירות בלתי מוג
1 errorנגת
Ubuntu hebשנערך ונחתם ביום 15.07.2026
✓heb_rivokשנערך ונחתם ביום 15.07.2026
✓
Ubuntu hebבין: דנה אורן (להלן: "המשכירה")
✓heb_rivokבין: דנה אורן
1 error(ולהלן: ״המשכירה")
Ubuntu hebלבין: עמית גל (להלן: "השוכר")
✓heb_rivokלבין: עמית גל (להלן: "השוכר״)
✓
Ubuntu heb1. המשכירה משכירה לשוכר דירה בת 3 חדרים ב
1 errorרדח' האלה 14, דירה 6, באר שבע.heb_rivok1. המשכירה משכירה לשוכר דירה בת 3 חדרים ברח' האלה 14, דירה 6, באר שבע.
✓
Ubuntu heb2. תקופת הש
2 errorsכבירות: 12 חודשים, מיום 01.08.2026 ועד ליום 31.07.20297.heb_rivok2. תקופת השכירות: 12 חודשים, מיום 01.08.2026 ועד ליום 31.07.2027.
✓
Ubuntu heb3
6 errors.דמי השכירות: 4,350 ₪ לחודש, שישולמו עד ה-10 בכלחודש.arnheb_rivok3. דמי השכירות: 4,350 ₪ לחודש, שישולמו עד ה־10 בכל חודש.
✓
Ubuntu heb4. השוכר ימסור למשכירה ערבות בנקאית בסך 13
1 error,.050 ₪.heb_rivok4. השוכר ימסור למשכירה ערבות בנקאית בסך 13,050 ₪.
✓
Ubuntu heb5
7 errors.הצדדים מצהירים כיקראוWP הסכם זה והבינו את תוכנו.הheb_rivok
1 error56. הצדדים מצהירים כי קראו הסכם זה והבינו את תוכנו.
Whole page ↗
Characters read wrong, whole page. Of its 31 lines, heb_rivok reads 14 better, 3 worse and 14 the same.
A real scan: Masa ba-Arav (Samuel Romanelli), page ד, Warsaw 1922. Public domain, via Wikimedia Commons (National Library of Israel scan). Correct text: Hebrew Wikisource, validated, CC BY-SA 4.0.
Ubuntu heb
7 errorsד7שטמואל? רומאנילי | iheb_rivokד שמואל רומאנילי
✓
Ubuntu hebעניתי בחפזי:
✓heb_rivokעניתי בחפזי:
✓
Ubuntu heb- אלך.
✓heb_rivok– אלך.
✓
Ubuntu heb- אך - הוסיף עוד לדבר - השמר לך סודי אל תגל, כי
✓heb_rivok– אך – הוסיף עוד לדבר – השמר לך סודי אֵל תגל, כי
1 error
Ubuntu hebידעת מה עזה קנאת הסוחרים, דע כי אני הולך אל מלך מארוק
✓heb_rivokידעת מה עזה קנאת הסוחרים, דע כי אני הולך אל מלך מארוק
✓
Ubuntu hebלהתחנן לו ולבקש מלפניו רשיונו להשתקע בעיר לאראוי לערוב
✓heb_rivokלהתחנן לו ולבקש מלפניו רשיונו להשתקע בעיר לאראוי לערוב
✓
Ubuntu hebמערבי
16 errorsדרךFIT ים בצמרודונג,ORאםANN יעלה בידי אתהתהיהPAN עלheb_rivokמערבי דרך ים בצמר ודונג, אם יעלה בידי אתה תהיה על
✓
Ubuntu hebביתי,
4 errorsואםond לא-הן לא חסרת כל.,heb_rivokביתי, ואם לא-הן לא חסרת כל
1 error.,
Ubuntu hebנמשכתי בחבלי תקותי והבטחתו כי איש ישר הוא, ואפת.
✓heb_rivokנמשכתי בחבלי תקותי והבטחתו כי איש ישר הוא, ואפת.
✓
Ubuntu hebוילך ויקח לו ולמשרתו יחדו מכתב היציאה (פאספארט) מאת
✓heb_rivokוילך ויקח לו ולמשרתו יחדו מכתב היציאה (פאספארט) מאת
✓
Ubuntu hebסופר העיר, ואני לקחתי מכתב אחד לבדי
3 errorsאשרWN שאל בעבוריheb_rivokסופר העיר, ואני לקחתי מכתב אחד לבדי אשר שאל בעבורי
✓
Ubuntu hebרב חובל איש גינואה אוהבי
4 errors., | כי כן כוננגו בל יודע הדברheb_rivokרב חובל איש גינואה אוהבי. כי כן כוננו בל יודע הדבר
✓
Ubuntu hebל
2 errorsעצין כל.,heb_rivokלעין כל
1 error.,
Ubuntu hebויהי היום
4 errorsוהנהTINT אני שיט באה טיטואן ויתן הסוחר שכרהheb_rivokויהי היום והנה אני שיט באה טיטואן ויתן הסוחר שכרה
✓
Ubuntu hebוירדנו בה לבוא עמה, עברנו לפני מצודת סאן
1 error-.רוקו וסאן-פיליפוheb_rivokוירדנו בה לבוא עמה, עברנו לפני מצודת סאן-רוקו וסאן-פיליפו
✓
Ubuntu hebועיר אלחזירא הנצבים זה אצל זה מול פני גיבראלטאר. בקענו
✓heb_rivokועיר אלחזירא הנצבים זה אצל זה מול פני גיבראלטאר. בקענו
✓
Ubuntu hebמי המעבר, כי בהיותם נלחצים באפסים מביעים בשטף זרמתם
✓heb_rivokמי המעבר, כי בהיותם נלחצים באפסים מביעים בשטף זרמתם
✓
Ubuntu hebובארבע שעות היינו בין ההרים הלאה אל עבר אפריקא. באנו
✓heb_rivokובארבע שעות היינו בין ההרים הלאה אל עבר אפריקא. באנ
1 errorוי
Ubuntu hebבנהר
5 errorsהעיר,PVA אך עד העיר לא באנו, כי כן דבר המלך מקדםheb_rivokבנהר העיר, אך עד העיר לא באנו, כי כן דבר המלך מקדם
✓
Ubuntu hebבל יבוא שם איש נוצרי או יהודי במלבוש נוצרי על דבר
✓heb_rivokבל יבוא שם איש נוצרי או יהודי במלבוש נוצרי על דבר
✓
Ubuntu hebמעשה שהיה, וממוני המלכים שהיו שם על סוחרי לאומותם יצאו
✓heb_rivokמעשה שהיה, וממוני המלכים שהיו שם על סוחרי לאומותם יצאו
✓
Ubuntu hebוהלכו לטאנגיא חוץ ממוני צרפתי, כי מטעם המלך הלך לעיר
✓heb_rivokוהלכו לטאנגיא חוץ ממוני צרפתי, כי מטעם המלך הלך לעיר
✓
Ubuntu hebראבאד ויניחו תחתיהם משנים יהודים שם. ארבעה משנה המה:
✓heb_rivokראבאד ויניחו תחתיהם משנים יהודים שם. ארבעה משנה המה:
✓
Ubuntu hebשל צרפתי, של ספרד ופורטוגאל, של אינגלא,
6 errorsסוויידTNO ודינמארקי,heb_rivokשל צרפתי, של ספרד ופורטוגאל, של אינגלא,
1 errorסווייד ודינמארקי,
Ubuntu hebושל וינעדיג, גינואה וראגוזה
3 errors., | אחרי קחתנו רשיון הערבאיםheb_rivokושל וינעדיג, גינואה וראגוזה. _ אחרי קחתנו רשיון הערבאים
2 errors
Ubuntu hebשומרי החוף, ירדנו ליבשה
13 errorsללון79בביתInkאחדmaa רחוקמןyO העירheb_rivokשומרי החוף, ירד
1 errorנגו ליבשה ללון בבית אחד רחוק מן העיר
Ubuntu hebאלפים אמה הנקרא מארטין, ושלשה ימים
4 errorsהחיינושם.OYheb_rivokאלפים אמה הנקרא מארטין, ושלשה ימים היינו שם.
✓
Ubuntu hebאלו מכון הבארבאריה לא יגן עליה בשפאים זקופים
✓heb_rivokאלו מכון הבארבאריה לא יגן עליה בשפאים זקופים
✓
Ubuntu hebבצלעו
4 errorsתז הים הסוגרים את מבואה ויהיולהםond למשמר, אלו מאתheb_rivokבצלעו
1 errorתז הים הסוגרים את מבואה ויהיו להם למשמר, אלו מאת
Ubuntu hebאלף גבורי חיל ומלומדי מלחמות אירופא ימצאו דרך לבא ורחב
✓heb_rivokאלף גבורי חיל ומלומדי מלחמות אירופא ימצאו דרך לבא ורחב
✓
Ubuntu hebמחנה להעריך מערכותיהם, לא אפ
1 errorוינה כי בימים מעטים תלכדנהheb_rivokמחנה להעריך מערכותיהם, לֹא אפ
2 errorsוינה כי בימים מעטים תלכדנה
Whole page ↗
Characters read wrong, whole page. Of its 37 lines, heb_rivok reads 24 better, 7 worse and 6 the same.
A real scan: Bostenay (Marcus Lehmann, Hebrew by S. Y. Fuenn), page 42, Vilna 1872. Public domain, via Wikimedia Commons (National Library of Israel scan). Correct text: Hebrew Wikisource, validated, CC BY-SA 4.0.
Ubuntu heb-2 4
2 errors2-heb_rivok
3 errors—_ 42%—_
Ubuntu hebהיום ההוא ירא ופח
5 errorsדר המלךמפניveo שירוהע, לא כהה בו ולא עצבו לבלי תתheb_rivokהיום ההוא ירא ופ
5 errorsחדתר המלך מפני שירוהע, לֹא כהה בו ולא עצבכו לבלי חתת
Ubuntu hebלו תואנה להרים בו י
12 errorsדר. דברי הימים לממשלתהפרסone מלאו. אשם מדמימריבותmaoheb_rivokלו תואנה להרים בו יד. דברי הימים לממשל
5 errorsתה פרסם מלאוי. אשם מדמי מריבכות
Ubuntu heb
10 errorsומרירותAID) כאלה, ועיניו ראו ולא זר כיאחיne אמו קמו על הארמוץ אביו,heb_rivokומרירות כאלה, ועיניו ראו ולא זר כי אחי אמו קמו על הארמוץ אביו,
✓
Ubuntu hebנתנוהו בכלא, עורו את עיניו אף יהמת המיתו
2 errorsהחו, למען הושיב על כסאוheb_rivokנתנוהו בכלא, עורו את עיניו אף יהמת המיתוהו, למען הושיב על כסאו
1 error
Ubuntu hebאת
17 errorsשארםWeאשרONY אהבו.,כזאתANID וכזאת נעשהבפרסOWI בימים מקדרם וגם בימיו,heb_rivokא
3 errorsתה שארם אשר אהבו. כזאת וכזאת נעשה בפרסם בימים מקדרם וגם בימיו,
Ubuntu hebומי יו
7 errorsדרע אם לא יקום בו גםשירוהעyay בנו, לנקום נקמת אמו, אם אךheb_rivokו
2 errorsמטי יודע אם לֹא יקום בו גם שירוהע בנו, לנקום נקמת אמו, אם אך
Ubuntu hebימצא לו י
7 errorsדרים לאמרכיtp איןכבבודויקרpy בעיני המלך, ואיננו דורשheb_rivokימצא לו ידים לאמר כי אין כבודו יקר בעיני המלך, ואיננו דורש
✓
Ubuntu hebדמו מידי בוסתנאי --- כ
5 errorsדרתי המלוכה. -- רצה כוסדרראי לשום נפש בוסתנאיheb_rivokדמו מידי בוסתנאי
3 errors—כדתי המלוכה. - רצה כוסדרראי לשום נפש בוסתנאי
Ubuntu hebבחיים למשוך אליו
8 errorsחסדton -- אך פחדר לבלי יהיה החהסדר הזה מוקש לנפשו.,heb_rivokבחיים למשוך אליו חסד — אך פ
3 errorsחדהר לבלי יהיה החסדר הזה מוקש לנפשו.
Ubuntu hebהמחשבות | האלה הרעימוהו החרידוהו, ובהלך נפשו הלך לראות את
2 errorsheb_rivokהמחשבות האלה הרעימוהו ה
3 errorsחהרידרוהו, ובהלך נפשו הלך לראות אתה
Ubuntu hebרעיתו שערהין המלכה לשפוך שיחו בחיקה. ובבואו אליה מצא את
1 errorדראראheb_rivokרעיתו שערהין המלכה לשפוך שיחו בחיקה. וב
3 errorsבכואוי אליה מצא אתדרארא
Ubuntu hebאצלה, מייללת ומיבבת
7 errors., ויהי אך ראתהדרארא את המלך ותמהרותפולSemheb_rivokאצלה, מייללת ומיבבת
1 error., ויהי אך ראתה דארא את המלך ותמהר ותפול
Ubuntu hebלר
3 errorsגנליו, והתרפק על ברכיו ותבך ותתחנן להמית גם אותה במות בוסתנאי ---heb_rivokלרגליו, והתרפק על ברכיו ותבך ותתחנן להמית גם אותה
2 errorsבכמות בוסתנאי—_
Ubuntu hebובמרי שיחה אמרה
2 errors"+אבי! מהחהטא בוסתנאי ומה עשה רעה? האםheb_rivokובמרי שיחה אמרה
3 errors"פאבכי! מהחהטא בוסתנאי ומה עשה רעה? האם
Ubuntu hebבגלל אשר גבורת צ
7 errorsדרקתו הרהיבתהו להציל אתכלתnds רעומידTO נבל ומרצחheb_rivokבגלל אשר גבורת צ
3 errorsדרקתו הרהיבכתהו להציל את כלת רעו מידר נבל ומרצח
Ubuntu heb
10 errorsיומתnor בוסתנאי? ולא עודר הלאמחץpmo שירוהע ירפא, | יקום ויחי, ונפשheb_rivokיומת בוסתנאי? ולא עו
1 errorדר הלא מחץ שירוהע ירפא, יקום ויחי, ונפש
Ubuntu hebבוסתנאי מי ישיב לי? וב
2 errorsדרברדרארא כזאת, נתנה קולה בבכי, וגם המלכהheb_rivokבוסתנאי מי ישיב לי? וב
1 errorדרבר דארא כזאת, נתנה קולה בבכי, וגם המלכה
Ubuntu hebשערהין הורי
6 errorsדרהדרמעה ותאמטר:אםON מצאתי חן בעיניך מלכי ואדרוני! חמולheb_rivokשערהין הורי
2 errorsדרה דמעה ותאמר: אם מצאתי חן בעיניך מלכי ואדרוני! חמול
Ubuntu hebעל העלם הזה למען בתי יחי
1 errorדרתי ולמעני אני רעיתך.heb_rivokעל העלם הזה למען בתי יחידתי ולמעני אני רעיתך.
✓
Ubuntu heb
7 errorsמןornהיוםjo אשר היתה שערהין אשה למלך לא מנע משאלותיה ממנהheb_rivok
2 errorsמטן היום אשר היתה שערהין אשה למלך לֹא מנע משאלותיה ממנה
Ubuntu hebאך עתה רעמו פניו ויאמר: אין לאל ידי להושיע. שבעת השרים הגדולים
✓heb_rivokאך עתה רעמו פניו ויאמר: אין לאל ידי להושיע. ש
1 errorבכעת השרים הגדולים
Ubuntu hebהיושבים ראשונה במל
11 errorsכבותחרצוwon משפטו למות. ואם אעשהעמוsonחסדvoyheb_rivokהיושבים ראשונה במלכות חרצו משפ
2 errorsטשו למות. ואם אעשה עמו חסדר
Ubuntu hebיקצוף עלי שירוהע קצף והדי
3 errorsתח עליו. רעה. ואל דארא פנה המלך וישאלheb_rivokיקצוף עלי שירוהע קצף וה
3 errorsדריתח עלי. רעה. ואל דארא פנה המלך וישאל
Ubuntu hebואת דארא
5 errorsהאםONT כן גדלה אהבתך את בוסתנאי, את | הנער העברי הזה?heb_rivokואת דארא האם כן גדלה אהבתך את בוסתנאי, א
1 errorתה הנער העברי הזה?
Ubuntu heb
8 errors"פאהבתי את בוסתנאי בכל לבבי ובכל נפשי"> ענתהדאראRINT,"נעימהheb_rivok
8 errors"עאהבכתי את בוסתנאי בכל לבבכי ובכל נפשי"c ענתהדרארא"נ,געימה
Ubuntu hebלי אהבתו מאור השמש".
✓heb_rivokלי אהבתו מאור השמש".
✓
Ubuntu heb
14 errors"הידעת?דרארא לא תוכל להיות לו לאשה כל ימיך?Ay Treheb_rivok
3 errors"יהידרעת דארא לא תוכל להיותה לו לאשה כל ימיך?
Ubuntu heb
3 errors",ידעתי גם ידרעתי" ענתהה דארא אך בכל זאת את חיי והצלחתיheb_rivok
5 errors"ידרעתי גם ידרעתי״ ענתהה דארא אך בכל וזאת את חיי והצלחתי
Ubuntu hebאתן בעד חייו והצל
8 errorsחהתו., העלםס העברי הזה יפה כחהמה,חכםOSM מכל אדרם,heb_rivokאתן בעד חייו והצל
4 errorsחהתו. העלם העברי הזה יפה כחהמה, חכםס מכל אדרם,
Ubuntu hebנדיב לב ויקר רוח אין בבני תמותה משלו
1 error";. ותוסף לבכות בכי גדול.heb_rivokנדיב ל
4 errorsבכ ויקר רוח אין בבכני תמותה משלו"._ ותוסף לבכות בכי גדול.
Ubuntu heb
4 errors"כ,בנים דבריך"* ענה המטלך, העלם הזה, נבון וחכם, יקר רוח, ונפשheb_rivok
2 errors"כנים דבריך״ ענה המטלך, העלם הזה, נבון וחכם, יקר רוח, ונפש
Ubuntu hebנ
10 errorsדריבה, גם אנכי אהבתיו מאדר, ויקר וחביב.הואWIN בעינימבניID שירוהע,heb_rivokנ
3 errorsדריבה,גנם אנכי אהבתיו מאדר, ויקר וחביב הוא בעיני מבני שירוהע,
Ubuntu hebאשר אנכי ירא אותו כאת שונאי הגדול, וגם את דארא בתי אוהבת
✓heb_rivokאשר אנכי ירא אותו כאת שונאי הגדול, וגם את דארא בתי אוהבת
✓
Ubuntu hebא
8 errorsויתו, ושערהין מחמטלעיני,jy תתחנן בעדו. ומלבדר כל זאת הלא נשבעתיheb_rivokא
3 errorsויתוי, ושערהין מחמל עיני, תתחנן בעדו. ומלבדר כל זאת הלא נשבעתי
Ubuntu hebלש
15 errorsמטור אתוכבבתnas. עיני — ומי יתןאוכלSaw ואושיעו.,עתהany לכבנה עמטי הבוheb_rivokלשמור אתו כבבת עיני
3 errors—ומי יתן אוכל ואושיעו., עתה לכנה עמי הבו
Ubuntu hebואנסה אליו דבר, אולי או
1 errorכבל למלט נפשו.heb_rivokואנסה אליו
1 errorדרבר, אולי אוכל למלט נפשו.
wrong or extra missing typographic variant, not counted Spaces before punctuation are not counted either: old print sets one before every comma, modern transcriptions don't.
Against what you have, and against where it started
Almost everyone who runs Tesseract on Hebrew uses the same model: Google's small "fast"
heb, the file Ubuntu, Debian and Homebrew install and the OCRmyPDF and
Paperless-ngx Docker images include. So the first comparison is the file you have against
the file you can download.
| Test | Ubuntu heb | heb_rivok |
|---|---|---|
| 403 lines from real documents, Hebrew only | 4.7% | 1.4% |
| The same, lines with numbers | 4.5% | 1.6% |
| GlotOCR-bench Hebrew, clean images (many with niqqud) | 21.2% | 18.5% |
| GlotOCR-bench Hebrew, "old document" images | 34.0% | 30.1% |
| HaZefira newspaper, 1874/1887: 4,013 lines | 17.5% | 9.9% |
| HaZefira: 34 pages, words found (higher is better) | 67.6% | 81.3% |
| HaZefira: 34 pages, words wrong or out of reading order | 47.9% | 32.3% |
| 209 lines mixing Hebrew and English | 19.3% | 14.0% |
| Our seven example documents | 4.5% | 1.0% |
But heb_rivok does not start from that model. It starts from Google's
biggest Hebrew model, script/Hebrew, which also reads English, so part of
the gain could simply be the bigger model. The second table isolates our training: the
same network with the same starting weights, before and after fine-tuning, both in full
precision.
| Test | Google script/Hebrew | heb_rivok (full precision) |
|---|---|---|
| 403 lines from real documents, Hebrew only | 4.0% | 1.4% |
| The same, lines with numbers | 3.5% | 1.6% |
| GlotOCR-bench Hebrew, clean images (many with niqqud) | 20.7% | 18.0% |
| GlotOCR-bench Hebrew, "old document" images | 31.8% | 29.5% |
| HaZefira newspaper, 1874/1887: 4,013 lines | 14.3% | 9.9% |
| HaZefira: 34 pages, words found (higher is better) | 75.5% | 81.2% |
| 209 lines mixing Hebrew and English | 16.4% | 14.2% |
Character error rate unless marked: the share of characters read wrong, missed or added;
lower is better. "Words found" is word F1 against the page's own text. Line tests use
--psm 13, pages Tesseract's default. Ubuntu's heb runs with
+eng on pages and mixed lines. The download is the int8 file, the same type
as Ubuntu's; the full-precision file is in the release for anyone who wants to fine-tune
further.
The same recipe on Tesseract's standard Hebrew model
Before moving to the bigger model, we fine-tuned Google's standard Hebrew model,
tessdata_best heb. Its third round beats both stock Hebrew models on every test,
so we are releasing it too, as heb_rivok_lite. It is smaller and faster, and
needs +eng for English.
| Test | Ubuntu heb | tessdata_best heb | heb_rivok_lite |
|---|---|---|---|
| 403 lines from real documents, Hebrew only | 4.7% | 4.0% | 1.9% |
| The same, lines with numbers | 4.5% | 4.3% | 1.6% |
| GlotOCR-bench Hebrew, clean images (many with niqqud) | 21.2% | 24.6% | 20.6% |
| GlotOCR-bench Hebrew, "old document" images | 34.0% | 33.5% | 32.3% |
| HaZefira newspaper, 1874/1887: 4,013 lines | 17.5% | 17.7% | 14.1% |
| HaZefira: 34 pages, words found (higher is better) | 67.6% | 69.7% | 76.6% |
GlotOCR-bench (LMU Munich) and HaZefira (Open University of Israel) are public: anyone can rerun them, and our scripts are in the repository. The other sets are ours. The 403 lines are cut from real documents whose owners did not agree to publication, so they stay private. None of the test images were used in training.
No real documents, only realistic damage
The model never saw a real document in training. Every training image is a line we generated: 60,000 of them, from Tesseract's own Hebrew training text and from lines we wrote to look like documents: prices in ₪, dates, phone numbers, abbreviations such as ש״ח and עו״ד, Hebrew with English terms, web addresses and citations.
Each line is drawn in one of 50 open fonts and then damaged the way paper gets damaged: blur, low resolution, noise, JPEG, speckles, binarisation, letterpress ink, a slight tilt, underlines, and slivers of the neighbouring lines. Tesseract's own training tool then continues training Google's model on those images. That is a fine-tune, not a new model, and it took about two and a half hours on an ordinary 4-core CPU.
Tesseract's training files store a line in the order it is drawn on the page, not the order it is read. For Hebrew with English or brackets inside, that order is easy to get subtly wrong, and the model faithfully learns the mistake. Our first round learned to flip brackets. Getting those labels right was half the work.
Round 1: new characters
Google's standard Hebrew model, taught maqaf ־, geresh ׳ and gershayim ״, which the stock models cannot output. Better on numbers, but the bracket labels were wrong.
Round 2: realistic damage
Labels fixed; neighbouring lines, underlines and old letterpress print added. Errors on real lines fell by more than half, but it got worse on text with niqqud (vowel marks): a filter had dropped most training lines that had them.
Round 3: niqqud kept →
heb_rivok_liteThe lines with niqqud restored. Better than both stock Hebrew models on every test.
Round 4: the bigger model →
heb_rivokStarted from Google's
script/Hebrew, which already reads English, and added Hebrew lines with English inside. Best on every test.
What it still gets wrong
Pages with more than one column: fixed in version 1.0.1
Tesseract decides whether a model reads right to left by counting its characters.
heb_rivok knows the 52 English letters, and version 1.0 had only 33 Hebrew
characters, so Tesseract laid its pages out left to right and read the left column of a
page first. Version 1.0.1 adds 23 Hebrew characters the model never outputs. The network is
unchanged and reads exactly the same text, and the columns now come out right to left. On
34 pages of a 19th-century newspaper, counting words in reading order, 32% are wrong or out
of place, against 88% for version 1.0 and 48% for Ubuntu's heb. Still on 1.0?
Download the new file, or use -l heb+heb_rivok.
Short lines that mix Hebrew and English
When Tesseract reads a line on its own (--psm 7 or 13), or a
short line forms its own paragraph on a page (a heading, a table cell), it picks the
line's direction by counting words, and a tie goes to left-to-right. A short Hebrew line
holding as many English words as Hebrew ones then comes out with the English first, as
in the line below. That is Tesseract's code, not the model: Google's own models do the
same, and we have reported it upstream
(tesseract#4680). Long paragraphs are not affected. On 209 real mixed lines
the error rate is 14.2% as Tesseract orders the words and 4.9% with the same words put
back in right-to-left order.
-
Correctהרצאה על Machine Learning
heb_rivok, one lineהרצאה עלMachine Learning הרצאה עלpaddleocr-hebrewהרצאה על Machine Learning
If your documents are full of such lines, try
paddleocr-hebrew, our
deep-learning Hebrew OCR. It assembles each line in Hebrew reading order: 3.6% on the same
209 lines. It is a heavier pipeline and much slower on a CPU: about 55 seconds per
page against 6.4 for heb_rivok on a 4-core desktop. On an NVIDIA GPU it is
fast. On old print the two are level (9.9% each on the HaZefira lines).
Everything else
- Line crops: use
--psm 13, not--psm 7. Tesseract's line finder throws away crops with an underline or with pieces of the neighbouring lines before the model sees them. - Niqqud (vowel marks): the 12 common marks are read; cantillation marks (טעמים) are not.
- Not trained for: Rashi script, handwriting, decorative display fonts.
- Speed: the bigger network costs time. About a quarter of a second per
line against under a tenth for Ubuntu's
heb; on whole pages 6.4 against 5.2 seconds.heb_rivok_literuns at the standard model's speed.
One file, no new software
| File | Use | Size |
|---|---|---|
| heb_rivok.traineddata | Hebrew + English + digits. Start here. | 5.7 MB |
| heb_rivok_lite.traineddata | Hebrew + digits, faster. Use with +eng. | 3.4 MB |
| tessdata_best/… | Full-precision versions of both, for your own fine-tuning | 12.3 / 6.0 MB |
# download, then compare with the SHA-256 on the release page
sha256sum heb_rivok.traineddata
# copy it next to Tesseract's other models
# (tesseract --list-langs prints the folder)
sudo cp heb_rivok.traineddata /usr/share/tesseract-ocr/5/tessdata/
tesseract page.png out -l heb_rivok
ocrmypdf -l heb_rivok scanned.pdf searchable.pdf
Version 1.0.1: pages with columns now come out right column first; the text it reads is unchanged from 1.0.
Apache-2.0. Built on Google's tessdata_best models and Tesseract's training text, both Apache-2.0. The training scripts and the full recipe are in the repository. Questions or collaboration: open an issue or write to [email protected].
Common questions
Do I still need +eng?
Not with heb_rivok: English is in the model, and adding eng only
slows it down. heb_rivok_lite is Hebrew only, so use
-l heb_rivok_lite+eng when your documents contain English.
Which one should I use?
heb_rivok is the more accurate on every test. Choose
heb_rivok_lite when speed matters more, for example when reading many single
lines.
heb_rivok or paddleocr-hebrew?
heb_rivok if you already use Tesseract or OCRmyPDF and want one file that drops
in. paddleocr-hebrew if you need mixed Hebrew and English
lines in the right order, or receipts, and can afford a slower pipeline or have a GPU.