title: OCR error correction: How to combine three erroneous results to reduce errors
body: <h2>The problem</h2>
  
  <p>I am trying to improve the result of an OCR process by combining the output from three different OCR systems (tesseract, cuneinform, ocrad).
  I already do image preprocessing (deskewing, despeckling, threholding and some more). I don't think that this part can be improved much more.
  Usually the text to recognize is between one and 6 words long. The lanuage of the text is unknown and quite often they contain fantasy words.
  I am on Linux. Preferred language would be Python.</p>
  
  <h2>What I have so far</h2>
  
  <p>Often every result has one or two errors. But they have errors at different characters/positions. Errors could be that they recognize a wrong character or that they include a non existing character. Not so often they ignore a character.</p>
  
  <p>An example might look in the following way:</p>
  
  <pre><code>Xorem_ipsum
  lorXYm_ipsum
  lorem_ipuX
  </code></pre>
  
  <p>A X is a wrong recognized character and an Y is a character which does not exist in the text. Spaces are replaced by "_" for better readibilty.</p>
  
  <p>In cases like this I try to combine the different results.
  Using repeatedly the "longest common substring" algorithm between the three pairs I am able to get the following structure for the given example</p>
  
  <pre><code>or m_ipsum
  lor m_ip u
  orem_ip u
  </code></pre>
  
  <p>But here I am stuck now. I am not able to combine those pieces to a result.</p>
  
  <h2>The questions</h2>
  
  <p>Do you have </p>
  
  <ul>
  <li>an idea how to combine the different
  common longest substrings? </li>
  <li>Or do you have a better idea how to solve this problem?</li>
  </ul>