Levenshtein distance - fuzzy string matching

  • 2 Replies
  • 3351 Views
*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6855
  • Mostly Harmless
Levenshtein distance - fuzzy string matching
« on: January 30, 2013, 09:13:22 pm »
I was taking a look around for fuzzy logic ideas and came across this.  It's nice and useful in situations where you want to check a piece of text against a list of text items but not necessarily need an exact match.

I'm using it to trigger songs (mp3) at the moment.  So for example say I want to play a song by Iggy Pop.  On my system the mp3s have the artist and then the song name for the filename.  So for example I may want my bot to find Iggy Pop - The Passenger.mp3

It's simple enough to pull the extension (mp3) out of the equation and you are left with just the artist & song name.  But, with a standard string compare you would have to type in exactly the artist - song combination as it is used/stored on the system to get a hit.

But what if you typed in Igy Poop the Passanger, or even spoke the words to your PC but it got a bit garbled by the speech recognition.  You would want that to work too right ?  So use some fuzzy pattern matching and test for similarity between the filename and the user input.

You can set a value whereby the system thinks that if the match is good enough it will proceed and play the song with the best match.  And perhaps also a lower threshold when the system asks 'Did you mean Iggy Pop - The Passenger ?'

Does that make sense ?  Here's some more :

« Last Edit: January 30, 2013, 11:33:51 pm by Freddy »

*

Sybershot

  • Trusty Member
  • **
  • Bumblebee
  • *
  • 42
    • Scripted Intelligence
Re: Levenshtein distance - fuzzy string matching
« Reply #1 on: January 30, 2013, 11:01:39 pm »
Thanks I be able to use this in the future  O0

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6855
  • Mostly Harmless
Re: Levenshtein distance - fuzzy string matching
« Reply #2 on: January 30, 2013, 11:35:08 pm »
Glad it made sense  :)
« Last Edit: March 06, 2013, 06:42:10 pm by Freddy »

 


OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am
Nvidia Hype
by 8pla.net (AI News )
December 06, 2023, 10:04:52 pm
How will the OpenAI CEO being Fired affect ChatGPT?
by 8pla.net (AI News )
December 06, 2023, 09:54:25 pm
Independent AI sovereignties
by WriterOfMinds (AI News )
November 08, 2023, 04:51:21 am
LLaMA2 Meta's chatbot released
by 8pla.net (AI News )
October 18, 2023, 11:41:21 pm

Users Online

258 Guests, 0 Users

Most Online Today: 316. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles