We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4bff69 commit a4be0dfCopy full SHA for a4be0df
lib/sycamore/sycamore/transforms/table_structure/table_transformers.py
@@ -244,8 +244,12 @@ def slot_into_containers(
244
for container_num, container in sorted_co:
245
# If the container starts after the package ends, break
246
if not _early_exit_vertical and container["bbox"][0] > package["bbox"][2]:
247
+ if len(match_scores) == 0:
248
+ match_scores.append({"container": container, "container_num": container_num, "score": 0})
249
break
250
elif _early_exit_vertical and container["bbox"][1] > package["bbox"][3]:
251
252
253
254
container_rect = BoundingBox(*container["bbox"])
255
intersect_area = container_rect.intersect(package_rect).area
0 commit comments