I want to compare two strings, such as:
str1 = "this is a dynamic data";
str2 = "this is a <data_1> data";
Is there any method that will find the nearest match? I have used Ternary Search Tree (TST) Dictionary functions. Are there any other ways to do this kind of thing?
What about the
Jaccard similarity coefficient?http://en.wikipedia.org/wiki/Jaccard_index
It’s easy to implement and gives a good similarity score. You have to tokenize your sentences though 😉