OCR.oem(0) crash when variables set

Asked by matteoa on 2020-09-03

hello,
I'm setting up some OCR variables to have better results in OCRing some text that is a kind of code (so no dictionaries):

#OCR.globalOptions().oem(0)
OCR.globalOptions().variable("tessedit_char_whitelist", "0123456789ABCDEF")
OCR.globalOptions().variable("tessedit_char_blacklist", "SsOo")
OCR.globalOptions().variable("load_system_dawg", "F")
OCR.globalOptions().variable("load_freq_dawg", "F")

Since I've read on the web that LTSM for tesseract 4 seems not to take into account the black and white lists (I verified that there are results that doesn't match with these) I tried with the old behavior oem(0) by uncomment the first line above.
When I try to do OCR with this OEM I have a crash with this message:
[error] script [ myscript ] stopped with error in line 571
[error] java.lang.Error ( java.lang.Error: Invalid memory access )
[error] --- Traceback --- error source first
line: module ( function ) statement
571: main ( <module> ) linescode=rAppo.textLines()
[error] --- Traceback --- end --------------

While with the commented line above it works but with the OCR problems I wrote above

the question is: what I'm missing/doing wrongly?
Thanks a lot for support
this is my configuration:
2.0.4-2020-03-14_08:01/Windows10.0/Java8(64)1.8.0_251-b08

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2020-09-08
Last query:
2020-09-08
Last reply:
2020-09-03
Best RaiMan (raimund-hocke) said : #1

I guess, the problem is the tessdata stuff, which is only suitable for LSTM.

matteoa (matteoa) said : #2

Thanks RaiMan, that solved my question.