add ocr_hmm for comparison, changes class interface to be the same as ocr_tesseract, and fix a crash