simhash-js icon indicating copy to clipboard operation
simhash-js copied to clipboard

the similarity is not expected

Open zkeen opened this issue 7 years ago • 0 comments

TEST 1: let a = 'the cat sat on the mat' let b = 'the cat sat on a mat' let h1 = simhash.hash(a) let h2 = simhash.hash(b) console.log(h1, h2, sjs.Comparator.similarity(h1, h2)) // ------------ result // 687990018 690349194 0.16666666666666666

TEST2: let a = 'the cat sat on the mat' let b = 'xxx xxxxxx xx xxx xxx' let h1 = simhash.hash(a) let h2 = simhash.hash(b) console.log(h1, h2, sjs.Comparator.similarity(h1, h2)) // -------------- result // 687990018 236331081 0.23529411764705882

zkeen avatar Aug 28 '17 08:08 zkeen