'Yields a dictionary of (word, set([document1, document2, ...]))-items.'

@property
def inverted_index(self):

    if (not self._inverted):
        m = {}
        for d in self.documents:
            for w in d.terms:
                if (w not in m):
                    m[w] = set()
                m[w].add(d)
        self._inverted = m
    return self._inverted
