title: Forcing Tesseract to recognize only digits
body: <p>I am developing an OCR application for Android. At some point I have observed that I needed to recognize only digits, so I am trying to get the OCR to recognize only digits and hyphens, and not letters or any other type of character.</p>
  
  <p>I have done this:</p>
  
  <pre><code>tessBaseAPI.init(path, "eng");
          tessBaseAPI.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST, "1234156787901299-");
  </code></pre>
  
  <p>But I am not getting an accurate result. Any suggestions are appreciated.</p>
  
  <p>EDITTED:
  This is my complete code:</p>
  
  <pre><code>tessApi.setPageSegMode(TessBaseAPI.OEM_TESSERACT_CUBE_COMBINED);
        tessApi.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST, "0123456789");
        tessApi.setVariable(TessBaseAPI.VAR_CHAR_BLACKLIST,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmopqrstuvwxyz");
  </code></pre>