Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the similarity is not expected #7

Open
zkeen opened this issue Aug 28, 2017 · 0 comments
Open

the similarity is not expected #7

zkeen opened this issue Aug 28, 2017 · 0 comments

Comments

@zkeen
Copy link

zkeen commented Aug 28, 2017

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 zkeen changed the title the similarity are not expected the similarity is not expected Aug 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant