title: android - using the tess-two library
body: <p>I am following this <a href="http://gaut.am/making-an-ocr-android-app-using-tesseract/" rel="nofollow">tutorial</a> and manage to build the library just fine.</p>
  
  <p><strong>My State Now:</strong></p>
  
  <ul>
  <li><p>I take a photo, save it to the external memory (here is the directory path)</p>
  
  <pre><code>static String directoryPath = Environment.getExternalStorageDirectory().toString() + "/saved_images";
  </code></pre></li>
  <li><p>In the directory there are currently only pictures I took in jpg format.</p></li>
  <li><p>I can load a bitmap from the saved image.</p></li>
  </ul>
  
  <p><strong>The problem-</strong></p>
  
  <p>I couldn't understand how do I use this piece of code:</p>
  
  <pre><code>TessBaseAPI baseApi = new TessBaseAPI();
  // DATA_PATH = Path to the storage
  // lang = for which the language data exists, usually "eng"
  baseApi.init(DATA_PATH, lang);
  // Eg. baseApi.init("/mnt/sdcard/tesseract/tessdata/eng.traineddata", "eng");
  baseApi.setImage(bitmap);
  String recognizedText = baseApi.getUTF8Text();
  baseApi.end();
  </code></pre>
  
  <ul>
  <li>What is the <code>DATA_PATH</code> variable?</li>
  <li>also read something about creating a folder named tesseract  and putting there language files? </li>
  </ul>
  
  <p>not really sure what I need to do and the tutorial doesn't explain it.</p>
  
  <p>any help would be appreciated! </p>