Hi all,
I know the internet is full of fail loading languages problem, but I'm 
struggling with it for hours and can't find solution.
So this is my installation of tesseract:

*[ds@lab1 images]$ tesseract -v*
tesseract 4.00.00alpha
 leptonica-1.74.4
  libjpeg 6b (libjpeg-turbo 1.2.90) : libpng 1.5.13 : libtiff 4.0.3 : zlib 
1.2.7 : libwebp 0.3.0

 Found AVX
 Found SSE


I constantly get this error:
*[ds@lab1 images]$ tesseract text2.png t1.txt -l eng --oem 0*
Error opening data file /usr/local/share/tesseract-ocr/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your 
"tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
Could not initialize tesseract.
____________________________________________________________________________________________________

*[ds@lab1 images]$ tesseract text2.png t1.txt -l eng --oem 1*
Error opening data file /usr/local/share/tesseract-ocr/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your 
"tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
Could not initialize tesseract.

When I run list-langs, I get this, looks like it is able to find languages:
*[ds@lab1 images]$ tesseract --list-langs*
Error opening data file 
/usr/local/share/tesseract-ocr/tessdata4.0/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your 
"tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
List of available languages (4):
Hebrew
fra
heb
eng

And this is the my languages directory structure:
*[ds@lab1 share]$ ll -r  tesseract-ocr/*
total 144
drwxr-xr-x. 4 root root  4096 Nov 23 12:27 tessdata4.0
drwxr-xr-x. 4 root root    82 Nov 23 11:17 tessdata3.04
drwxr-xr-x. 4 root root  4096 Nov 23 09:38 tessdata
drwxr-xr-x. 2 root root    92 Nov 26 10:12 tessconfigs
-rwxr-xr-x. 1 root root   572 Nov 26 10:12 pdf.ttf
-rwxr-xr-x. 1 root root 30997 Nov 26 10:12 heb.traineddata
-rwxr-xr-x. 1 root root 31033 Nov 26 10:12 Hebrew.traineddata
-rwxr-xr-x. 1 root root 30997 Nov 26 10:12 fra.traineddata
-rwxr-xr-x. 1 root root 32288 Nov 26 10:12 eng.traineddata
drwxr-xr-x. 2 root root  4096 Nov 26 10:12 configs

I tried to set TESSDATA_PREFIX for different locations:
*[ds@lab1 images]$ history | grep export*
 1006  export TESSDATA_PREFIX=/usr/local/share/tesseract-ocr/
 1009  export TESSDATA_PREFIX=/usr/local/share/tesseract-ocr/tessdata
 1028  export TESSDATA_PREFIX=/usr/local/share/tesseract-ocr/tessdata4.0
 1033  export TESSDATA_PREFIX=/usr/local/share/tesseract-ocr/tessdata3.04/
 1037  export TESSDATA_PREFIX=/usr/local/share/tesseract-ocr/tessdata3.04

I tried to use all kinds of combinations of pathes, lang files and oem 
flags - same nasty error :(

Any help would be highly appreciated!

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/38742590-6a97-43ac-9814-3fa3b14b0321%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to