Open arsinclair opened 4 months ago
eng.traineddata was not trained with diacritics (see https://github.com/tesseract-ocr/langdata_lstm/blob/main/eng/eng.unicharset) and therefore cannot recognize them.
Latin.traineddata was trained with some diacritics (see https://github.com/tesseract-ocr/langdata_lstm/blob/main/script/Latin/Latin.unicharset) and therefore works better with your text. As far as I see "ő" is missing in its supported characters.
So your results are expected with the given models, and it's not a Tesseract issue.
"ő" is included in hun.traineddata, so you could try Latin+hun, but training a new model would be better.
"ő" is included in hun.traineddata, so you could try Latin+hun, but training a new model would be better.
Tried with Hungarian and Latin too, didn't always work. And if training the new model is the only way forward, I'll have to do it myself, or it can be added to the existing Tesseract models?
@arsinclair , your question is a bit vague.
You can always take an official model (eng.traineddata
file) and finetune it for new characters. You can tell tesseract to use your model instead of the conventional one. I am doing this way.
If you want to publish your model for the world, you will have to talk tesseract maintainers.
Tesseract for English is aware only a few diacritics. I find the choice of the latter weird but this is the reality.
Current Behavior
I'm using Tesseract indirectly as part of OCRmyPDF and I'm coming here from this issue.
When OCR'ing English (Latin) text with diacritics it doesn't always recognise them. The diacritics in my document are part of surnames originating from Hungary and Belgium.
I've tried with just English, English + Hungarian dictionaries, also tried with Latin script (which has extended character map) to no avail.
The words:
poéme
,pathétique
,animé
are recognised.The words:
Ysaÿe
,Jenő
,Petőfi
, etc. are not recognised.The words
csárdás
,Telmányi
,Dvořák
are recognised only with Latin script.Expected Behavior
The diacritics should be recognised.
Source files
![000001_ocr](https://github.com/tesseract-ocr/tesseract/assets/2878904/6b16a7a3-c520-4787-b6a0-370901979bf7) ![000004_ocr](https://github.com/tesseract-ocr/tesseract/assets/2878904/27f9fb44-7f32-4de7-9668-a3cd780b246b) ![000005_ocr](https://github.com/tesseract-ocr/tesseract/assets/2878904/c0eb3b7e-940b-4d6c-bd83-5033d5805c1c) ![000002_ocr](https://github.com/tesseract-ocr/tesseract/assets/2878904/8bec3994-8530-4cba-8590-3d8d4414a123) ![000003_ocr](https://github.com/tesseract-ocr/tesseract/assets/2878904/aa9c950d-d572-4861-b870-f5e60acdd102)tesseract -v
Operating System
Debian Testing (Bookworm)
uname -a