From 58e054a008013c8a1be869b3014c3ba2a3365df2 Mon Sep 17 00:00:00 2001 From: Asxcvbn <63904802+Asxcvbn@users.noreply.github.com> Date: Wed, 6 Mar 2024 15:47:21 +0800 Subject: [PATCH] RuanMei OCR postprocess in CN (#358) * RuanMei OCR postprocess in CN * dont match dot between ruanmei when ocr postprocess * RuanMei OCR postprocess in CN update: used a wildcard for the dot between Ruan and Mei --- tasks/character/switch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/character/switch.py b/tasks/character/switch.py index 7f8faf301..4240a9309 100644 --- a/tasks/character/switch.py +++ b/tasks/character/switch.py @@ -23,6 +23,8 @@ class OcrCharacterName(OcrWhiteLetterOnComplexBackground): # Dan Heng o.ImbibitorLunae result = re.sub(r'[0Oo\-. ]{1,3}Imbi', 'Imbi', result) + result = re.sub(r'院.?梅', '阮•梅', result) + return super().after_process(result)