From a4f6762aef00c89f7fdf5780be8aedca057208e7 Mon Sep 17 00:00:00 2001 From: Maksym Lysak Date: Fri, 28 Mar 2025 12:19:45 +0100 Subject: [PATCH] removed comments Signed-off-by: Maksym Lysak --- docling/models/table_structure_model.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/docling/models/table_structure_model.py b/docling/models/table_structure_model.py index d7f8b6a5..b1a50f13 100644 --- a/docling/models/table_structure_model.py +++ b/docling/models/table_structure_model.py @@ -227,22 +227,10 @@ class TableStructureModel(BasePageModel): if sp is not None: tcells = sp.get_cells_in_bbox( cell_unit=TextCellUnit.WORD, - bbox=table_cluster.bbox.to_bottom_left_origin( - page.size.height - ), + bbox=table_cluster.bbox, ) - # Transform origin of returned cells: - tcells2 = [] - for tcell in tcells: - # Do the copy to not affect cells that are in two (or more) table regions - tcell = tcell.model_copy(deep=True) - tcell.rect = tcell.rect.to_top_left_origin( - page.size.height - ) - tcells2.append(tcell) - tcells = tcells2 else: - print("Otherwise - we use normal (line/phrase) cells") + # Otherwise - we use normal (line/phrase) cells tcells = table_cluster.cells tokens = [] for c in tcells: @@ -268,7 +256,6 @@ class TableStructureModel(BasePageModel): ) table_out = tf_output[0] table_cells = [] - # print("len(tf_responses)={}".format(len(table_out["tf_responses"]))) for element in table_out["tf_responses"]: if not self.do_cell_matching: