Tess4j for chinese Execute failed: Invalid memory access

#1

Hi
I’m using Tess4j to OCR the image into Chinese. When I use the default function for English characters, it works fine. However, when I export the external training data and OCR the image to Chinese, an error came out: Execute failed: Invalid memory access.

If anyone met the same problem and has solution, please let me know. Thank you so much.

(upload://hnM1Z7UJi7Xe5WGMF6VOQ4UlBSm.png)

Best

Tao

0 Likes

#2

Hi Tap,

the image upload seemed to have failed, can you reupload it?

Thank you! Iris

0 Likes

#3

Hi @thu,

If possible, could you provide a workflow with some example data to reproduce the issue? Also, it would be very helpful, if you could also provide the log file (see https://www.knime.com/node/20488 for more information) which should contain a more detailed error message. With that, we should be able trace the source of the error message!

Best,
Stefan

0 Likes

#4

Hi Iris

Thank you for reply. I found the problem may be the training data for Chinese text is not right.

Could you give me any suggestion about how to use the Tess4J to OCR chinese characters? Thanks.

Best,

Tao

1 Like

#5

Hi Stefan

Thank you for reply. I found the problem may be the training data for Chinese text is not right.

Could you give me any suggestion about how to use the Tess4J to OCR chinese characters? Thanks.

Best,

Tao

1 Like

#6

Hi Tao,

I haven’t verified if this works, but it is definitely worth a try:

  1. Download either the Chinese Traditional or Chinese Simplified archive
  2. Extract the archive to any folder and enter the folder
  3. Open your installation folder of KNIME Analytics Platform in a second window
  4. You should find a plugins/org.knime.knip.tess4j.base_1.3.3.v201906051307/tessdata folder in there
  5. Copy chi_tra.traineddata or chi_sim.traineddata from the extracted archive into the tessdata folder in your KNIME installation

Once you have restarted KNIME, it should pick up the new training data and should be able to recognize Chinese. If it still doesn’t work, please follow the instructions of my previous post and provide additional information.

Best,
Stefan

0 Likes