'Create a usable data structure for serializing.'

def freeze(self):

    filenames = self._titles.keys()
    titles = self._titles.values()
    fn2index = dict(((f, i) for (i, f) in enumerate(filenames)))
    return dict(filenames=filenames, titles=titles, terms=self.get_terms(fn2index), descrefs=self.get_descrefs(fn2index), modules=self.get_modules(fn2index), desctypes=dict(((v, k) for (k, v) in self._desctypes.items())))
