mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-26 20:14:47 +00:00
Completed checks
Signed-off-by: Maxim Lysak <mly@zurich.ibm.com>
This commit is contained in:
parent
cfdfda3629
commit
bff53d403a
@ -114,7 +114,9 @@ class TableStructureModel:
|
|||||||
for element in table_out["tf_responses"]:
|
for element in table_out["tf_responses"]:
|
||||||
|
|
||||||
if not self.do_cell_matching:
|
if not self.do_cell_matching:
|
||||||
the_bbox = BoundingBox.model_validate(element["bbox"]).scaled(1 / self.scale)
|
the_bbox = BoundingBox.model_validate(
|
||||||
|
element["bbox"]
|
||||||
|
).scaled(1 / self.scale)
|
||||||
text_piece = page._backend.get_text_in_rect(the_bbox)
|
text_piece = page._backend.get_text_in_rect(the_bbox)
|
||||||
element["bbox"]["token"] = text_piece
|
element["bbox"]["token"] = text_piece
|
||||||
|
|
||||||
|
@ -58,8 +58,7 @@ def main():
|
|||||||
pipeline_options.table_structure_options.do_cell_matching = False
|
pipeline_options.table_structure_options.do_cell_matching = False
|
||||||
|
|
||||||
doc_converter = DocumentConverter(
|
doc_converter = DocumentConverter(
|
||||||
artifacts_path=artifacts_path,
|
artifacts_path=artifacts_path, pipeline_options=pipeline_options
|
||||||
pipeline_options=pipeline_options
|
|
||||||
)
|
)
|
||||||
|
|
||||||
input = DocumentConversionInput.from_paths(input_doc_paths)
|
input = DocumentConversionInput.from_paths(input_doc_paths)
|
||||||
|
Loading…
Reference in New Issue
Block a user