diff --git a/docling/models/table_structure_model.py b/docling/models/table_structure_model.py index b1a50f1..34a7d9d 100644 --- a/docling/models/table_structure_model.py +++ b/docling/models/table_structure_model.py @@ -229,6 +229,9 @@ class TableStructureModel(BasePageModel): cell_unit=TextCellUnit.WORD, bbox=table_cluster.bbox, ) + if len(tcells) == 0: + # In case word-level cells yield empty + tcells = table_cluster.cells else: # Otherwise - we use normal (line/phrase) cells tcells = table_cluster.cells