It is already in the guides https://github.com/rails/rails/blob/master/guides/rails_guides/levenshtein.rb but I do not think it is usable by railties in that location. Is it okay to duplicate this code or should we put it somewhere it can be used by both?