nltk.cluster.cosine_distance()

nltk.cluster.cosine_distance(u, v)[source]

Returns 1 minus the cosine of the angle between vectors v and u. This is equal to 1 - (u.v / |u||v|).