Cosine similarity

For two vectors u,v, we define the cosine angle between both vectors as:

cos(u,v)=u,v||u||||v||

This formula verifies:

cos(u,v)={1if u=v1if u=v0if u and v are orthogonal

A value close to 1 (resp. -1) indicate 2 vectors carrying a similar (resp. opposite) semantic meaning. A value of 0 indicates two uncorrelated words.