Skip to content

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

fix: typo

myhloli1083476a025a
diff --git a/mineru/backend/pipeline/pipeline_middle_json_mkcontent.py b/mineru/backend/pipeline/pipeline_middle_json_mkcontent.py
index 096028a8..7976d0ee 100644
--- a/mineru/backend/pipeline/pipeline_middle_json_mkcontent.py
+++ b/mineru/backend/pipeline/pipeline_middle_json_mkcontent.py
@@ -245,14 +245,14 @@ def make_blocks_to_content_list(para_block, img_buket_path, page_idx, page_size)
if block['type'] == BlockType.TABLE_FOOTNOTE:
para_content[BlockType.TABLE_FOOTNOTE].append(merge_para_with_text(block))
- page_weight, page_height = page_size
+ page_width, page_height = page_size
para_bbox = para_block.get('bbox')
if para_bbox:
x0, y0, x1, y1 = para_bbox
para_content['bbox'] = [
- int(x0 * 1000 / page_weight),
+ int(x0 * 1000 / page_width),
int(y0 * 1000 / page_height),
- int(x1 * 1000 / page_weight),
+ int(x1 * 1000 / page_width),
int(y1 * 1000 / page_height),
]
diff --git a/mineru/backend/vlm/vlm_middle_json_mkcontent.py b/mineru/backend/vlm/vlm_middle_json_mkcontent.py
index 1ee79abd..87e90259 100644
--- a/mineru/backend/vlm/vlm_middle_json_mkcontent.py
+++ b/mineru/backend/vlm/vlm_middle_json_mkcontent.py
@@ -137,9 +137,6 @@ def mk_blocks_to_markdown(para_blocks, make_mode, formula_enable, table_enable,
return page_markdown
-
-
-
def make_blocks_to_content_list(para_block, img_buket_path, page_idx, page_size):
para_type = para_block['type']
para_content = {}
@@ -222,14 +219,14 @@ def make_blocks_to_content_list(para_block, img_buket_path, page_idx, page_size)
if block['type'] == BlockType.CODE_CAPTION:
para_content[BlockType.CODE_CAPTION].append(merge_para_with_text(block))
- page_weight, page_height = page_size
+ page_width, page_height = page_size
para_bbox = para_block.get('bbox')
if para_bbox:
x0, y0, x1, y1 = para_bbox
para_content['bbox'] = [
- int(x0 * 1000 / page_weight),
+ int(x0 * 1000 / page_width),
int(y0 * 1000 / page_height),
- int(x1 * 1000 / page_weight),
+ int(x1 * 1000 / page_width),
int(y1 * 1000 / page_height),
]