Fix: handle duration OCR error "Oh"

This commit is contained in:
LmeSzinc 2023-09-27 03:14:51 +08:00
parent 96b6bdadf0
commit fe73e8879c

View File

@ -392,6 +392,7 @@ class Duration(Ocr):
def after_process(self, result):
result = super().after_process(result)
result = result.strip('.,。,')
result = result.replace('Oh', '0h').replace('oh', '0h')
return result
def format_result(self, result: str) -> timedelta: