From 31c63f9e4cdfab853c655d85f9a05af0e0d40a29 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Mon, 9 Nov 2020 16:55:43 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20dinglehopper:=20s/LOG/log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qurator/dinglehopper/extracted_text.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qurator/dinglehopper/extracted_text.py b/qurator/dinglehopper/extracted_text.py index dfbb892..d785754 100644 --- a/qurator/dinglehopper/extracted_text.py +++ b/qurator/dinglehopper/extracted_text.py @@ -243,7 +243,7 @@ def get_textequiv_unicode(text_segment, nsmap) -> str: def get_first_textequiv(textequivs, segment_id): """Get the first TextEquiv based on index or conf order if index is not present.""" - LOG = getLogger('processor.OcrdDinglehopperEvaluate') + log = getLogger('processor.OcrdDinglehopperEvaluate') if len(textequivs) == 1: return textequivs[0] @@ -252,18 +252,18 @@ def get_first_textequiv(textequivs, segment_id): nan_mask = np.isnan(indices) if np.any(~nan_mask): if np.any(nan_mask): - LOG.warning("TextEquiv without index in %s.", segment_id) + log.warning("TextEquiv without index in %s.", segment_id) index = np.nanargmin(indices) else: # try ordering by conf confidences = np.array([get_attr(te, 'conf') for te in textequivs], dtype=float) if np.any(~np.isnan(confidences)): - LOG.info("No index attributes, use 'conf' attribute to sort TextEquiv in %s.", + log.info("No index attributes, use 'conf' attribute to sort TextEquiv in %s.", segment_id) index = np.nanargmax(confidences) else: # fallback to first entry in case of neither index or conf present - LOG.warning("No index attributes, use first TextEquiv in %s.", segment_id) + log.warning("No index attributes, use first TextEquiv in %s.", segment_id) index = 0 return textequivs[index]