为 Tesseract 提供模式 [英] Provide Pattern for Tesseract
问题描述
我同时使用 go 和 tesseract.我有类似的东西2^3 或 22^55
I'm using go and tesseract together. I have something like 2^3 or 22^55
而且 Tesseract 有时仍然会出现白名单错误,所以我正在寻找一种方法来提供模式,我阅读了 FaQ 并在集市上尝试了建议的选项.
And Tesseract is still sometimes wrong with a white list so I'm looking for a way to provide pattern I read through the FaQ and tried the suggested option with the bazaar.
我的模式文件如下所示:
My Pattern file looks like this:
\d\d^\d\d
\d^\d\d
\d^\d
\d^\d\d
但不知何故它仍然不起作用.是否有任何提示可以使其工作,或者是实现这一点以生成新语言文件的唯一方法.
But somehow It still doesnt work. Are there any tips to get it working or is the only way to realize this to generate a new language file.
推荐答案
不是开发者,请见谅.
不久前我正在研究一个类似的问题,发现源代码中的描述令人困惑,因为默认情况下 tesseract 需要在模式前 4 个以上的常量字符.它甚至提供了在默认条件下不起作用的示例.
I was looking into a similar issue a while ago and found that the description in the source code is confusing as tesseract by default needs 4+ constant characters in front of the pattern. It even provides examples that would not work under default conditions.
但是,这是可配置的,如下所述:trie.h 代码
However this is configurable as is described in: The trie.h code
kSaneNumConcreteChars 我很确定这就是你想要的参数.
kSaneNumConcreteChars I am pretty sure was the parameter you are after.
希望这会有所帮助.
这篇关于为 Tesseract 提供模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!