diff --git a/unstructured_inference/inference/layout.py b/unstructured_inference/inference/layout.py index afb53abd..2388afc5 100644 --- a/unstructured_inference/inference/layout.py +++ b/unstructured_inference/inference/layout.py @@ -160,7 +160,9 @@ def clean_pdfminer_inner_elements(self): tables = [e for e in page.elements if e.type == "Table"] for i, element in enumerate(page.elements): if element.source == Source.PDFMINER: - element_inside_table = [element.bbox.is_in(t.bbox) for t in tables] + element_inside_table = [ + element.bbox.is_in(t.bbox, error_margin=15) for t in tables + ] if sum(element_inside_table) == 1: parent_table_index = element_inside_table.index(True) parent_table = tables[parent_table_index]