Skip to content

Commit 389161c

Browse files
fix: table cell alignment regression (#122)
Signed-off-by: samiullahchattha <[email protected]> Co-authored-by: samiullahchattha <[email protected]>
1 parent a888d7a commit 389161c

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

docling_ibm_models/tableformer/data_management/matching_post_processor.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -474,9 +474,6 @@ def _align_table_cells_to_pdf(self, table_cells, pdf_cells, matches):
474474
pdf_cell_dict = {pdf_cell["id"]: pdf_cell["bbox"] for pdf_cell in pdf_cells}
475475
table_cell_dict = {cell["cell_id"]: cell for cell in table_cells}
476476

477-
# Track unique cells we're going to add
478-
processed_cells = set()
479-
480477
# First pass - create initial new_table_cells with aligned bboxes
481478
new_table_cells = []
482479

@@ -491,9 +488,6 @@ def _align_table_cells_to_pdf(self, table_cells, pdf_cells, matches):
491488

492489
# Process each unique table cell
493490
for cell_id in table_cell_ids:
494-
if cell_id in processed_cells:
495-
continue
496-
497491
table_cell = table_cell_dict.get(cell_id)
498492
if not table_cell:
499493
continue
@@ -507,7 +501,6 @@ def _align_table_cells_to_pdf(self, table_cells, pdf_cells, matches):
507501
new_table_cell["cell_class"] = "2"
508502

509503
new_table_cells.append(new_table_cell)
510-
processed_cells.add(cell_id)
511504

512505
# Second pass - aggregate bboxes for duplicate cells
513506
cell_to_bboxes = {}

0 commit comments

Comments
 (0)