Skip to content

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

fix: update text formatting in table recovery logic for improved output consistency

myhloli8d2871e827be
diff --git a/mineru/utils/model_utils.py b/mineru/utils/model_utils.py
index 5826f26a..717b77d3 100644
--- a/mineru/utils/model_utils.py
+++ b/mineru/utils/model_utils.py
@@ -377,13 +377,6 @@ def get_res_list_from_layout_res(layout_res, iou_threshold=0.7, overlap_threshol
layout_res.remove(res)
# Remove filtered out tables from layout_res
- # if len(filtered_table_res_list) < len(table_res_list):
- # kept_tables = set(id(table) for table in filtered_table_res_list)
- # to_remove = [table_indices[i] for i, table in enumerate(table_res_list)
- # if id(table) not in kept_tables]
- #
- # for idx in sorted(to_remove, reverse=True):
- # del layout_res[idx]
if len(filtered_table_res_list) < len(table_res_list):
kept_tables = set(id(table) for table in filtered_table_res_list)
tables_to_remove = [table for table in table_res_list if id(table) not in kept_tables]