@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
Yields a dictionary of (word, set([document1, document2, ...]))-items.
dataset/ETHPy150Open clips/pattern/pattern/vector/__init__.py/Model.inverted_index