Return documents meta information that can
        be used for fast document lookups. Meta information
        consists of documents titles, categories and positions
        in file.

def _compute_document_meta(self):
        """
        Return documents meta information that can
        be used for fast document lookups. Meta information
        consists of documents titles, categories and positions
        in file.
        """
        meta = OrderedDict()

        bounds_iter = xml_utils.bounds(self.filename,
                            start_re=r'<text id="(\d+)"[^>]*name="([^"]*)"',
                            end_re=r'</text>')

        for match, bounds in bounds_iter:
            doc_id, title = str(match.group(1)), match.group(2)
            title = xml_utils.unescape_attribute(title)

            # cache categories
            xml_data = xml_utils.load_chunk(self.filename, bounds)
            doc = Document(compat.ElementTree.XML(xml_data.encode('utf8')))

            meta[doc_id] = _DocumentMeta(title, bounds, doc.categories())
        return meta