MinerU icon indicating copy to clipboard operation
MinerU copied to clipboard

demo.py中如何像magic-pdf pdf-command [OPTIONS]中支持ocr、txt、auto的模式选择

Open EthanD4869 opened this issue 1 year ago • 1 comments

--method [ocr|txt|auto] 指定解析方法。txt: 文本型 pdf 解析方法, ocr: 光学识别解析 pdf, auto: 程序智能选择解析方法

EthanD4869 avatar Aug 13 '24 09:08 EthanD4869

https://github.com/opendatalab/MinerU/blob/4983bc1df668b80fa3481fa657eb509b448bb082/demo/demo.py#L20 给"_pdf_type"赋值,可以赋值为"ocr"或"txt",对应命令行中的ocr和txt方式, 同时需要注释掉25行的pipe.pipe_classify()方法。 如果不注释掉25行,就还是auto模式,注释掉的话就是_pdf_type中指定的模式。

myhloli avatar Aug 13 '24 09:08 myhloli