News for hackers. Stuff that matters.
Re:Finding similar items using minhashing by ajays on Monday February 14, 2011 @06:24PM (#2219216)
I'm sorry, but this article is poorly written. The Google Knol article, http://knol.google.com/k/simple-simhashing , is much better.

It is clear that the author does not understand what a hashing function is. He says, "Your programming language of choice's API will almost certainly have a few acceptable ones within arm's reach", but that's not true. Firstly, what is a programming language's "API" ? Secondly: most languages that I'm aware of have no builtin hash functions; they are usually libraries (I know, I'm getting pedantic here). And thirdly: most hash functions that you'd find in a library don't return a floating point value that you can operate on with a "min" function (or even an int value). They typically return a string of 40-, 128 or 256 bits (depending on the function). So you'll need to map the hash returned by your hash function to a value that you can compare; for example, by grabbing the last 4 bytes and treating them as an unsigned integer.

Re:Finding similar items using minhashing by rlmw on Monday February 14, 2011 @06:50PM (#2219303)
Its obvious he means standard library by 'API'. Also the type returned doesn't need to be an integer, or even a number. If you need to write a min function then the type merely needs to form a partially ordered set. A string could fulfill this requirement - simply compare an integer representation of the first character if they're equal move on to the following character. Alphabetical ordering, taught to children at all good primary schools, is a restricted version of this comparison algorithm.
Re:Finding similar items using minhashing by Sinjo on Monday February 14, 2011 @06:40PM (#2219263)
Hmm, I know it's a bit of an esoteric language, but Java has a method called "hashCode()" which is common to all objects, and does indeed return an int value.

That's points 2 and 3 covered, I'll leave it up to you whether or not you want to split hairs on what's part of Java's "API" (a sensible reader would probably take that as the Java Class Library in the case of Java).

Re:Finding similar items using minhashing by sadiq on Monday February 14, 2011 @06:42PM (#2219269)