From 64281768a96f1b144e1a1250066ec27b5f5077f7 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Thu, 12 Mar 2026 10:18:14 +0100 Subject: [PATCH] =?UTF-8?q?run=5Fgraphics=5Fand=5Fcolumns=5Flight:=20fix?= =?UTF-8?q?=20double=201-off=20error=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- src/eynollah/eynollah.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eynollah/eynollah.py b/src/eynollah/eynollah.py index f3229d9..6cea071 100644 --- a/src/eynollah/eynollah.py +++ b/src/eynollah/eynollah.py @@ -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))