String similarity

This is a discussion on String similarity within the C++ Programming forums, part of the General Programming Boards category; I know I have heard of a couple functions/algorithms before that test two strings to see if they are similar ...

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738

    String similarity

    I know I have heard of a couple functions/algorithms before that test two strings to see if they are similar (but not necessarily equal or equivalent). Does anybody know anything about this? I can't remember the name of the function/algorithm...and I was wanting to learn more about it.
    My Website

    "Circular logic is good because it is."

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,274
    Quote Originally Posted by DavidP View Post
    I know I have heard of a couple functions/algorithms before that test two strings to see if they are similar (but not necessarily equal or equivalent). Does anybody know anything about this? I can't remember the name of the function/algorithm...and I was wanting to learn more about it.
    Levenshtein distance?

  3. #3
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Regex?

    How do you define how similar the strings need to be for them to be considered similar?

  4. #4
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    no not regular expressions.

    It's Levenshtein distance. Thanks!
    My Website

    "Circular logic is good because it is."

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,852
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OOP Question DB Access Wrapper Classes
    By digioz in forum C# Programming
    Replies: 2
    Last Post: 09-07-2008, 05:30 PM
  2. Replies: 8
    Last Post: 04-25-2008, 03:45 PM
  3. Message class ** Need help befor 12am tonight**
    By TransformedBG in forum C++ Programming
    Replies: 1
    Last Post: 11-29-2006, 11:03 PM
  4. Classes inheretance problem...
    By NANO in forum C++ Programming
    Replies: 12
    Last Post: 12-09-2002, 03:23 PM
  5. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 07:49 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21