hi, frieds
I have same issue with japanese language 
this is what i am trying

humnerohit@humnes-MacBook-Pro tessdata % export 
TESSDATA_PREFIX=/usr/local/share/tessdata/

humnerohit@humnes-MacBook-Pro tessdata % tesseract --list-langs            
               

List of available languages in "/usr/local/share/tessdata/" (5):

eng

jpn

jpn_vert

osd

snum

but when i execute the following command "tesseract test1.jpg result -l 
jpn_vert " it shows following error

Error opening data file /usr/local/share/tessdata/jpn_vert.traineddata

Please make sure the TESSDATA_PREFIX environment variable is set to your 
"tessdata" directory.

Failed loading language 'jpn_vert'

Tesseract couldn't load any languages!

Could not initialize tesseract.


can anyone please help me?

On Friday, December 22, 2017 at 8:01:35 PM UTC+9 ShreeDevi Kumar wrote:

> As per your message above
> The files are in   /usr/local/share/tessdata/
> but program is looking for them at /usr/local/share/
>
> you can set TESSDATA_PREFIX and try
>
> OR 
>
> specify the directory as part of the command line. I have found that to be 
> the easiest way, specially when using/comparing diff kinds of traineddata 
> (fast, best, legacy ...)
>
> example script below
>
> -------
>
> #!/bin/bash
> img_files=$(ls ./Cap*.png)
> for img_file in ${img_files}; do
>   echo "****************************" ${img_file} 
> "**********************************"
>     time tesseract --tessdata-dir /mnt/c/Users/User/shree/tessdata_best/  
>  ${img_file} ${img_file%.*}-eng-best  --oem 1 --psm 6 -l eng
>     time tesseract --tessdata-dir /mnt/c/Users/User/shree/tessdata_fast/  
>  ${img_file} ${img_file%.*}-eng-fast  --oem 1 --psm 6 -l eng
>     time tesseract --tessdata-dir /mnt/c/Users/User/shree/tessdata/  
>  ${img_file} ${img_file%.*}-engplus  --oem 1 --psm 6 -l engplus
> done
>
>
>
>
>
> ShreeDevi
> ____________________________________________________________
> भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com
>
> On Wed, Dec 20, 2017 at 8:49 PM, Sasha Ostrikov <alexander...@gmail.com> 
> wrote:
>
>> *Yes tried that. this is the output - same sh*t :(*
>>
>> sasha@ds:~/dev/ext/dsnotebooks/text_extraction/images$ ll 
>> /usr/local/share/tessdata/
>> total 148
>> drwxr-xr-x  4 root root  4096 Dec 20 15:15 ./
>> drwxr-xr-x 10 root root  4096 Dec 20 15:14 ../
>> drwxr-xr-x  2 root root  4096 Dec 20 15:15 configs/
>> -rwxr-xr-x  1 root root 32291 Dec 20 15:15 eng.traineddata*
>> -rwxr-xr-x  1 root root 32292 Dec 20 15:15 fra.traineddata*
>> -rwxr-xr-x  1 root root 32324 Dec 20 15:15 Hebrew.traineddata*
>> -rwxr-xr-x  1 root root 31001 Dec 20 15:15 heb.traineddata*
>> -rwxr-xr-x  1 root root   572 Dec 20 15:15 pdf.ttf*
>> drwxr-xr-x  2 root root  4096 Dec 20 15:15 tessconfigs/
>> sasha@ds:~/dev/ext/dsnotebooks/text_extraction/images$ 
>> sasha@ds:~/dev/ext/dsnotebooks/text_extraction/images$ 
>> sasha@ds:~/dev/ext/dsnotebooks/text_extraction/images$ 
>> sasha@ds:~/dev/ext/dsnotebooks/text_extraction/images$ $TESSDATA_PREFIX
>> bash: /usr/local/share/tessdata: Is a directory
>> sasha@ds:~/dev/ext/dsnotebooks/text_extraction/images$ 
>> sasha@ds:~/dev/ext/dsnotebooks/text_extraction/images$ 
>> sasha@ds:~/dev/ext/dsnotebooks/text_extraction/images$ 
>> sasha@ds:~/dev/ext/dsnotebooks/text_extraction/images$ tesseract 
>> text2.png t1.txt -l eng --oem 0
>> Error opening data file /usr/local/share/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.
>> sasha@ds:~/dev/ext/dsnotebooks/text_extraction/images$ tesseract 
>> text2.png t1.txt -l eng --oem 1
>> Error opening data file /usr/local/share/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.
>> sasha@ds:~/dev/ext/dsnotebooks/text_extraction/images$ tesseract 
>> text2.png t1.txt -l eng --oem 2
>> Error opening data file /usr/local/share/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.
>> sasha@ds:~/dev/ext/dsnotebooks/text_extraction/images$ tesseract 
>> text2.png t1.txt -l eng --oem 3
>> Error opening data file /usr/local/share/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.
>>
>> -- 
>> 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 tesseract-ocr+unsubscr...@googlegroups.com.
>> To post to this group, send email to tesser...@googlegroups.com.
>> 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/c11d3337-48dc-4d1d-a621-c903573ca76d%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tesseract-ocr/c11d3337-48dc-4d1d-a621-c903573ca76d%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 tesseract-ocr+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/c4fc94e9-e6c5-431f-b91b-2f8762a5057cn%40googlegroups.com.

Reply via email to