2 Commits da44e4df80 ... 6913675caf

Author SHA1 Message Date
  zhch158_admin 6913675caf fix(pipeline_manager): ensure bbox coordinates are integers for text PDFs 1 day ago
  zhch158_admin e8c4c45e38 feat(config): add new data source configuration for 山西云集科技有限公司 1 day ago

+ 2 - 1
ocr_tools/universal_doc_parser/core/pipeline_manager_v2.py

@@ -537,9 +537,10 @@ class EnhancedDocPipeline:
                 continue
             
             # 转换为 OCR span 格式
+            # 文字PDF的bbox保持int类型(PDF坐标本身就是整数像素坐标)
             span = {
                 'text': text,
-                'bbox': [x1, y1, x2, y2],  # 或者转为 poly 格式
+                'bbox': [int(round(x1)), int(round(y1)), int(round(x2)), int(round(y2))],  # 文字PDF保持int类型
                 'confidence': 1.0,  # PDF 提取的置信度设为 1.0
                 'source': 'pdf'  # 标记来源
             }

+ 21 - 0
table_line_generator/backend/config/data_sources/山西云集科技有限公司.yaml

@@ -0,0 +1,21 @@
+data_source:
+  name: "山西云集科技有限公司"
+  description: "山西云集科技有限公司 bank_statement_wired_unet"
+  json_format: "mineru"
+  base_dir: "/Users/zhch158/workspace/data/流水分析"
+  json_dir: "{{name}}/bank_statement_wired_unet"
+  image_dir: "{{name}}/bank_statement_wired_unet/{{name}}"
+  json_pattern: "{{ name }}_page_(?P<page>\\d{3})\\.json"
+  image_pattern: "{{ name }}_page_(?P<page>\\d{3})\\.png"
+  sort_key: "page"
+  output:
+    directory: "{{base_dir}}/{{ name }}.wiredtable"
+    structure_suffix: "_structure.json"
+    image_suffix: ".png"
+  
+  # 批量处理配置
+  batch:
+    enabled: true
+    template_name: null  # 可选:指定默认模板
+    auto_apply: false    # 是否自动应用模板
+    parallel_workers: 4  # 并行处理线程数