זיהוי טקסט עברי, פתוח לכולם

HeOCR

Open data, tools and models for reading Hebrew documents, both printed and handwritten. Every dataset item has its own rights record, and everything is published under open licences.

Public-domain scans & text → Generators → Datasets → Trained models

Reading real printed books

Old printed Hebrew is where open OCR is weakest. We pair public-domain scans of a book with Project Ben-Yehuda's typed text of the same edition. That gives exact line-level training examples from real pages. Scans come from the National Library of Israel's free-use collection and from public-domain scans on the Internet Archive and Wikimedia Commons. Every published line will keep its source record and its rights justification.

R7 · Tesseract fine-tune, more books

Same recipe as R6, on 95k real lines from 30 public-domain books: 7 National Library of Israel scans and 23 university-library scans on the Internet Archive. It reads single lines better than R6, with about a quarter fewer character errors on held-out books. On the same 38 pages, page-level error is a tie with R6: 20.9% character error and 39.3% word error, against 22.6% and 47.3% for stock Tesseract. R6 remains valid. Use -l heocr_r7.

Apache-2.0Tesseract 5

R6 · Tesseract fine-tune

Google's open tessdata_best Hebrew model, fine-tuned on 13.6k real lines from National Library of Israel scans. We scored it on 38 real book pages with human-checked text (Hebrew Wikisource): 20.9% character error, against 22.6% for stock Tesseract, and 40.7% word error against 47.3%. That is a real gain, but a small one. Use it as a drop-in replacement for Tesseract's heb: -l heocr_r6.

Apache-2.0Tesseract 5

Real-scan line data

Line images from real scans, each paired with its edition text. Each line records its book, scan record, source library and rights justification, so any item can be traced or removed.

CC0in preparation

Models

A three-step kraken pipeline for modern Hebrew document pages: find the lines, put them in reading order, then read them. These are research baselines trained only on synthetic pages. On real scanned print they are much weaker; the real-book work above addresses this.

R4d · Segmentation

Finds text-line baselines and polygons, plus eight region types such as title, body, stamp, signature and table cells.

Apache-2.0kraken 7

A1 · Reading order

Orders a page's lines using each line's position and region type.

Apache-2.0kraken 7

R3h · Recognition

Reads printed and handwriting-style Hebrew lines, including digits, Latin letters and punctuation.

Apache-2.0kraken 7

Datasets

Each dataset is built only from material that can be redistributed and reused, including for machine learning. Rights are recorded for each item, not assumed for a whole collection.

HASH

Hebrew Archive of Scanned Handwriting: scanned handwritten Hebrew-script documents from the 18th century onward, including letters, notebooks, drafts and forms.

198 scans48 sourcesmetadata CC0

htext

Public-domain Hebrew text for training, starting with lines from Project Ben-Yehuda works, plain and with niqqud. Each work is flagged as public domain in Israel and/or the US.

hletterscript

Cropped handwritten Hebrew letters, grouped by writer and taken from public-domain scans. Used to make synthetic handwriting.

seed setmetadata CC0

HeOCR & HeOCRsynth

The main OCR/HTR datasets: one mixing real and synthetic pages, and one synthetic only. Both are exported by hocrgen once its release checks pass.

in preparation

Sources & credit

We use public-domain works only, and each item keeps its source and credit. See rights & takedown for how rights are checked.

National Library of Israel

Scans of public-domain books from its "public domain, free use" collection. Credited on every item as "From the collections of the National Library of Israel / מאוסף הספרייה הלאומית", with the record number.

Internet Archive & Wikimedia Commons

Public-domain book scans made by university libraries, such as the University of Toronto, and by Google for libraries. Each item keeps its identifier, who scanned it and its rights evidence. Google's cover pages and watermarks are removed.

Project Ben-Yehuda

Volunteer-typed, public-domain texts of the same editions. They supply the exact text for each scanned line, and the training text for synthetic pages.

Hebrew Wikisource

Proofread transcriptions of scanned pages. We use them for evaluation, with each page checked by a human. Their text is CC BY-SA.

Generators & pipelines

The code that builds the datasets and trains the models. All of it is MIT-licensed.

hocrsyngen

Synthetic Hebrew page generator. It renders printed and handwriting-style pages, with line annotations and right-to-left metadata, from CC0 training text and open fonts.

PythonMITtext CC0

hletterscriptgen

Extracts per-writer letter sets from HASH scans and human-reviewed glyph annotations.

PythonMIT

hocrgen

Dataset operations and release checks: acquisition, rights, review, deduplication, splits, benchmarks and export to the public datasets.

PythonMIT

heocr-engine

Training, evaluation and release code for the models above, plus a local Tesseract baseline with a reproducible prediction format.

Pythonkraken