From 551823948c330a06efff7731f37a363e70830daf Mon Sep 17 00:00:00 2001 From: wangweiye7840 Date: Wed, 19 Jul 2023 12:49:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0mathpix=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E6=96=87=E5=AD=97=E8=87=AA=E5=8A=A8=E6=9B=B4=E6=AD=A3=E7=9A=84?= =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E6=83=85=E5=BD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具v2/database_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/工具v2/database_tools.py b/工具v2/database_tools.py index 5c2da76f..74627d80 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -947,7 +947,7 @@ def setCopy(string): # 写入剪切板内容 def RefineMathpix(raw_string): # 进一步修改mathpix得到的字符串 puctuationsfulltosemi = {" ": " ","。": ". ",".": ". ",",": ", ",":": ": ",";": "; ","(": "(",")": ")","?": "? ","“": "``","”": "''", "【": "[", "】": "]"} replacestrings = {r"\\overparen": r"\\overset\\frown", "eqslant": "eq", r"\\vec": r"\\overrightarrow ", r"\\bar": r"\\overline", r"\\lim": r"\\displaystyle\\lim", r"\\sum":r"\\displaystyle\\sum", r"\\prod":r"\\displaystyle\\prod", r"\\mid":"|", r"\^\{\\prime\}":"'",r"e\^":r"\\mathrm{e}^"} - wrongrecog = {"雉":"锥","[粗秿]圆":"椭圆","投郑":"投掷","抛郑":"抛掷","范目":"范围","揷":"插","末见":"未见","末成":"未成","针角":"钝角"} + wrongrecog = {"雉":"锥","[粗秿]圆":"椭圆","投郑":"投掷","抛郑":"抛掷","范目":"范围","揷":"插","末见":"未见","末成":"未成","针角":"钝角","幕函数":"幂函数","末知":"未知"} string = raw_string string = re.sub(r"\\left(?:\.?)|\\right(?:\.?)","",string) #删去括号前的\left与\right标记 for s in puctuationsfulltosemi: