'Returns a sorted list of (relevance, word)-tuples that are top keywords in the document.
With normalized=True, weights are normalized between 0.0 and 1.0 (their sum will be 1.0).'

def keywords(self, top=10, normalized=True):

    n = ((normalized and sum(self.vector.values())) or 1.0)
    v = (((f / n), w) for (w, f) in self.vector.items())
    v = heapq.nsmallest(top, v, key=(lambda v: ((- v[0]), v[1])))
    return v
