java tessdata训练_Tess4j不使用它的tessdata文件夹

在使用Tess4j (Tesseract的Java包装器)时,发现仅当语言数据文件位于Tesseract自带的tessdata文件夹中时,tess4j才能正常工作。移除tess4j的tessdata文件夹会导致Tesseract无法加载语言数据,进而引发错误。这是否意味着必须安装Tesseract才能使用tess4j,或者可能是tess4j的tessdata文件夹位置设置不当?
摘要由CSDN通过智能技术生成

我正在使用tess4j(Tesseract的Java包装器)。我也安装了普通的Tesseract。我不确定tess4j是如何工作的,但是由于它带有tessdata文件夹,因此我可以假设您会将语言数据文件放在那里。但是,仅当语言数据文件位于“真实的”

tessdata文件夹(与tesseract一起提供的文件夹,而不是tess4j)中时,tess4j才能工作。如果删除该文件夹,则会收到以下错误消息:

Error opening data file C:\Program Files\Tesseract-OCR\tessdata/jpn.trained

data

Please make sure the TESSDATA_PREFIX environment variable is set to the par

ent directory of your "tessdata" directory.

Failed loading language 'jpn'

Tesseract couldn't load any languages!

#

# A fatal error has been detected by the Java Runtime Environment:

#

# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x631259dc, pid=5108, tid=

10148

#

# JRE version: 7.0_06-b24

# Java VM: Java HotSpot(TM) Client VM (23.2-b09 mixed mode, sharing windows

-x86 )

# Problematic frame:

# C [libtesseract302.dll+0x59dc] STRING::strdup+0x467c

#

# Failed to write core dump. Minidumps are not enabled by default on client

versions of Windows

#

# An error report file with more information is saved as:

# D:\School\Programs\OCRTest\v1.0.0\hs_err_pid5108.log

#

# If you would like to submit a bug report, please visit:

# http://bugreport.sun.com/bugreport/crash.jsp

# The crash happened outside the Java Virtual Machine in native code.

# See problematic frame for where to report the bug.

#

这是否意味着我需要安装Tesseract才能使用tess4j?为什么?或者是maby,我的tess4j

tessdata文件夹放在错误的位置(当前与我的.java文件一起使用,tess4j jars位于我设置了类路径的lib文件夹中)。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值