From 5c4186cbfcd21476a3faf379dc540de581c844d1 Mon Sep 17 00:00:00 2001 From: djstrong Date: Sat, 13 Feb 2021 12:06:27 +0100 Subject: [PATCH] fix infinite loop for small dataset fix infinite loop if number of sentences is smaller than number of sections (30) --- edm/datastructures/data_structures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edm/datastructures/data_structures.py b/edm/datastructures/data_structures.py index 4ba091e..866e724 100644 --- a/edm/datastructures/data_structures.py +++ b/edm/datastructures/data_structures.py @@ -178,7 +178,7 @@ def _loading_bar(count, numSections, total, startTime): """ Prints a loading bar. """ - numPerSection = int(total / numSections) + numPerSection = min(1, int(total / numSections)) sections = 0 i = 0