OCR-based spelling correction system