updated the render_as_doctags with the new arguments from docling-core

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
This commit is contained in:
Peter Staar 2024-09-20 15:55:30 +02:00
parent 6dd1e91c4a
commit 086fbd57ea

View File

@ -368,20 +368,28 @@ class ConvertedDocument(BaseModel):
"table", "table",
"figure", "figure",
], ],
page_tagging: bool = True, xsize: int = 100,
location_tagging: bool = True, ysize: int = 100,
location_dimensions: Tuple[int, int] = (100, 100), add_location: bool = True,
add_new_line: bool = True, add_content: bool = True,
add_page_index: bool = True,
# table specific flags
add_table_cell_location: bool = False,
add_table_cell_label: bool = True,
add_table_cell_text: bool = True,
) -> str: ) -> str:
return self.output.export_to_document_tokens( return self.output.export_to_document_tokens(
delim=delim, delim=delim,
main_text_start=main_text_start, main_text_start=main_text_start,
main_text_stop=main_text_stop, main_text_stop=main_text_stop,
main_text_labels=main_text_labels, main_text_labels=main_text_labels,
page_tagging=page_tagging, add_location=add_location,
location_tagging=location_tagging, add_content=add_content,
location_dimensions=location_dimensions, add_page_index=add_page_index,
add_new_line=add_new_line, # table specific flags
add_table_cell_location=add_table_cell_location,
add_table_cell_label=add_table_cell_labe
add_table_cell_text=add_table_cell_text
) )
def render_element_images( def render_element_images(