An Algorithm for Matching OCR-Generated Text Strings