Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
feat: refactor finalize_middle_json to support server-side post-processing and enhance title leveling
myhlolibd8d33af8204
diff --git a/mineru/cli/client_side_output.py b/mineru/cli/client_side_output.pyindex 2d67a6dc..653d4fb0 100644--- a/mineru/cli/client_side_output.py+++ b/mineru/cli/client_side_output.py@@ -44,7 +44,6 @@ def _write_json(path: Path, payload: Any) -> None:def regenerate_client_side_outputs(parse_dir: str | Path,doc_stem: str,- title_aided_config: dict[str, Any] | None = None,) -> tuple[Path, ...]:"""读取服务端 staged/finalized middle json,并在客户端覆盖生成最终输出产物。"""parse_dir = Path(parse_dir)@@ -69,10 +68,7 @@ def regenerate_client_side_outputs(raise ValueError("middle_json must contain a list field named pdf_info.")if backend in PDF_BACKENDS:- finalize_client_side_middle_json(- middle_json,- title_aided_config=title_aided_config,- )+ finalize_client_side_middle_json(middle_json)pdf_info = middle_json["pdf_info"]make_func = _select_union_make(backend)