Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

Update mineru/utils/ocr_utils.py

Xiaomeng Zhaoe48bfdda210d
diff --git a/mineru/utils/ocr_utils.py b/mineru/utils/ocr_utils.py
index f57a892c..10b675f8 100644
--- a/mineru/utils/ocr_utils.py
+++ b/mineru/utils/ocr_utils.py
@@ -289,7 +289,7 @@ def merge_det_boxes(dt_boxes):
line_height = max_y - min_y
# 只有当行宽度超过高度4倍时才进行合并
- if line_width > line_height * 4:
+ if line_width > line_height * LINE_WIDTH_TO_HEIGHT_RATIO_THRESHOLD:
# Merge overlapping text regions within the same line
merged_spans = merge_overlapping_spans(line_bbox_list)