mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-01 10:04:12 +08:00
rm
This commit is contained in:
parent
d817215486
commit
8ed7e97172
@ -130,11 +130,6 @@ def makeproxytab(self, basel):
|
|||||||
item="cishu",
|
item="cishu",
|
||||||
name="./LunaTranslator/cishu/%s.py",
|
name="./LunaTranslator/cishu/%s.py",
|
||||||
)
|
)
|
||||||
hira = getall(
|
|
||||||
l=getnotofflines("hirasetting"),
|
|
||||||
item="hirasetting",
|
|
||||||
name="./LunaTranslator/hiraparse/%s.py",
|
|
||||||
)
|
|
||||||
github = getall(
|
github = getall(
|
||||||
l=globalconfig["github"],
|
l=globalconfig["github"],
|
||||||
item="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, readers),
|
||||||
functools.partial(makescrollgrid, cishus),
|
functools.partial(makescrollgrid, cishus),
|
||||||
functools.partial(makescrollgrid, meta),
|
functools.partial(makescrollgrid, meta),
|
||||||
functools.partial(makescrollgrid, hira),
|
|
||||||
functools.partial(makescrollgrid, github),
|
functools.partial(makescrollgrid, github),
|
||||||
],
|
],
|
||||||
delay=True,
|
delay=True,
|
||||||
|
@ -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"])
|
|
@ -1136,14 +1136,6 @@
|
|||||||
},
|
},
|
||||||
"type": "offline"
|
"type": "offline"
|
||||||
},
|
},
|
||||||
"mojinlt": {
|
|
||||||
"use": false,
|
|
||||||
"name": "mojinlt",
|
|
||||||
"args": {
|
|
||||||
"Moji NLT Token": ""
|
|
||||||
},
|
|
||||||
"useproxy": false
|
|
||||||
},
|
|
||||||
"latin": {
|
"latin": {
|
||||||
"use": false,
|
"use": false,
|
||||||
"name": "标点",
|
"name": "标点",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user