textualSimilarity

textualSimilarity ( string compare1 , string compare2 ) : float

Compares 2 strings and returns a proximity score. 1 = identical, 0 = totally different.
This algorithm was designed by our engineers and has made our reputation! It separates the different words and uses weights based on the numbers and terms present, and many other parameters.

Example


console(textualSimilarity("rrrr","rrrr")) //-> 1
console(textualSimilarity("rrrr","rrar")) //-> 0.36
console(textualSimilarity("rrrr","bar")) //-> 0.11
console(textualSimilarity("rrrr","zzzzzzzzzzzzzzzzzzzzzzzzz")) //-> 0.000005

Parameters

compare1

text to compare

compare2

text to compare