Tools,

Tesseract and Turkish: eng gets half the words wrong

97%

of Turkish letters right with -l tur

Get the code

One flag: 0.4% to 97.3%

Proofread pages from 15 scanned Turkish books and documents, dated 1934 to 2019:

Model Turkish
letters right
Words right
-l eng, the default 0.4% 51.5%
-l tur 97.3% 96.0%

94.4% of letters right with eng, marks aside

48.5% of words wrong with eng

Turkish letters here means ç, ğ, ı, ö, ş, ü, â, î and û. eng finds the letters, but its model has none of them. It prints ı as i, ş as s and ğ as g, and sometimes ü as ii.

What eng does to Turkish words

Real words from these scans. Each time, tur read it right:

Printed eng read Times
için icin 38
hakkında hakkinda 23
tarafından tarafindan 23
türk tiirk 23
bütün biitiin 22

için came out wrong on 22 of 30 pages.

The dotless ı is 2,601 of the 6,406 Turkish letters here. eng printed 1,764 of them as i.

tur cannot print î or û

Each letter group, read right by tur:

Letters On the pages tur right
ç ğ ı ö ş ü 6,112 98.9%
â 193 99.0%
î 79 0%
û 22 0%

The tur model has no î or û, so millî comes out as milli. Older print uses them: î was on 15 of 30 pages. Search for them when you proofread.

Install tur, then pass -l tur

This writes page.txt:

tesseract page.png page -l tur

In Python:

import pytesseract

print(pytesseract.image_to_string("page.png", lang="tur"))

Bigger models gain little, mixes lose letters

Each against plain tur, which took 0.8 seconds a page:

Setting Turkish
letters right
Sec a page
tur from tessdata_best 97.5% 1.7
-l tur+eng 96.0% 1.1
-l eng+tur 95.8% 1.1
script/Latin, for all Latin-alphabet languages 93.6% 1.6

script/Latin is the only one with î and û. It read 65 of the 101, but it missed 281 dotless ı, so it lost overall.

How I tested it
  • Pages: tr.wikisource scans whose text was proofread (level 3) or also checked by a second person (level 4). Books picked by a seeded shuffle, not by me, 2 pages a book. Pages with notes, poems, tables or columns were skipped.
  • Ottoman Turkish scans were left out. The wiki gives their Arabic script in Latin letters, which is not the text on the scan. A check that eng finds 80% of the wiki's letters on the scan dropped 17 such pages from 8 books.
  • Files saved from a word processor were left out. A PDF page counts only when one scanned image covers it.
  • 30 pages, 59,760 letters, 6,406 of them Turkish letters.
  • Dates come from the files' Wikimedia Commons pages. 11 of 15 give one.
  • Each scan is the wiki's page image: 12 at 1,920 px, 4 at 1,280 px, 14 at 960 px, never wider than the scan itself.
  • Lower case is Turkish lower case on both sides: I is ı and İ is i. Running heads and page numbers cost nothing.
  • Tesseract 5.5.4, one thread. Models from tessdata_fast 4.1.0, the files Homebrew installs, and tessdata_best 4.1.0.

Our Actor has no Turkish option

Our Apify Actor reads scans with Tesseract too, but its Language input has no Turkish. It starts at English. On these 30 scans, live build 0.1.44:

4.5% of Turkish letters right, left at English

53.2% of words right

German came closest: 61.3% of Turkish letters, 72.4% of words. It has ı, ö and ü, but no ç, ğ or ş. For Turkish scans, use plain Tesseract with -l tur.

What I did not test
  • Phone photos, faxes, and scans under 960 px wide.
  • Ottoman Turkish in Arabic script. The check above left those pages out.
  • Handwriting. See this test.
  • Other languages. German, French and Vietnamese have their own tests.
  • Windows and Linux. One Mac.
Sources

Two ways to skip the work

Run it yourself. Our Apify Actor turns scanned PDFs into Markdown, tables included.

Try the Actor

Or send us the scan. Tack, our AI, does the job for $29, up to 50 pages. First page free.

Get one page free

Questions people ask

Does Tesseract read Turkish?

Yes, with the tur model. On 30 proofread scans it read 97.3% of the Turkish letters right. The default eng read 0.4%.

Why does Tesseract print i instead of ı?

It runs with eng, the default, and eng has no ı. On these scans eng printed ı as i 1,764 times. Pass -l tur.

Can Tesseract read î and û?

Not with tur: its model has no î or û. script/Latin has both and read 65 of 101, but it read fewer of the other letters.