This commit is contained in:
恍兮惚兮 2024-07-28 14:47:22 +08:00
parent d817215486
commit 8ed7e97172
3 changed files with 0 additions and 50 deletions

View File

@ -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,

View File

@ -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"])

View File

@ -1136,14 +1136,6 @@
},
"type": "offline"
},
"mojinlt": {
"use": false,
"name": "mojinlt",
"args": {
"Moji NLT Token": ""
},
"useproxy": false
},
"latin": {
"use": false,
"name": "标点",