I have some results of a handwriting recognition system, I need a string matching algorithm or something similar to correct mistake results, but if it's possible I want to learn that string matching system based on class labels using training data. Is there any learnable string matching algorithm?