分区示例
分区示例
from unstructured.partition.auto import partition
elements = partition(filename="report.pdf", strategy="fast")
for el in elements[:5]:
print(el.category, "|", str(el)[:60])
# category 常见值:Title / NarrativeText / Table / ListItemhi_res 模式精度更高但依赖较重(版面模型),离线环境先验证依赖与耗时再上批量任务。