diff --git a/工具v2/database_tools.py b/工具v2/database_tools.py index 47d8795a..2f29aa8d 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -1223,6 +1223,7 @@ def RefineMathpix(raw_string): # 进一步修改mathpix得到的字符串 string = re.sub(r"\\right([\.\)\]|])",lambda matchobj: "" if matchobj.group(1) == "." else matchobj.group(1),string) #删去括号前的\right标记\ string = re.sub(r"\\left\\\{","\\{",string) #删去大括号前的\left标记 string = re.sub(r"\\right\\\}","\\}",string) #删去大括号前的\right标记 + string = string.replace("\\left\\langle","\\langle").replace("\\right\\rangle","\\rangle") for s in puctuationsfulltosemi: string = re.sub(s,puctuationsfulltosemi[s],string) #将部分全角标记替换为半角 for s in replacestrings: