添加自定义短语的tesseract白名单 [英] Adding custom phrases to Tesseract white list

查看:2974
本文介绍了添加自定义短语的tesseract白名单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在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白名单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆