Glyphwise OCR recognition models are trained on the sources below. No training data is included in the distribution; this file records provenance and the attributions the data licences ask for.
Text and documents
- Project Gutenberg texts (public domain in the United States): sentences for rendered training lines and the language model. Project Gutenberg trademarks and boilerplate are stripped and not used.
- US federal government documents (public domain under 17 U.S.C. 105): IRS forms, instructions and publications; the Federal Register; NIST and GPO publications; Supreme Court opinions; public laws, House bills, the Code of Federal Regulations and the US Code. Their text layers label line images rendered from the PDFs (
tools/pd_sources.txt,tools/pd2_sources.txt). - European Union legislation (EUR-Lex / Publications Office of the European Union): sentences from EU acts in English, French, German, Spanish, Italian, Portuguese and Dutch for rendered training lines, and the text of EU acts in Polish, Czech, Slovak, Hungarian, Swedish, Danish, Finnish, Estonian, Latvian, Lithuanian, Slovenian, Croatian, Romanian, Maltese and Irish for those languages' language models. Line images labelled from the text layers of EU acts in these 22 languages (
prep_lines pdf; none of the test acts) train the reading model from 1.3. © European Union, https://eur-lex.europa.eu. Reuse is authorised under Commission Decision 2011/833/EU, provided the source is acknowledged.
- Official legal texts of Turkey, Norway, Iceland and Spain (from 1.4): line images labelled from the text layers of published laws and regulations (
prep_lines pdf), and their text for the language models of Turkish, Norwegian Bokmål, Icelandic, Catalan and Galician (sources and checks:tools/lat2_sources.txt):- Turkish: Resmî Gazete (Official Gazette of the Republic of Turkey), https://www.resmigazete.gov.tr. Officially published laws, regulations, communiqués, circulars and court decisions may be freely reproduced, distributed and used (Law No. 5846 on Intellectual and Artistic Works, Article 31).
- Norwegian: law decisions (lovvedtak) of the Storting, https://www.stortinget.no. Laws, regulations and other decisions of public authorities are not protected by copyright (Norwegian Copyright Act 2018, section 14).
- Icelandic: Stjórnartíðindi (Government Gazette of Iceland), Part A, https://island.is/stjornartidindi. Laws, regulations and similar official texts are not protected by copyright (Icelandic Copyright Act No. 73/1972, Article 9).
- Catalan and Galician: the Catalan and Galician language supplements of the Boletín Oficial del Estado. Fuente de los datos: Agencia Estatal Boletín Oficial del Estado, https://www.boe.es. Legal provisions and their official translations are not protected (Spanish Intellectual Property Act, Article 13); reused under the BOE reuse conditions.
- Acts of Senedd Cymru and of the National Assembly for Wales, Welsh-language texts, from legislation.gov.uk (from 1.4): line images and text for the Welsh language model. Contains public sector information licensed under the Open Government Licence v3.0, https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/.
- Greek and Bulgarian EU acts (EUR-Lex, as above; from 1.5, in the accurate model): line images labelled from the text layers of EU acts in Greek and Bulgarian.
- Chinese official documents (from 1.5, in the accurate model): text of the Gazette of the State Council and of the Standing Committee of the National People's Congress and of other official documents of state organs, as transcribed on Chinese Wikisource (https://zh.wikisource.org; gazette transcriptions and pages marked PD-PRC-exempt only). Laws, regulations, resolutions, decisions and orders of state organs and other documents of a legislative, administrative or judicial nature, and their official translations, are not protected (Copyright Law of the People's Republic of China, Article 5). The text was typeset into training pages; it also builds the Chinese language model.
- Russian and Ukrainian texts (from 1.5, in the accurate model, rendered as training lines): public-domain works from Russian and Ukrainian Wikisource (https://ru.wikisource.org, https://uk.wikisource.org; pages under public-domain licence templates only), and Ukrainian texts from PluG (Corpus of Ukrainian texts), Zenodo, https://zenodo.org/records/19482961, licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Text was cut into lines, sampled and shuffled.
Handwriting (Creative Commons Attribution 4.0, https://creativecommons.org/licenses/by/4.0/)
- GNHK — GoodNotes Handwriting Kollection. GoodNotes, A. W. C. Lee, J. Chung, M. Lee: "GNHK: A Dataset for English Handwriting in the Wild", ICDAR 2021.
- Transcriptorium / Bentham — line images and transcripts from the Bentham Papers (UCL Transcribe Bentham), as released by the tranScriptorium/READ projects.
- READ datasets (Zenodo) — "ICDAR 2017 Competition on Handwritten Text Recognition on the READ Dataset" (Train-A) and the READ Bozen/Bolzano dataset.
Handwriting (public domain)
- Library of Congress, "By the People" — page images of 19th-century and earlier manuscript collections (public domain in the United States) with volunteer transcriptions released under CC0 1.0. Lines were cut from the pages and labelled with the transcriptions (
tools/btp_fetch.py,align_btp). Courtesy of the Library of Congress, Manuscript Division; collections include the Abraham Lincoln Papers, the Susan B. Anthony Papers, the Elizabeth Cady Stanton Papers, the Blackwell family papers, the Anna E. Dickinson papers, the George Washington Papers, the Wm. Oland Bourne Papers, the Gladstone Afro-American military collection and "Women and the American Civil War".
Line images from these datasets were cropped, normalized and augmented for training; the datasets themselves are not redistributed.
Fonts
Synthetic training lines are rendered from font files. The models shipped with the product (line_clean1m, and line_clean1c, line_clean1b and line_clean1 before it; the handwriting model line_clean2j, and line_clean2h before it) were rendered only from the Google Fonts collection (its ofl/, apache/ and ufl/ folders: fonts under the SIL Open Font License 1.1, the Apache License 2.0 and the Ubuntu Font Licence 1.0), which permit use of the fonts for any purpose. The accurate model from 1.5 (line_zhlat1, and the models it was trained from) was also rendered from OCR-B (Matthew Skala's version, tsukurimashou.org/ocr.php: public domain, derived from Norbert Schwarz's Metafont released for unrestricted use) and from static instances of Noto Sans SC and Noto Serif SC (Google Fonts, SIL Open Font License 1.1, which permits modified versions) made with fontTools. Chinese test documents were typeset in fonts installed with Windows; those were used only to measure and to choose between checkpoints, never as training lines. Development models have also been trained on other fonts (for example those installed with Windows) and must not be distributed.
Font licences differ in whether rendering a font to train a model is permitted; review the licences of the fonts used before distributing any other model commercially.