fix: apply column union when total_cols >= max (not just >)
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 29s
CI / test-go-edu-search (push) Successful in 28s
CI / test-python-klausur (push) Failing after 2m5s
CI / test-python-agent-core (push) Successful in 17s
CI / test-nodejs-website (push) Successful in 17s
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 29s
CI / test-go-edu-search (push) Successful in 28s
CI / test-python-klausur (push) Failing after 2m5s
CI / test-python-agent-core (push) Successful in 17s
CI / test-nodejs-website (push) Successful in 17s
Zone 4 found 4 columns incl. page_ref, union also yields 4. The strict > check prevented union from applying to Zone 0. Changed to >= so all content zones get the merged column set. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -568,9 +568,11 @@ async def build_grid(session_id: str):
|
||||
for zg in content_zones
|
||||
)
|
||||
|
||||
# Only apply union if it found more columns than
|
||||
# any single zone (union adds information)
|
||||
if total_cols > max_zone_cols:
|
||||
# Apply union whenever it has at least as many
|
||||
# columns as the best single zone. Even with the
|
||||
# same count the union boundaries are better because
|
||||
# they incorporate evidence from all zones.
|
||||
if total_cols >= max_zone_cols:
|
||||
cx_min = min(w["left"] for w in all_words)
|
||||
cx_max = max(
|
||||
w["left"] + w["width"] for w in all_words
|
||||
|
||||
Reference in New Issue
Block a user