Modified domSimilarity to return a value between 0 and 1