'Return a dictionary mapping from words to \'similarity scores,\'
indicating how often these two words occur in the same
context.'

def word_similarity_dict(self, word):

    word = self._key(word)
    word_contexts = set(self._word_to_contexts[word])
    scores = {}
    for (w, w_contexts) in self._word_to_contexts.items():
        scores[w] = f_measure(word_contexts, set(w_contexts))
    return scores
