run_graphics_and_columns_light: fix double 1-off error…

When `num_col_classifier` predicted result gets bypassed
by heuristic result from `find_num_col()` (because prediction
had too little confidence or `calculate_width_height_by_columns()`
would have become too large), do not increment `num_col` further
(already 1 more than colseps).
This commit is contained in:
Robert Sachunsky 2026-03-12 10:18:14 +01:00
parent 46c5f52491
commit 64281768a9

View file

@ -1736,7 +1736,7 @@ class Eynollah:
num_col, _ = find_num_col(img_only_regions, num_col_classifier, self.tables, multiplier=6.0)
num_col = num_col + 1
if not num_column_is_classified:
num_col_classifier = num_col + 1
num_col_classifier = num_col
num_col_classifier = min(self.num_col_upper or num_col_classifier,
max(self.num_col_lower or num_col_classifier,
num_col_classifier))