title: Forcing Tesseract to match pattern (four digits in a row)
body: <p>I'm trying to get Tesseract (using the Tess4J wrapper) to match only a specific pattern. The pattern is four digits in a row, which I think would be \d\d\d\d. Here is a <em>VERY</em> small subset of the image I'm feeding tesseract (the floorplans are restricted, so I'm cautious to post much more of it): <a href="http://mike724.com/view/a06771" rel="nofollow">http://mike724.com/view/a06771</a></p>
  
  <p>I'm using the following java code:</p>
  
  <pre><code>    File imageFile = new File("/&lt;redacted&gt;/file.pdf");
  
      Tesseract instance = Tesseract.getInstance();
      instance.setTessVariable("load_system_dawg", "F");
      instance.setTessVariable("load_freq_dawg", "F");
      instance.setTessVariable("user_words_suffix", "");
      instance.setTessVariable("user_patterns_suffix", "\\d\\d\\d\\d");
  
      try {
          String result = instance.doOCR(imageFile);
          System.out.println(result);
      } catch (TesseractException e) {
          System.err.println(e.getMessage());
      }
  </code></pre>
  
  <p>The problem I'm running into is that tesseract seems to not be honoring these configuration options, I still get text/words in the results. I expect to get only the room numbers (ex. 2950).</p>