From 189d3c2d44ec389856f48696eaa78ac9f02f8cde Mon Sep 17 00:00:00 2001 From: Michele Dolfi <97102151+dolfim-ibm@users.noreply.github.com> Date: Sat, 26 Oct 2024 05:50:34 +0200 Subject: [PATCH] docs: fix batch convert (#177) Signed-off-by: Michele Dolfi --- docs/examples/batch_convert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/examples/batch_convert.py b/docs/examples/batch_convert.py index da1c701..6809c17 100644 --- a/docs/examples/batch_convert.py +++ b/docs/examples/batch_convert.py @@ -13,7 +13,7 @@ from docling.document_converter import DocumentConverter _log = logging.getLogger(__name__) USE_V2 = True -USE_LEGACY = False +USE_LEGACY = True def export_documents( @@ -77,7 +77,7 @@ def export_documents( with (output_dir / f"{doc_filename}.legacy.doctags.txt").open( "w", encoding="utf-8" ) as fp: - fp.write(conv_res.legacy_document.export_to_doctags()) + fp.write(conv_res.legacy_document.export_to_document_tokens()) elif conv_res.status == ConversionStatus.PARTIAL_SUCCESS: _log.info(