DEV Community

Discussion on: Using Levenshtein Distances to Find Similar Strings

Collapse
 
awwsmm profile image
Andrew (he/him) • Edited

Have you thought about possible improvements to the algorithm if we assume the user has a QWERTY keyboard? (Or some other common layout like AZERTY or DVORAK?) Single-letter mutations are more likely if the keys are physically close to each other.

Collapse
 
nickymarino profile image
Nicky Marino

That would certainly be a great improvement! Maybe you could add some penalty to the distances based on how far apart the chars are from each other on a keyboard