If the hamming distance is below a certain predetermined threshold, we output the pair of vectors with their cosine similarity (as calculated by equation 4).
a core component of most clustering algorithms used in the NLP community is the creation of a similarity ma-trix.