mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-10-11 22:02:06 +00:00
fix: remove semicolon and dot in ocr results
This commit is contained in:
@@ -6,12 +6,13 @@ from typing import ClassVar
|
|||||||
import module.config.server as server
|
import module.config.server as server
|
||||||
from module.exception import ScriptError
|
from module.exception import ScriptError
|
||||||
|
|
||||||
REGEX_PUNCTUATION = re.compile(r'[ ,.\'"“”,。::!!??·•\-—/\\\n\t()\[\]()「」『』【】《》[]]')
|
# ord('.') = 65294
|
||||||
|
REGEX_PUNCTUATION = re.compile(r'[ ,..\'"“”,。::;;!!??·•\-—/\\\n\t()\[\]()「」『』【】《》[]]')
|
||||||
|
|
||||||
|
|
||||||
def parse_name(n):
|
def parse_name(n):
|
||||||
n = REGEX_PUNCTUATION.sub('', str(n)).lower()
|
n = REGEX_PUNCTUATION.sub('', str(n)).lower()
|
||||||
return n
|
return n.strip()
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|||||||
Reference in New Issue
Block a user