From 23b210d8208c02bd825a63e6e90ff1f137f195eb Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Wed, 27 Sep 2023 23:49:56 +0800 Subject: [PATCH] Fix: Handle ocr error on plane name --- tasks/base/main_page.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/base/main_page.py b/tasks/base/main_page.py index 7d9fcc726..b78086b96 100644 --- a/tasks/base/main_page.py +++ b/tasks/base/main_page.py @@ -18,12 +18,17 @@ class OcrPlaneName(Ocr): def after_process(self, result): # RobotSettlement1 result = re.sub(r'-[Ii1]$', '', result) + result = re.sub(r'I$', '', result) result = re.sub(r'\d+$', '', result) # Herta's OfficeY/ result = re.sub(r'Y/?$', '', result) + # Stargazer Navatia -> Stargazer Navalia + result = result.replace('avatia', 'avalia') # 累塔的办公室 result = result.replace('累塔', '黑塔') + if '星港' in result: + result = '迴星港' return super().after_process(result)