Adding custom phrases to Tesseract white list

痞子三分冷 提交于 2019-12-11 04:04:28

问题


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 :)


回答1:


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%,");

after initializing tesseract using tessBaseAPI.init(...,...);



来源:https://stackoverflow.com/questions/14251939/adding-custom-phrases-to-tesseract-white-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!