Did you mean: …?

I was thinking mispelling was a really hard feature to implement, but it’s in fact far more easy to do once you have the Lenvenshtein distance algorithm ready.

So I wrote a Swift extension on String to compute this distance, the algorithm is simply translated from Wikipedia pseudo code.


Next up

Leave a Reply

Your email address will not be published. Required fields are marked *