From 46ffd203e0c86202acd0a05d17ee6f4723aa2f57 Mon Sep 17 00:00:00 2001 From: Christoph Auer Date: Wed, 5 Feb 2025 13:35:02 +0100 Subject: [PATCH] Address review comments Signed-off-by: Christoph Auer --- docling_core/types/doc/document.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docling_core/types/doc/document.py b/docling_core/types/doc/document.py index ee7a47be..2d8f087d 100644 --- a/docling_core/types/doc/document.py +++ b/docling_core/types/doc/document.py @@ -63,6 +63,8 @@ DocItemLabel.LIST_ITEM, DocItemLabel.CODE, DocItemLabel.REFERENCE, + DocItemLabel.PAGE_HEADER, + DocItemLabel.PAGE_FOOTER, } @@ -513,6 +515,9 @@ class ContentLayer(str, Enum): FURNITURE = "furniture" +DEFAULT_CONTENT_LAYERS = {ContentLayer.BODY} + + class NodeItem(BaseModel): """NodeItem.""" @@ -1851,7 +1856,7 @@ def iterate_items( with_groups: bool = False, traverse_pictures: bool = False, page_no: Optional[int] = None, - included_content_layers: List[ContentLayer] = [ContentLayer.BODY], + included_content_layers: set[ContentLayer] = DEFAULT_CONTENT_LAYERS, _level: int = 0, # fixed parameter, carries through the node nesting level ) -> typing.Iterable[Tuple[NodeItem, int]]: # tuple of node and level """iterate_elements.