|
|
@@ -363,8 +363,11 @@ class MinerUWiredTableRecognizer:
|
|
|
)
|
|
|
|
|
|
# Step 3: 重建网格结构 (计算 row, col, rowspan, colspan)
|
|
|
- # 这一步替代了原来的 _merge_cells_without_separator
|
|
|
- merged_cells = self.grid_recovery.recover_grid_structure(bboxes)
|
|
|
+ # 传入 OCR boxes 以启用 OCR 辅助合并
|
|
|
+ merged_cells = self.grid_recovery.recover_grid_structure(
|
|
|
+ bboxes,
|
|
|
+ ocr_bboxes=ocr_boxes,
|
|
|
+ enable_ocr_compensation=True)
|
|
|
|
|
|
# Step 3.5: 可视化逻辑结构 (新增)
|
|
|
if self.debug_utils.debug_is_on("save_grid_structure", dbg):
|