mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-27 04:24:45 +00:00
Adapting label mapping for updated layout model
Signed-off-by: Maxim Lysak <mly@zurich.ibm.com>
This commit is contained in:
parent
9b72a61914
commit
aba833ab56
@ -33,6 +33,7 @@ class LayoutModel:
|
|||||||
"Page-footer",
|
"Page-footer",
|
||||||
"Code",
|
"Code",
|
||||||
"List-item",
|
"List-item",
|
||||||
|
# "Title"
|
||||||
# "Formula",
|
# "Formula",
|
||||||
]
|
]
|
||||||
PAGE_HEADER_LABELS = ["Page-header", "Page-footer"]
|
PAGE_HEADER_LABELS = ["Page-header", "Page-footer"]
|
||||||
@ -71,6 +72,7 @@ class LayoutModel:
|
|||||||
|
|
||||||
CLASS_REMAPPINGS = {
|
CLASS_REMAPPINGS = {
|
||||||
"Document Index": "Table",
|
"Document Index": "Table",
|
||||||
|
"Title": "Section-header"
|
||||||
}
|
}
|
||||||
|
|
||||||
_log.debug("================= Start postprocess function ====================")
|
_log.debug("================= Start postprocess function ====================")
|
||||||
@ -277,6 +279,7 @@ class LayoutModel:
|
|||||||
bbox=BoundingBox.model_validate(pred_item),
|
bbox=BoundingBox.model_validate(pred_item),
|
||||||
cells=[],
|
cells=[],
|
||||||
)
|
)
|
||||||
|
|
||||||
clusters.append(cluster)
|
clusters.append(cluster)
|
||||||
|
|
||||||
# Map cells to clusters
|
# Map cells to clusters
|
||||||
|
Loading…
Reference in New Issue
Block a user