Recovering Segmentation Errors in Handwriting Recognition Systems