'Computes the similarity of two tokens.'

def similarity(self, word1, word2):

    idx1 = self.word_to_idx.get(word1)
    idx2 = self.word_to_idx.get(word2)
    if ((not idx1) or (not idx2)):
        return None
    return float((self.vecs[idx1] * self.vecs[idx2].transpose()))
