Skip to content

Commit eb2538e

Browse files
PeterStaar-IBMcau-gitvagenas
authored
feat: added different content-layers (#345)
* feat: added different content-layers Signed-off-by: Peter Staar <[email protected]> * reformatted code Signed-off-by: Peter Staar <[email protected]> * renamed concealed to invisible Signed-off-by: Peter Staar <[email protected]> * fixed docs Signed-off-by: Peter Staar <[email protected]> * Update docling_core/types/doc/document.py Co-authored-by: Panos Vagenas <[email protected]> Signed-off-by: Christoph Auer <[email protected]> * Update docs/DoclingDocument.json Co-authored-by: Panos Vagenas <[email protected]> Signed-off-by: Christoph Auer <[email protected]> --------- Signed-off-by: Peter Staar <[email protected]> Signed-off-by: Christoph Auer <[email protected]> Co-authored-by: Christoph Auer <[email protected]> Co-authored-by: Panos Vagenas <[email protected]>
1 parent cacf4ef commit eb2538e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docling_core/types/doc/document.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -731,9 +731,11 @@ class ProvenanceItem(BaseModel):
731731
class ContentLayer(str, Enum):
732732
"""ContentLayer."""
733733

734-
BODY = "body"
735-
FURNITURE = "furniture"
736-
BACKGROUND = "background"
734+
BODY = "body" # main content of the document
735+
FURNITURE = "furniture" # eg page-headers/footers
736+
BACKGROUND = "background" # eg watermarks
737+
INVISIBLE = "invisible" # hidden or invisible text
738+
NOTES = "notes" # author/speaker notes, corrections, etc
737739

738740

739741
DEFAULT_CONTENT_LAYERS = {ContentLayer.BODY}

docs/DoclingDocument.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,9 @@
362362
"enum": [
363363
"body",
364364
"furniture",
365-
"background"
365+
"background",
366+
"invisible",
367+
"notes"
366368
],
367369
"title": "ContentLayer",
368370
"type": "string"

0 commit comments

Comments
 (0)