+
Skip to content

Conversation

karanataryn
Copy link
Contributor

Adds the necessary plumbing as well.

@karanataryn karanataryn changed the title Add Function to Resolve Overlaps in Tables Add Ability to Resolve Boundary Overlaps in Tables Jun 10, 2025
@karanataryn karanataryn requested a review from Copilot June 10, 2025 00:54
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds the ability to resolve boundary overlaps in tables by introducing a new boolean parameter and a dedicated function to adjust row and column boundaries. Key changes include:

  • Adding the "resolve_overlaps" parameter to objects_to_table, refine_rows, refine_columns, and related functions.
  • Implementing a new function to adjust overlapping boundaries for rows and columns.
  • Propagating the new functionality through the table extraction process in the extract.py module.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/sycamore/sycamore/transforms/table_structure/table_transformers.py Adds resolve_overlaps parameter, introduces resolve_overlaps() function, and updates refinement functions to optionally adjust overlaps.
lib/sycamore/sycamore/transforms/table_structure/extract.py Updates the extract function to accept and pass along the resolve_overlaps flag.
Comments suppressed due to low confidence (2)

lib/sycamore/sycamore/transforms/table_structure/table_transformers.py:213

  • The boolean parameter 'resolve_overlaps' in 'refine_rows' conflicts with the function 'resolve_overlaps' defined in the module, causing a naming collision. Consider renaming the parameter (e.g., 'apply_overlap_resolution') or explicitly referencing the function to avoid shadowing.
if resolve_overlaps:

lib/sycamore/sycamore/transforms/table_structure/table_transformers.py:303

  • The use of 'resolve_overlaps' as a boolean parameter in 'refine_columns' shadows the global function 'resolve_overlaps'. Renaming the parameter (e.g., 'apply_overlap_resolution') will help prevent unintended behavior.
if resolve_overlaps:

@karanataryn karanataryn merged commit b5683ca into main Jun 10, 2025
12 of 15 checks passed
@karanataryn karanataryn deleted the ksampath/add-unstructured-table-handling branch June 10, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载