Fmt only (maybe)
This commit is contained in:
@@ -58,7 +58,7 @@ def replace_punctuation(text: str) -> str:
|
||||
"「": "'",
|
||||
"」": "'",
|
||||
}
|
||||
pattern = re.compile("|".join(re.escape(p) for p in REPLACE_MAP.keys()))
|
||||
pattern = re.compile("|".join(re.escape(p) for p in REPLACE_MAP))
|
||||
replaced_text = pattern.sub(lambda x: REPLACE_MAP[x.group()], text)
|
||||
# replaced_text = re.sub(
|
||||
# r"[^\u3040-\u309F\u30A0-\u30FF\u4E00-\u9FFF\u3400-\u4DBF\u3005"
|
||||
|
||||
Reference in New Issue
Block a user