'extracts the probabilities of tokens in a message'

def getProbs(self, pool, words):

    probs = [(word, pool[word]) for word in words if (word in pool)]
    probs.sort((lambda x, y: cmp(y[1], x[1])))
    return probs[:2048]
