Detect aviable languages

Discussions about Tesseract OCR integration in GdPicture.
Post Reply
User avatar
Appstalden
Posts: 3
Joined: Thu Jun 06, 2013 11:09 am
Location: Obstalden, Switzerland
Contact:

Detect aviable languages

Post by Appstalden » Thu Jun 06, 2013 11:15 am

Hi there,

does anyone knows how to detect the installed OCR-Languages?

in previews versions there was a TesseractDictionary (enum).

But now we have only the path to the files.

Did I miss something in the docu, or is it gone?

User avatar
Appstalden
Posts: 3
Joined: Thu Jun 06, 2013 11:09 am
Location: Obstalden, Switzerland
Contact:

Re: Detect aviable languages

Post by Appstalden » Thu Jun 06, 2013 3:54 pm

I found a way to do it.

Code: Select all

System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(ocr);
            string[] lang = di.GetFiles("???.*").Select(f => f.Name.Substring(0,3)).Distinct().ToArray();
not nice, not secure (because of other files matching the pattern), but it works for me.
8)
Appstalden GmbH
http://www.appstalden.ch

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests