0

For a given string, and its slight mutation, usual hashes are unpredictably different. Is there some algorithm that maintains some amount of prefix when changes are minor?

hash("That is all they want to teach you") -> da9dad9039d33d3dkdkd
hash("And that is all they want to make you!") -> da9dad9039d3gs09fsd0

Is there some algorithm that lends to comparison, returning a value from 0 to 1?

compare(hash(s1), hash(s2)) -> 0.7
1
  • Are you specifically looking for a hashing function, or just an algorithm in general?
    – user247702
    Aug 5, 2014 at 7:03

1 Answer 1

2

Here is a reference:

http://en.wikipedia.org/wiki/Locality-sensitive_hashing

taken from this question:

String similarity score/hash

which is almost a duplicate..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.