Code complete on cosine similarity.