Switch everything to use label enum, and more

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
This commit is contained in:
Christoph Auer
2024-09-24 16:00:39 +02:00
parent 867e06f9f2
commit 33373ac0dd
7 changed files with 88 additions and 70 deletions

View File

@@ -48,6 +48,14 @@ def export_documents(
)
)
# Export Docling document format to doctags (experimental):
with (output_dir / f"{doc_filename}.experimental.doctags").open("w") as fp:
fp.write(conv_res.experimental.export_to_document_tokens())
# Export Docling document format to markdown (experimental):
with (output_dir / f"{doc_filename}.experimental.md").open("w") as fp:
fp.write(conv_res.experimental.export_to_markdown())
# Export Text format:
with (output_dir / f"{doc_filename}.txt").open("w") as fp:
fp.write(conv_res.render_as_text())