From 95aa24e68cda458d0ae0ea8d43be4b59eef5f24c Mon Sep 17 00:00:00 2001 From: Bigsk Date: Sat, 21 Jan 2023 23:11:16 +0800 Subject: [PATCH] sort optimization --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index ac114fb..e33c7f2 100644 --- a/main.py +++ b/main.py @@ -230,6 +230,8 @@ class number(object): ) ocr_filter.append(e[1]) + ocr_result = sorted(ocr_result, key=lambda x:len(x[1]), reverse=True) + # Read database for i in ocr_result: r = self.search(i[1])