fix: Fixes tables when using OCR (#1261)
Fix for the tables when using OCR Signed-off-by: Maksym Lysak <mly@zurich.ibm.com> Co-authored-by: Maksym Lysak <mly@zurich.ibm.com>
This commit is contained in:
parent
124f921077
commit
7afad7e52d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user