mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 08:38:20 +08:00
Fix double dashes inside ocr output
Double or more dashes in OCR predictions like "Q--010-UL" breaks the logic in check_name because they creates ficticious empty strings after split by dash. Fix this by manually remove the empty strings
This commit is contained in:
@@ -381,6 +381,7 @@ class ResearchProject:
|
||||
"""
|
||||
name = name.strip('-')
|
||||
parts = name.split('-')
|
||||
parts = [i for i in parts if i]
|
||||
if len(parts) == 3:
|
||||
prefix, number, suffix = parts
|
||||
number = number.replace('D', '0').replace('O', '0').replace('S', '5')
|
||||
|
||||
Reference in New Issue
Block a user