mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-16 08:38:14 +00:00
Update GT test files for pages
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
This commit is contained in:
@@ -62,7 +62,7 @@ _EMPTY_DOC = DsDocument(
|
||||
)
|
||||
|
||||
_EMPTY_DOCLING_DOC = DoclingDocument(
|
||||
description={}, file_info=FileInfo(document_hash="123xyz")
|
||||
description={}, file_info=FileInfo(filename="dummy", document_hash="123xyz")
|
||||
) # TODO: Stub
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ from typing import Iterable, List
|
||||
import numpy
|
||||
from docling_core.types.experimental.base import BoundingBox
|
||||
from docling_core.types.experimental.document import TableCell
|
||||
from docling_core.types.experimental.labels import DocItemLabel
|
||||
from docling_ibm_models.tableformer.data_management.tf_predictor import TFPredictor
|
||||
from PIL import ImageDraw
|
||||
|
||||
@@ -74,7 +75,7 @@ class TableStructureModel:
|
||||
],
|
||||
)
|
||||
for cluster in page.predictions.layout.clusters
|
||||
if cluster.label == "Table"
|
||||
if cluster.label == DocItemLabel.TABLE
|
||||
]
|
||||
if not len(in_tables):
|
||||
yield page
|
||||
@@ -138,7 +139,7 @@ class TableStructureModel:
|
||||
id=table_cluster.id,
|
||||
page_no=page.page_no,
|
||||
cluster=table_cluster,
|
||||
label="Table",
|
||||
label=DocItemLabel.TABLE,
|
||||
)
|
||||
|
||||
page.predictions.tablestructure.table_map[table_cluster.id] = tbl
|
||||
|
||||
Reference in New Issue
Block a user