The normalized Google distance (NGD) is a semantic similarity measure derived from the number of hits returned by the Google search engine for a given set of keywords.[1] Keywords with the same or similar meanings in a natural language sense tend to be "close" in units of normalized Google distance, while words with dissimilar meanings tend to be farther apart.
Specifically, the NGD between two search terms x and y is
\operatorname{NGD}(x,y)=
max\{logf(x),logf(y)\ | |
- |
logf(x,y)} {logN-min\{logf(x),logf(y)\}}
where N is the total number of web pages searched by Google multiplied by the average number of singleton search terms occurring on pages; f(x) and f(y) are the number of hits for search terms x and y, respectively; and f(x, y) is the number of web pages on which both x and y occur.
If the
NGD(x,y)=0
NGD(x,y)\geq1
Example: On 9 April 2013, googling for "Shakespeare" gave 130,000,000 hits;googling for "Macbeth" gave 26,000,000 hits; and googlingfor "Shakespeare Macbeth" gave 20,800,000 hits.The number of pages indexed by Google was estimated by the numberof hits of the search term "the" which was 25,270,000,000 hits. Assumingthere are about 1,000 search terms on the average page this gives
N=25,270,000,000,000
NGD(Shakespeare,Macbeth)=(26.95-24.31)/(44.52-24.63)=0.13
The normalized Google distance is derived from the earlier normalized compression distance.[2] [3] Namely, objects can be given literally, like the literal four-letter genome of a mouse,or the literal text of Macbeth by Shakespeare. The similarity of these objects is given by the NCD. Forsimplicity we take it that all meaning of the objectis represented by the literal object itself. Objects can also begiven by name, like 'the four-letter genome of a mouse,'or 'the text of Macbeth by Shakespeare.' There arealso objects that cannot be given literally, but only by name,and that acquire their meaning from their contexts in background commonknowledge in humankind, like "home" or "red". The similarity between names for objects is given by the NGD.
The probabilities of Google search terms, conceived asthe frequencies of page counts returned by Google divided bythe number of pages indexed by Google (multiplied by the average number of search terms in those pages), approximate the actual relative frequencies of those search terms as actually used in society. Based on this premise, the relations represented by the normalized Google distance approximately capturethe assumed true semantic relations governing the search terms. In the NGD, the World Wide Web and Google are used. Other text corpora include Wikipedia, the King James version of the Bible or the Oxford English Dictionary together with appropriate search engines.
The following properties are proved in:[1]
infty
NGD(x,y)\geq1
Applications to colors versus numbers, primes versus non-primes and so are given in,[1] as well as a randomized massive experiment using WordNet categories. In the primes versus non-primes case and the WordNet experiment the NGD method is augmented with a support vector machine classifier. The experiments consist of 25 positive examples and 25 negative ones. The WordNet experiment consisted of 100 random WordNet categories. The NGD method had a success rate of 87.25%. The mean is 0.8725 while the standard deviation was 0.1169. These rates are about agreement with the WordNet categories which represent the knowledge of researchers with PhDs which entered them. It is rare to see agreement less than 75%.