The numerator of this measure is the sum of the products of the term weights
for the matching query and document terms (known as the dot product or inner
product). The denominator normalizes this score by dividing by the product
of the lengths of the two vectors. There is no theoretical reason why the cosine
correlation should be preferred to other similarity measures, but it does perform
somewhat better in evaluations of search quality.