diff --git a/arknights_mower/data/ocr.json b/arknights_mower/data/ocr.json index 45b14be23..155404b05 100644 --- a/arknights_mower/data/ocr.json +++ b/arknights_mower/data/ocr.json @@ -39,5 +39,6 @@ "刻力": "刻刀", "泰拉大陆调查": "泰拉大陆调查团", "子": "孑", - "森": "森蚺" + "森": "森蚺", + "屯艾雅法拉": "纯烬艾雅法拉" } diff --git a/arknights_mower/utils/character_recognize.py b/arknights_mower/utils/character_recognize.py index 569b0810a..711030c97 100644 --- a/arknights_mower/utils/character_recognize.py +++ b/arknights_mower/utils/character_recognize.py @@ -143,14 +143,15 @@ def paddle_recog(__img): # 以单字猜测双字干员不可靠 # 以“白面鹃”或“白面”匹配“白面鸮”没问题 # 注意避免“白面”匹配到“白雪” + # “屯艾雅法拉”应匹配“纯烬艾雅法拉”,而非“艾雅法拉” for x in agent_sorted: score = -abs(len(x) - len(recog_text)) for c in set(x): score += 3 if c in recog_text else 0 - if score > best_score: + if score >= best_score: best = x best_score = score - if best_score > len(best): + if best_score >= len(best): logger.debug(f"{recog_text} --?--> {best}") return best return None