问题
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