ChunkMetadata

  • New in v2.0

class ChunkMetadata

Payload-ready metadata associated with a Chunk. Included in the Chunk.metadata object.

page_start

1-based number of the first page contributing content to the chunk.

page_end

1-based number of the last page contributing content to the chunk.

bboxes

List of bounding boxes in (page, x0, y0, x1, y1) form. Page numbers are 1-based.

types

Content types present in the chunk, in reading order, such as "heading", "paragraph", "table", "list", "figure", or "caption".

section_id

Id of the innermost detected section containing the chunk, in s{n} form, or None when the chunk is not associated with a section.

section_path

List of section titles from the document’s section hierarchy to the innermost section. Empty when no section applies.

token_count

Token count used by the chunk assembler. Depending on the tokenizer and the final rendered text, this can differ slightly from a separate tokenization of text; token budgets are targets rather than hard limits.

element_ids

Ids of the source layout elements contributing to the chunk, formatted as p{page}.b{box} (1-based page number, 0-based box index).

table_ids

Ids of table views associated with the chunk, formatted as t{n}.

figure_ids

Ids of figure or formula views associated with the chunk, formatted as f{n}.

lists

List groups found in the chunk. Each group contains items with item text, page number, and bounding box, and bboxes for the group.

ocr

True if content contributing to this chunk came from a page processed by OCR; otherwise False.

file_path

Source document path, or None when no path is available.

page_count

Number of pages in the source document, or None when unavailable.

This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at artifex.com or contact Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States for further information.