mYnDstrEAm
mYnDstrEAm

Reputation: 789

How to make use of all available languages in tesseract?

I'd like to create a simple WPF program for OCR scanning with tesseract in which the user can choose the language/s to scan with.² Now for some reason tesseract expects there to be a tessdata folder with the language files directly in it instead of the language subfolders.

using (var engine = new TesseractEngine(@"./tessdata", "deu", EngineMode.Default))

doesn't work if the deu files aren't located directly in the tessdata folder - neither does it work when using @"./tessdata/deu".

It only works when having the language file located directly in the tessdata folder (also in the project-structure).

How to properly make use of all available languages?

²Actually, if possible later on I'd like to auto-detect the language in images - e.g. by scanning each image with each language and checking which language had the best result. If you have any idea on how this could be done please let me know.

Upvotes: 2

Views: 1553

Answers (1)

mehrdad
mehrdad

Reputation: 29

you should create a tessdata directory in debug folder of your project and put the language files there .

Upvotes: 2

Related Questions