Browse Source

feat: 修改表格行检测逻辑,支持小于10行的表格进行全面检测

zhch158_admin 1 week ago
parent
commit
b98a9c626f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      comparator/table_comparator.py

+ 3 - 2
comparator/table_comparator.py

@@ -304,8 +304,9 @@ class TableComparator:
         
         best_header_row = 0
         best_score = 0
-        
-        for row_idx, row in enumerate(table[:5]):  # 只检查前5行
+
+        # 如果表格行数小于10,取全部行进行检测,如果大于10,取前10行
+        for row_idx, row in enumerate(table[:10]):
             if not row:
                 continue