I am trying to match a single search term against a dictionary of possible matches using a Levenshtein distance algorithm. The algorithm returns a distance expressed as numb
I had a similar problem and this thread helped me to figure out a solution. Hope it can help others too.
int levDis = Lev_distance(Q, Mi)
int bigger = max(strlen(Q), strlen(Mi))
double pct = (bigger - levDis) / bigger
It should return 100% if both strings are exactly the same and 0% if they are totaly different.
(sorry if my english isn't that good)