tess4j: Failed loading language Tesseract couldn't load any languages!
Tess4J version - 3.1.0 Tesseract version - Tesseract Open Source OCR Engine v3.04.01 with Leptonica Os - OSX 10.11.3 El Capitan
//TESS4J_FOLDER_PATH = "/usr/local/Cellar/tesseract/3.04.01_1/share/' - location lang .traineddata
instance = new Tesseract();
instance.setDatapath(TESS4J_FOLDER_PATH);
instance.setLanguage("chi_tra");
String result = "";
File imageFile = new File(filePath);
try {
result = instance.doOCR(imageFile);
} catch (TesseractException e) {
System.err.println(e.getMessage());
}
return result;
i got error
Failed loading language 'chi_tra'
Tesseract couldn't load any languages!
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000012408d311, pid=68062, tid=0x0000000000001703
#
# JRE version: Java(TM) SE Runtime Environment (8.0_92-b14) (build 1.8.0_92-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.92-b14 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [libtesseract.dylib+0x13311] _ZN9tesseract9Tesseract15recog_all_wordsEP8PAGE_RESP10ETEXT_DESCPK4TBOXPKci+0xb9
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 35 (9 by maintainers)
@lokesh-stack I had similar problem too. I resolved it by downloading the raw tessdata.
https://github.com/tesseract-ocr/tessdata/blob/master/eng.traineddata?raw=true
tesseract imagefile output -l chi_tra
Make sure the environment variable
TESSDATA_PREFIX
is set to your tessdata directory! (for ex.C:\msys64\mingw32\share\tessdata
).Did anyone try out with changing locale, as suggested in Tesseract issue?
export LC_ALL=C