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
refactor: update OCR handling and adjust root directory path for model loading
myhlolibd2c3d120aaa
diff --git a/mineru/backend/pipeline/pipeline_analyze.py b/mineru/backend/pipeline/pipeline_analyze.pyindex f99cd9fc..c5283358 100644--- a/mineru/backend/pipeline/pipeline_analyze.py+++ b/mineru/backend/pipeline/pipeline_analyze.py@@ -101,7 +101,7 @@ def doc_analyze(elif parse_method == 'ocr':_ocr = True- ocr_enabled_list[pdf_idx] = _ocr+ ocr_enabled_list.append(_ocr)_lang = lang_list[pdf_idx]# 收集每个数据集中的页面diff --git a/mineru/model/table/rapid_table.py b/mineru/model/table/rapid_table.pyindex dd085ff9..f333ba0b 100644--- a/mineru/model/table/rapid_table.py+++ b/mineru/model/table/rapid_table.py@@ -8,7 +8,7 @@ from rapid_table import RapidTable, RapidTableInputclass RapidTableModel(object):def __init__(self, ocr_engine):- root_dir = Path(__file__).absolute().parent.parent.parent.parent.parent+ root_dir = Path(__file__).absolute().parent.parent.parentslanet_plus_model_path = os.path.join(root_dir, 'resources', 'slanet_plus', 'slanet-plus.onnx')input_args = RapidTableInput(model_type='slanet_plus', model_path=slanet_plus_model_path)self.table_model = RapidTable(input_args)