问题描述
我在Android上构建它的目标一个简单的tesseract应用是识别诸如CALL,消息等简单的命令
因为命令的数目是小的和固定的,我想将它们添加到白名单以便程序可以达到更高的精度。我该怎么办呢?提前非常感谢:)
I'm building a simple Tesseract application on Android it goals is to recognize simple command like CALL, MESSAGE, etc.Because the number of commands is small and fixed, I want to add them to white list so the program can achieve higher accuracy. How can I do that? Many thanks in advance :)
推荐答案
据我了解,你可以在不的tesseract白名单的话。您可以使用以下code段只有白名单字符和数字
As far as I understand you cannot whitelist words in tesseract. You can only whitelist characters and digits using the following code snippet
tessBaseAPI.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST,\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmopqrstuvwxyz0123456789%,\");
tessBaseAPI.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmopqrstuvwxyz0123456789%,");
使用tessBaseAPI.init初始化的tesseract后(...,...);
after initializing tesseract using tessBaseAPI.init(...,...);
这篇关于添加自定义短语的tesseract白名单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!