Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I check the input if it's nearly same or not? [duplicate]

Tags:

c#

algorithm

Possible Duplicate:
Are there any Fuzzy Search or String Similarity Functions libraries written for C#?

I need to check the similarity of input value -which one user entered- to our records.

12345 vs 1234
12345 vs 13245
Robert vs Robret

etc...

In short; I need to calculate the similarity and tolerate the input in some ratio...

like image 754
Nime Cloud Avatar asked Dec 06 '25 01:12

Nime Cloud


2 Answers

The Levenshtein distance is a string similarity algorithm you could use.

like image 56
Joey Avatar answered Dec 07 '25 14:12

Joey


Google shows me this

like image 34
Rolando Cruz Avatar answered Dec 07 '25 14:12

Rolando Cruz