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(...,...);