Browse Source

feat: 完善单元格信息记录和匹配失败处理逻辑

zhch158_admin 4 weeks ago
parent
commit
f3ddfa08ae
1 changed files with 3 additions and 1 deletions
  1. 3 1
      merger/data_processor.py

+ 3 - 1
merger/data_processor.py

@@ -150,6 +150,7 @@ class DataProcessor:
                     cell['data-score'] = f"{matched_bbox['score']:.4f}"
                     cell['data-paddle-index'] = str(matched_bbox['paddle_bbox_index'])
 
+                    # ✅ 完整记录单元格信息
                     cells.append({
                         'type': 'table_cell',
                         'text': cell_text,
@@ -161,5 +162,6 @@ class DataProcessor:
                     })
                     
                     matched_bbox['used'] = True
-        
+                # ✅ 如果匹配失败,不应该添加到 cells 中
+    
         return str(soup), cells, current_pointer