目录
环境部署
下载
bash
git clone https://gitclone.com/github.com/DS4SD/docling.git
conda create -n docling python=3.11
conda activate docling
pip install docling
安装模型
bash
git clone https://www.modelscope.cn/AI-ModelScope/docling-models.git
git clone https://gitclone.com/github.com/JaidedAI/EasyOCR.gi
t
部署问题
缺少.pth文件,是去modelscope官网下载
用法
转换单个文档
将
bash
from docling.document_converter import DocumentConverter
source = "demo1.pdf" # PDF path or URL
converter = DocumentConverter()
result = converter.convert(source)
print(result.document.export_to_markdown()) # output: "### Docling Technical Report[...]"
解析效果
速度0.96秒/页
但是公式解析效果差