Languages
Every language it reads, measured.
29 languages have their own language model, which corrects likely misreadings with that language's spelling: every EU language written in the Latin alphabet, plus Turkish, Norwegian, Icelandic, Catalan, Galician, Welsh and, new in 1.5, Chinese (Simplified). Other Latin-alphabet languages are read without one. We measured each of them on official legal texts: EU laws, which are published in every EU language, and for the six newest, laws and gazettes of Turkey, Norway, Iceland, Spain and Wales.
28 Latin-alphabet languages, each with its own model
Pick the language, and the spelling follows.
Character errors on 500 lines per language: 100 from each of five EU regulations and directives, rendered at 300 dpi, the PDF's own text as ground truth. None of these documents was used in training.
| Language | Code | 1.4 | 1.3 | Lines without an error (1.4) | |
|---|---|---|---|---|---|
| Englishthe default | en | 0.21% | 0.21% | 91% | demo |
| FrenchFrançais | fr | 0.82% | 0.83% | 68% | demo |
| GermanDeutsch | de | 0.16% | 0.16% | 94% | demo |
| SpanishEspañol | es | 0.23% | 0.23% | 95% | demo |
| ItalianItaliano | it | 0.60% | 0.60% | 65% | demo |
| PortuguesePortuguês | pt | 0.17% | 0.24% | 92% | demo |
| DutchNederlands | nl | 0.15% | 0.15% | 91% | demo |
| PolishPolski | pl | 0.19% | 0.20% | 93% | demo |
| CzechČeština | cs | 0.33% | 0.33% | 87% | demo |
| SlovakSlovenčina | sk | 0.33% | 0.36% | 85% | demo |
| HungarianMagyar | hu | 0.06% | 0.07% | 96% | demo |
| SwedishSvenska | sv | 0.35% | 0.36% | 93% | demo |
| DanishDansk | da | 0.16% | 0.20% | 89% | demo |
| FinnishSuomi | fi | 0.38% | 0.40% | 90% | demo |
| EstonianEesti | et | 0.32% | 0.33% | 87% | demo |
| LatvianLatviešu | lv | 0.24% | 0.25% | 90% | demo |
| LithuanianLietuvių | lt | 0.28% | 0.28% | 89% | demo |
| SlovenianSlovenščina | sl | 0.16% | 0.17% | 90% | demo |
| CroatianHrvatski | hr | 0.14% | 0.14% | 91% | demo |
| RomanianRomână | ro | 0.26% | 0.34% | 86% | demo |
| MalteseMalti | mt | 0.88% | 0.87% | 52% | demo |
| IrishGaeilge | ga | 0.11% | 0.13% | 90% | demo |
| TurkishTürkçe · new in 1.4 | tr | 0.34% | 1.47% | 82% | demo |
| NorwegianNorsk (bokmål) · new in 1.4 | nb | 0.31% | 0.41% | 88% | demo |
| IcelandicÍslenska · new in 1.4 | is | 1.08% | 1.14% | 88% | demo |
| CatalanCatalà · new in 1.4 | ca | 0.88% | 1.07% | 80% | demo |
| GalicianGalego · new in 1.4 | gl | 0.67% | 0.94% | 91% | demo |
| WelshCymraeg · new in 1.4 | cy | 0.95% | 0.95% | 84% | demo |
Character errors with each language's own model, measured with the 1.4 download and, for comparison, with 1.3 (same language models; for the six languages new in 1.4, the 1.3 reading model was given their new language models). The 1.4 reading model was trained further on other documents in these languages; for the six newest, test lines are 100 from each of five held-out laws or gazette issues. Lines with the rare Welsh letters ẁ ẃ ẅ ỳ are not in the test. Irish and Romanian: 400 lines (one of the five laws has no Irish version; for Romanian, one gave no usable lines). Romanian ș and ț are read as ş and ţ and count as errors. Source: EUR-Lex, © European Union.
New in 1.5
Chinese (Simplified).
Printed Chinese is read by the accurate model, with its own language model: --lang zh,
?lang=zh, or Chinese in the desktop language menu. With auto, a page the fast
model cannot make sense of is read again by the accurate model and kept when it turns out to be Chinese.
Character errors on Chinese pages
115 pages of 40 held-out government documents, typeset in SimSun and Microsoft YaHei, fonts not used in training. Shorter is better.
The page's own text is the ground truth. These are clean, born-digital pages; scans and photos of Chinese documents have not been measured yet.
What it reads
Scope of the first version.
- The 6,763 characters of GB 2312 and Chinese punctuation, mixed with Latin letters and digits.
- Horizontal text. Vertical text (columns read top to bottom) is not read yet.
- Simplified characters. Traditional characters are not read yet.
- About 2.9 s for one page, 1.1 s per page in a batch (Speed).
Choosing the language
Name it, or let Glyphwise decide per page.
With auto, each page is read once, the language model that fits that reading best is
chosen, and the page is finished with it. The JSON output records which one it picked.
Desktop window
The Language menu: one of the 29, or Automatic.
Language: Automatic
Command line
One language for the run, or auto for mixed folders.
glyphwise models\line.bin brief.pdf --lang fr glyphwise models\line.bin inbox --lang auto
HTTP service
Per request; /health lists the languages loaded.
curl --data-binary @scan.pdf ^ "localhost:8080/ocr?lang=auto"
Library
Per call, in every wrapper.
doc = ocr.read("scan.pdf", lang="de")
Other languages in Latin letters
No model of its own? Read it without one.
Almost every letter of the Latin alphabet's languages is in the character set (below). For a
language without its own model, read with --lang none (HTTP ?lang=none): another
language's model would “correct” words it does not know towards its own spelling. In 1.2.1 the 15
languages added above were read with the English model, at 2.6–10.3% character errors; without any model
they had 1.0–9.6%.
The character set
Every letter it can read.
A to Z, digits and punctuation, plus these 193 accented and special letters (Unicode Latin-1 and Latin Extended-A), the euro sign, curly quotes, dashes and the ellipsis.
ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞß àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ
ª º µ € “ ” ‘ ’ « » – — … • § ¶ ° ± £ ¥ ¢ © ®
Not in the current release
What it does not read yet.
Other alphabets
Greek, Cyrillic, Arabic, Hebrew, Chinese, Japanese, Korean, Indic and Thai scripts.
Some Latin letters
Romanian ș and ț with a comma below (read as ş and ţ with a cedilla), and the letters of Vietnamese, Azerbaijani and a few African languages.
Handwriting beyond English
The handwriting model is trained and measured on English handwriting. It reads other Latin-alphabet hands, but we have not measured how well.
Need a language that is missing? Tell us: requests decide what comes next.
Try it on documents in your language.
The free trial includes every language model.