diff --git a/LunaTranslator/LunaTranslator/gui/setting_proxy.py b/LunaTranslator/LunaTranslator/gui/setting_proxy.py index 392e912a..a92bcae1 100644 --- a/LunaTranslator/LunaTranslator/gui/setting_proxy.py +++ b/LunaTranslator/LunaTranslator/gui/setting_proxy.py @@ -130,11 +130,6 @@ def makeproxytab(self, basel): item="cishu", name="./LunaTranslator/cishu/%s.py", ) - hira = getall( - l=getnotofflines("hirasetting"), - item="hirasetting", - name="./LunaTranslator/hiraparse/%s.py", - ) github = getall( l=globalconfig["github"], item="github", @@ -152,7 +147,6 @@ def makeproxytab(self, basel): "语音合成", "辞书", "元数据", - "分词", "自动更新", ], [ @@ -162,7 +156,6 @@ def makeproxytab(self, basel): functools.partial(makescrollgrid, readers), functools.partial(makescrollgrid, cishus), functools.partial(makescrollgrid, meta), - functools.partial(makescrollgrid, hira), functools.partial(makescrollgrid, github), ], delay=True, diff --git a/LunaTranslator/LunaTranslator/hiraparse/mojinlt.py b/LunaTranslator/LunaTranslator/hiraparse/mojinlt.py deleted file mode 100644 index 9cd61da6..00000000 --- a/LunaTranslator/LunaTranslator/hiraparse/mojinlt.py +++ /dev/null @@ -1,35 +0,0 @@ -import requests -from hiraparse.basehira import basehira - - -class mojinlt(basehira): - def parse(self, text): - - def nlt(text, token): - try: - response = requests.post( - "https://api.mojidict.com/parse/functions/nlt-tokenizeText", - json={ - "text": text, - "_ApplicationId": "E62VyFVLMiW7kvbtVq3p", - "_SessionToken": token, - }, - headers={ - "content-type": "text/plain", - "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36", - }, - proxies=self.proxy, - ) - - return [ - { - "orig": result["surface_form"], - "hira": result["reading"], - "cixing": result["pos"], - } - for result in response.json()["result"]["result"] - ] - except: - return [] - - return nlt(text, self.config["Moji NLT Token"]) diff --git a/LunaTranslator/files/defaultconfig/config.json b/LunaTranslator/files/defaultconfig/config.json index 01d8ab6c..2f307374 100644 --- a/LunaTranslator/files/defaultconfig/config.json +++ b/LunaTranslator/files/defaultconfig/config.json @@ -1136,14 +1136,6 @@ }, "type": "offline" }, - "mojinlt": { - "use": false, - "name": "mojinlt", - "args": { - "Moji NLT Token": "" - }, - "useproxy": false - }, "latin": { "use": false, "name": "标点",