# Optimising character pair substitution costs in Levenshtein distance

In a typical edit distance algorithm - say Levenshtein - there are hardcoded costs for specific operations, such as insertion, substitution, and deletion. This is obviously a bad assumption (the substitution C->K is small in Capital->Kapital, while the substitution S->T is high in Sailor->Tailor).

After some research, I've found that this problem has been tackled in past, though not on a character cost weighted level.

Can someone think of / propose a way to learn the costs for different substitutions between different character pairs? (I think it best to focus on a single transformation operation to begin with).

• possibly ome can train a model to recognise similar words (or even have a simple dictionary of similar words) and assign less cost for edits between similar words (according to model or dictionary) and more cost for dissimilar words Feb 12 at 11:10