roberto,

PHP function: levenshtein()

Calculating the distance between two strings

https://drops-of-php.hi-folks.dev/05-string/16-str-levensthein/

magitism,
@magitism@mastodon.online avatar

@roberto Does anyone have a real concrete example of Levenshtein being useful in the wild? I used it once to do a 404 page suggestion system, but other methods ended up being much faster and smarter.

roberto,

@magitism of course, thank you for your reply.
I used it in a command-line tool to find a misspelled option. Generally, it's handy when you have a list and need to pinpoint the closest match to a given input. Fixing a misspelled path against a list of valid paths is another practical use. It's also useful when comparing simplified DNA sequences or finding similar sequences in a series of game steps. While a basic similarity function, it may not be the most effective in all contexts.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines