pair_similarity function

Compute a matrix of cosine similarity/distance of word pairs.