diff --git a/arknights_mower/utils/character_recognize.py b/arknights_mower/utils/character_recognize.py index d133353cb..569b0810a 100644 --- a/arknights_mower/utils/character_recognize.py +++ b/arknights_mower/utils/character_recognize.py @@ -142,14 +142,15 @@ def paddle_recog(__img): # “森蚺”可能识别成“森”,“孑”可能识别成“子”(子月) # 以单字猜测双字干员不可靠 # 以“白面鹃”或“白面”匹配“白面鸮”没问题 + # 注意避免“白面”匹配到“白雪” for x in agent_sorted: score = -abs(len(x) - len(recog_text)) for c in set(x): - score += 1 if c in recog_text else 0 + score += 3 if c in recog_text else 0 if score > best_score: best = x best_score = score - if best_score > 0: + if best_score > len(best): logger.debug(f"{recog_text} --?--> {best}") return best return None