Эх сурвалжийг харах

feat: add post-processing section for converting large text blocks to tables, including configuration examples and rules for improved layout handling

zhch158_admin 5 өдөр өмнө
parent
commit
ad10e0509b

+ 24 - 0
zhch/universal_doc_parser/模型统一框架.md

@@ -129,6 +129,30 @@ graph TB
 
 ---
 
+## Layout 后处理
+
+### 大面积文本块转表格
+
+当Layout检测将大面积的表格区域误识别为文本框时,可以通过后处理自动转换:
+
+**判断规则**:
+- 面积占比:占页面面积超过阈值(默认25%)
+- 尺寸比例:宽度和高度都超过一定比例(避免细长条)
+- 表格冲突:如果页面已有表格,不进行转换(避免误判)
+
+**配置示例**:
+```yaml
+layout:
+  convert_large_text_to_table: true  # 是否启用
+  min_text_area_ratio: 0.25          # 最小面积占比(25%)
+  min_text_width_ratio: 0.4          # 最小宽度占比(40%)
+  min_text_height_ratio: 0.3         # 最小高度占比(30%)
+```
+
+详细说明请参考:`Layout后处理-文本转表格.md`
+
+---
+
 ## OCR 使用策略
 
 | PDF 类型 | 文字块处理 | 表格处理 |