views:

158

answers:

4

Hi,

How to get relevance percentage between two string in C# ?

Thanks.

+4  A: 

Are you looking for something similar to the the Levenshtein distance, which is the distance between two strings is given by the minimum number of operations needed to transform one string into the other?

Kane
A: 

Have a read of Levenshtein distance

Paul Creasey
A: 

There's no simple answer for this, but have a look at Wikipedia's string metrics article. There are lots of different approaches, though the most widely known is probably the Levenshtein distance, which assigns an integer ranking to a pair of strings to quantify the 'distance' between them.

Will Vousden
A: 

check out the open source package SimMetrics on sourceforge - this should cover every possible need fairly simply.

Sam Chapman