Skip to content

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

feat: modify foot note bbox tmp

许瑞efed5faa53d9
diff --git a/magic_pdf/train_utils/convert_to_train_format.py b/magic_pdf/train_utils/convert_to_train_format.py
index be359c79..c50e6b3b 100644
--- a/magic_pdf/train_utils/convert_to_train_format.py
+++ b/magic_pdf/train_utils/convert_to_train_format.py
@@ -54,8 +54,8 @@ def convert_to_train_format(jso: dict) -> []:
n_bbox = {"category_id": 10, "bbox": inter_equation["bbox"]}
bboxes.append(n_bbox)
- for footnote in v['bak_footer_note_bboxes']:
- n_bbox = {"category_id": 5, "bbox": footnote["bbox"]}
+ for footnote_bbox in v["bak_footer_note_bboxes"]:
+ n_bbox = {"category_id": 5, "bbox": list(footnote_bbox)}
bboxes.append(n_bbox)
info["bboxes"] = bboxes