From 05a9197bb80707a45f7e406af58bb25e41a243d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Wed, 22 May 2024 14:21:01 +0800 Subject: [PATCH] opti --- LunaTranslator/LunaTranslator/cishu/edict.py | 3 +- LunaTranslator/LunaTranslator/cishu/edict2.py | 5 +- .../LunaTranslator/cishu/linggesi.py | 3 +- LunaTranslator/LunaTranslator/cishu/mdict.py | 2 +- .../LunaTranslator/cishu/xiaoxueguan.py | 3 +- .../LunaTranslator/cishu/yomichan.py | 53 +++++++-------- .../LunaTranslator/gui/inputdialog.py | 4 +- .../LunaTranslator/gui/settingpage2.py | 4 +- .../LunaTranslator/myutils/config.py | 2 +- .../LunaTranslator/translator/premt.py | 10 +-- .../LunaTranslator/translator/rengong.py | 9 ++- .../LunaTranslator/winsharedutils.py | 10 ++- .../files/defaultconfig/config.json | 64 +++++++++++++++---- .../files/defaultconfig/static_data.json | 10 +-- LunaTranslator/files/lang/ar.json | 5 +- LunaTranslator/files/lang/cht.json | 5 +- LunaTranslator/files/lang/en.json | 5 +- LunaTranslator/files/lang/es.json | 5 +- LunaTranslator/files/lang/fr.json | 5 +- LunaTranslator/files/lang/it.json | 5 +- LunaTranslator/files/lang/ja.json | 5 +- LunaTranslator/files/lang/ko.json | 5 +- LunaTranslator/files/lang/pl.json | 5 +- LunaTranslator/files/lang/ru.json | 5 +- LunaTranslator/files/lang/th.json | 5 +- LunaTranslator/files/lang/tr.json | 5 +- LunaTranslator/files/lang/uk.json | 5 +- LunaTranslator/files/lang/vi.json | 5 +- LunaTranslator/files/lang/zh.json | 7 +- 29 files changed, 149 insertions(+), 110 deletions(-) diff --git a/LunaTranslator/LunaTranslator/cishu/edict.py b/LunaTranslator/LunaTranslator/cishu/edict.py index 50032c6a..c6d98763 100644 --- a/LunaTranslator/LunaTranslator/cishu/edict.py +++ b/LunaTranslator/LunaTranslator/cishu/edict.py @@ -25,7 +25,8 @@ class edict(cishubase): dis = [] for w, xx in exp: d = winsharedutils.distance(w, word) - dis.append(d) + if d <= self.config["distance"]: + dis.append(d) save = [] srt = argsort(dis) for ii in srt: diff --git a/LunaTranslator/LunaTranslator/cishu/edict2.py b/LunaTranslator/LunaTranslator/cishu/edict2.py index 9da10afc..73d2e2e0 100644 --- a/LunaTranslator/LunaTranslator/cishu/edict2.py +++ b/LunaTranslator/LunaTranslator/cishu/edict2.py @@ -32,8 +32,9 @@ class edict2(cishubase): for w in self.save: if word in w or w in word: d = winsharedutils.distance(w, word) - dis.append(d) - savew.append(w) + if d <= self.config["distance"]: + dis.append(d) + savew.append(w) saveres = [] srt = argsort(dis) for ii in srt: diff --git a/LunaTranslator/LunaTranslator/cishu/linggesi.py b/LunaTranslator/LunaTranslator/cishu/linggesi.py index 65f38609..0cd23edd 100644 --- a/LunaTranslator/LunaTranslator/cishu/linggesi.py +++ b/LunaTranslator/LunaTranslator/cishu/linggesi.py @@ -41,7 +41,8 @@ class linggesi(cishubase): for w, xx in exp: d = winsharedutils.distance(w, word) - mp[w] = [xx, d] + if d <= self.config["distance"]: + mp[w] = [xx, d] x = sorted(list(mp.keys()), key=lambda x: mp[x][1])[:10] save = [w + "
" + mp[w][0] for w in x] diff --git a/LunaTranslator/LunaTranslator/cishu/mdict.py b/LunaTranslator/LunaTranslator/cishu/mdict.py index 818f3eff..498542c6 100644 --- a/LunaTranslator/LunaTranslator/cishu/mdict.py +++ b/LunaTranslator/LunaTranslator/cishu/mdict.py @@ -2346,7 +2346,7 @@ class mdict(cishubase): for k in index("*" + word + "*"): dis = winsharedutils.distance(k, word) - if dis <= self.config["ambiguity"]: + if dis <= self.config["distance"]: results.append(k) diss[k] = dis diff --git a/LunaTranslator/LunaTranslator/cishu/xiaoxueguan.py b/LunaTranslator/LunaTranslator/cishu/xiaoxueguan.py index f23c69c6..812e1958 100644 --- a/LunaTranslator/LunaTranslator/cishu/xiaoxueguan.py +++ b/LunaTranslator/LunaTranslator/cishu/xiaoxueguan.py @@ -28,7 +28,8 @@ class xiaoxueguan(cishubase): for w, xx in exp: d = winsharedutils.distance(w, word) - dis.append(d) + if d <= self.config["distance"]: + dis.append(d) srt = argsort(dis)[:10] save = ["" + exp[i][1].replace("\\n", "") for i in srt] diff --git a/LunaTranslator/LunaTranslator/cishu/yomichan.py b/LunaTranslator/LunaTranslator/cishu/yomichan.py index 3567528f..88f0d035 100644 --- a/LunaTranslator/LunaTranslator/cishu/yomichan.py +++ b/LunaTranslator/LunaTranslator/cishu/yomichan.py @@ -1,7 +1,7 @@ import os import requests from urllib.parse import quote -import re,json +import re, json from myutils.proxy import getproxy from cishu.cishubase import cishubase @@ -11,31 +11,32 @@ class yomichan(cishubase): self.sql = None path = self.config["path"] - self.datas=[] + self.datas = [] for f in os.listdir(path): - if f.startswith('term_bank_') and f.endswith('.json'): - with open(os.path.join(path,f),'r',encoding='utf8') as ff: - self.datas+=json.loads(ff.read()) - + if f.startswith("term_bank_") and f.endswith(".json"): + with open(os.path.join(path, f), "r", encoding="utf8") as ff: + self.datas += json.loads(ff.read()) + def search(self, word): - best=[] - normal=[] - bad=[] + results = [] + diss = {} + import winsharedutils + for item in self.datas: - if item[0]==word: - best.append(item) - elif item[0].startswith(word) or item[0].endswith(word): - normal.append(item) - elif word in item[0]: - bad.append(item) - - if len(bad)+len(best)+len(normal)==0:return - html='' - for item in best+normal+bad: - word=item[0] - hira=item[1] - explain=item[5][0].replace("\n","
") - html+=f'{word}{hira}{explain}' - html=f'{html}
' - #print(html) - return html \ No newline at end of file + dis = winsharedutils.distance(item[0], word) + if dis <= self.config["distance"]: + results.append(item) + diss[item[0]] = dis + if len(results) == 0: + return + results = sorted(results, key=lambda x: diss[x[0]]) + + html = "" + for item in results: + word = item[0] + hira = item[1] + explain = item[5][0].replace("\n", "
") + html += f'{word}{hira}{explain}' + html = f"{html}
" + # print(html) + return html diff --git a/LunaTranslator/LunaTranslator/gui/inputdialog.py b/LunaTranslator/LunaTranslator/gui/inputdialog.py index 9b15465d..96ee6c3c 100644 --- a/LunaTranslator/LunaTranslator/gui/inputdialog.py +++ b/LunaTranslator/LunaTranslator/gui/inputdialog.py @@ -277,7 +277,7 @@ class autoinitdialog(QDialog): lineW = QLineEdit(dd[key]) regist.append([dd, key, lineW.text]) except: - #被废弃的参数若为int型但失去argstype注释会崩溃,直接continue; + # 被废弃的参数若为int型但失去argstype注释会崩溃,直接continue; continue elif line["type"] == "file": e = QLineEdit(dd[key]) @@ -289,7 +289,7 @@ class autoinitdialog(QDialog): line.get("multi", False), e, line["dir"], - "" if line["dir"] else line["filter"], + "" if line["dir"] else line.get("filter", None), ) ) lineW = QHBoxLayout() diff --git a/LunaTranslator/LunaTranslator/gui/settingpage2.py b/LunaTranslator/LunaTranslator/gui/settingpage2.py index 5920a2bc..3fe4c84c 100644 --- a/LunaTranslator/LunaTranslator/gui/settingpage2.py +++ b/LunaTranslator/LunaTranslator/gui/settingpage2.py @@ -196,8 +196,8 @@ def setTabTwo_lazy(self): ("预翻译采用模糊匹配", 8), (getsimpleswitch(globalconfig, "premtsimiuse"), 1), "", - ("模糊匹配相似度", 8), - (getspinbox(0, 500, globalconfig, "premtsimi"), 3), + ("模糊匹配_相似度_%", 8), + (getspinbox(0, 100, globalconfig, "premtsimi2"), 3), ], [ (bt, 12), diff --git a/LunaTranslator/LunaTranslator/myutils/config.py b/LunaTranslator/LunaTranslator/myutils/config.py index a02de560..3134e567 100644 --- a/LunaTranslator/LunaTranslator/myutils/config.py +++ b/LunaTranslator/LunaTranslator/myutils/config.py @@ -230,7 +230,7 @@ def _TR(k): except: if "_" in k: splits = k.split("_") - return "_".join([_TR(_) for _ in splits]) + return " ".join([_TR(_) for _ in splits]) if k not in languageshow or languageshow[k] == "": languageshow[k] = "" diff --git a/LunaTranslator/LunaTranslator/translator/premt.py b/LunaTranslator/LunaTranslator/translator/premt.py index 6b456367..883d7408 100644 --- a/LunaTranslator/LunaTranslator/translator/premt.py +++ b/LunaTranslator/LunaTranslator/translator/premt.py @@ -38,17 +38,17 @@ class TS(basetrans): self.unsafegetcurrentgameconfig(), self.config["sqlite文件"] ) if globalconfig["premtsimiuse"]: - mindis = 9999999 + maxsim = 0 savet = "{}" ret = self.sql.execute("SELECT * FROM artificialtrans ").fetchall() for line in ret: text = line[1] trans = line[2] - dis = winsharedutils.distance(content, text) - if dis < mindis: - mindis = dis - if mindis < globalconfig["premtsimi"]: + dis = winsharedutils.distance_ratio(content, text) + if dis > maxsim: + maxsim = dis + if maxsim * 100 >= globalconfig["premtsimi2"]: savet = trans try: ret = json.loads(savet) diff --git a/LunaTranslator/LunaTranslator/translator/rengong.py b/LunaTranslator/LunaTranslator/translator/rengong.py index 9ea98c2c..fa76214c 100644 --- a/LunaTranslator/LunaTranslator/translator/rengong.py +++ b/LunaTranslator/LunaTranslator/translator/rengong.py @@ -40,13 +40,12 @@ class TS(basetrans): self.unsafegetcurrentgameconfig(), self.config["json文件"] ) if globalconfig["premtsimiuse"]: - mindis = 9999999 - + maxsim = 0 for jc in self.json: dis = winsharedutils.distance(content, jc) - if dis < mindis: - mindis = dis - if mindis < globalconfig["premtsimi"]: + if dis > maxsim: + maxsim = dis + if maxsim * 100 >= globalconfig["premtsimi2"]: if type(self.json[jc]) == str: savet = self.json[jc] elif ( diff --git a/LunaTranslator/LunaTranslator/winsharedutils.py b/LunaTranslator/LunaTranslator/winsharedutils.py index 8a7e5c67..0fbc5042 100644 --- a/LunaTranslator/LunaTranslator/winsharedutils.py +++ b/LunaTranslator/LunaTranslator/winsharedutils.py @@ -17,6 +17,7 @@ from ctypes import ( c_size_t, windll, c_float, + c_double, c_char, ) from ctypes.wintypes import WORD, HANDLE, HWND, LONG, DWORD @@ -62,6 +63,9 @@ _SAPI_Speak.restype = c_bool _levenshtein_distance = utilsdll.levenshtein_distance _levenshtein_distance.argtypes = c_uint, c_wchar_p, c_uint, c_wchar_p _levenshtein_distance.restype = c_uint # 实际上应该都是size_t,但size_t 32位64位宽度不同,都用32位就行了,用int64会内存越界 +levenshtein_ratio = utilsdll.levenshtein_ratio +levenshtein_ratio.argtypes = c_uint, c_wchar_p, c_uint, c_wchar_p +levenshtein_ratio.restype = c_double _mecab_init = utilsdll.mecab_init _mecab_init.argtypes = c_char_p, c_wchar_p @@ -122,10 +126,14 @@ def SAPI_Speak(content, v, voiceid, rate, volume): return data -def distance(s1, s2): +def distance(s1, s2): # 词典更适合用编辑距离,因为就一两个字符,相似度会很小,预翻译适合用相似度 return _levenshtein_distance(len(s1), s1, len(s2), s2) +def distance_ratio(s1, s2): + return levenshtein_ratio(len(s1), s1, len(s2), s2) + + class mecabwrap: def __init__(self, mecabpath) -> None: self.kks = _mecab_init( diff --git a/LunaTranslator/files/defaultconfig/config.json b/LunaTranslator/files/defaultconfig/config.json index 9dd46711..8e027305 100644 --- a/LunaTranslator/files/defaultconfig/config.json +++ b/LunaTranslator/files/defaultconfig/config.json @@ -184,17 +184,17 @@ "ocrcroped": false, "autoruntts": false, "autoruntts2": false, - "simulate_key":{ - "1":{ - "use":false, - "keycode":120 + "simulate_key": { + "1": { + "use": false, + "keycode": 120 }, - "2":{ - "use":false, - "keycode":120 + "2": { + "use": false, + "keycode": 120 } }, - "autocrop":false + "autocrop": false }, "ankiwindow": [ 100, @@ -222,7 +222,7 @@ "accept_use_unicode_end": 65535, "premtsimiuse": false, "buttoncolor": "#001f9f", - "premtsimi": 5, + "premtsimi2": 100, "ocrrangecolor": "#000000", "ocrrangewidth": 2, "useproxy": true, @@ -770,6 +770,7 @@ "xiaoxueguan": { "args": { "path": "", + "distance": 0, "priority": 100 }, "argstype": { @@ -779,6 +780,13 @@ "dir": false, "filter": "*.db" }, + "distance": { + "type": "intspin", + "name": "模糊匹配_编辑距离", + "min": 0, + "max": 100, + "step": 1 + }, "priority": { "type": "intspin", "name": "优先级", @@ -795,6 +803,7 @@ "name": "EDICT", "args": { "path": "", + "distance": 0, "priority": 100 }, "argstype": { @@ -804,6 +813,13 @@ "dir": false, "filter": "*.db" }, + "distance": { + "type": "intspin", + "name": "模糊匹配_编辑距离", + "min": 0, + "max": 100, + "step": 1 + }, "priority": { "type": "intspin", "name": "优先级", @@ -818,6 +834,7 @@ "name": "EDICT2", "args": { "path": "", + "distance": 0, "priority": 100 }, "argstype": { @@ -826,6 +843,13 @@ "name": "路径", "dir": false }, + "distance": { + "type": "intspin", + "name": "模糊匹配_编辑距离", + "min": 0, + "max": 100, + "step": 1 + }, "priority": { "type": "intspin", "name": "优先级", @@ -840,6 +864,7 @@ "name": "灵格斯词典", "args": { "path": "", + "distance": 0, "priority": 100 }, "argstype": { @@ -848,6 +873,13 @@ "name": "路径", "dir": true }, + "distance": { + "type": "intspin", + "name": "模糊匹配_编辑距离", + "min": 0, + "max": 100, + "step": 1 + }, "priority": { "type": "intspin", "name": "优先级", @@ -926,6 +958,7 @@ "name": "yomichan termbank", "args": { "path": "", + "distance": 0, "priority": 100 }, "argstype": { @@ -934,6 +967,13 @@ "name": "路径", "dir": true }, + "distance": { + "type": "intspin", + "name": "模糊匹配_编辑距离", + "min": 0, + "max": 100, + "step": 1 + }, "priority": { "type": "intspin", "name": "优先级", @@ -964,7 +1004,7 @@ "name": "mdict", "args": { "path": "", - "ambiguity": 0, + "distance": 0, "priority": 100 }, "argstype": { @@ -975,9 +1015,9 @@ "multi": true, "filter": "*.mdx" }, - "ambiguity": { + "distance": { "type": "intspin", - "name": "ambiguity", + "name": "模糊匹配_编辑距离", "min": 0, "max": 100, "step": 1 diff --git a/LunaTranslator/files/defaultconfig/static_data.json b/LunaTranslator/files/defaultconfig/static_data.json index 3370b3a0..35637f62 100644 --- a/LunaTranslator/files/defaultconfig/static_data.json +++ b/LunaTranslator/files/defaultconfig/static_data.json @@ -717,13 +717,9 @@ "link": "https://github.com/HIllya51/RESOURCES/releases/download/dictionary/Mecab.zip" }, { - "name": "MeCab_unidic_latest", + "name": "MeCab_Unidic_latest", "link": "https://clrd.ninjal.ac.jp/unidic/" }, - { - "name": "Unidic", - "link": "https://clrd.ninjal.ac.jp/unidic_archive/2302/unidic-cwj-202302.zip" - }, { "name": "小学馆", "link": "https://github.com/HIllya51/RESOURCES/releases/download/dictionary/xiaoxueguan.db" @@ -739,6 +735,10 @@ { "name": "灵格斯词典", "link": "https://github.com/HIllya51/RESOURCES/releases/download/dictionary/Lingoes.zip" + }, + { + "name": "mdict", + "link": "https://freemdict.com/" } ] }, diff --git a/LunaTranslator/files/lang/ar.json b/LunaTranslator/files/lang/ar.json index a3e9d326..0b71a315 100644 --- a/LunaTranslator/files/lang/ar.json +++ b/LunaTranslator/files/lang/ar.json @@ -8,7 +8,6 @@ "内置": "مدمجة", "获取失败": "الحصول على فشل", "助動詞": "فعل مساعد", - "模糊匹配相似度限制": "غامض مطابقة التشابه الحد", "添加行": "إضافة صف", "在线OCR": "التعرف الضوئي على الحروف على الانترنت", "图标": "أيقونات", @@ -364,7 +363,6 @@ "连接超时": "اتصال مهلة", "搜索匹配的特征(hex)": "البحث عن مطابقة ميزة ( هيكس )", "彩云api": "لون سحابة API", - "模糊匹配相似度": "غامض مطابقة التشابه", "开始搜索": "بدء البحث", "选择进程": "عملية الاختيار", "如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~": "إذا كنت تشعر أن هذا البرنامج هو مفيد لك ، مرحبا بكم في رسالة صغيرة اكتساح رمز الراعي ، شكرا لك ~", @@ -793,5 +791,6 @@ "使用webview显示": "عرض باستخدام WebView", "录音时模拟按键": "التناظرية مفتاح التسجيل", "窗口截图": "نافذة لقطة", - "自动截图": "لقطة التلقائي" + "自动截图": "لقطة التلقائي", + "模糊匹配": "غامض مطابقة" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/cht.json b/LunaTranslator/files/lang/cht.json index b5b06718..54fadcf6 100644 --- a/LunaTranslator/files/lang/cht.json +++ b/LunaTranslator/files/lang/cht.json @@ -57,7 +57,6 @@ "最短翻译字数": "最短翻譯字數", "最长翻译字数": "最長翻譯字數", "预翻译采用模糊匹配": "預翻譯採用模糊匹配", - "模糊匹配相似度限制": "模糊匹配相似度限制", "录制翻译文件": "錄製翻譯檔案", "导出的第一翻译源": "匯出的第一翻譯源", "离线翻译": "離線翻譯", @@ -331,7 +330,6 @@ "xml目录": "xml目錄", "说明": "說明", "分析图像更新+周期执行": "分析影像更新+週期執行", - "模糊匹配相似度": "模糊匹配相似度", "翻译器字体": "翻譯器字體", "设置界面字体": "設定介面字體", "专有名词翻译设置按钮": "專有名詞翻譯設定按鈕", @@ -793,5 +791,6 @@ "使用webview显示": "使用webview顯示", "录音时模拟按键": "錄音時類比按鍵", "窗口截图": "視窗截圖", - "自动截图": "自動截圖" + "自动截图": "自動截圖", + "模糊匹配": "模糊匹配" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/en.json b/LunaTranslator/files/lang/en.json index b635d391..8f6e7ce7 100644 --- a/LunaTranslator/files/lang/en.json +++ b/LunaTranslator/files/lang/en.json @@ -188,7 +188,6 @@ "必应": "Bing", "判定詞": "Determinant", "设置所有词条为全局词条": "Set all entries as global entries", - "模糊匹配相似度限制": "Similarity limit of fuzzy matching", "翻译器字体类型": "Translator Font Type", "检测到游戏时自动开始": "Start automatically when a game is detected", "去除重复行": "Remove duplicate lines", @@ -331,7 +330,6 @@ "xml目录": "Xml directory", "说明": "explain", "分析图像更新+周期执行": "Analysis image update+periodic execution", - "模糊匹配相似度": "Fuzzy matching similarity", "翻译器字体": "Translator font", "设置界面字体": "Set interface font", "专有名词翻译设置按钮": "Proper noun translation setting button", @@ -793,5 +791,6 @@ "使用webview显示": "Display using webview", "录音时模拟按键": "Simulate buttons during recording", "窗口截图": "Window screenshot", - "自动截图": "Automatic screenshot" + "自动截图": "Automatic screenshot", + "模糊匹配": "Fuzzy matching" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/es.json b/LunaTranslator/files/lang/es.json index 71698619..e85051e2 100644 --- a/LunaTranslator/files/lang/es.json +++ b/LunaTranslator/files/lang/es.json @@ -57,7 +57,6 @@ "最短翻译字数": "Número mínimo de palabras traducidas", "最长翻译字数": "Número máximo de palabras traducidas", "预翻译采用模糊匹配": "La traducción previa adopta una coincidencia inútil", - "模糊匹配相似度限制": "Restricción de similitud de coincidencia inexistente", "录制翻译文件": "Grabar archivos traducidos", "导出的第一翻译源": "La primera fuente de traducción exportada", "离线翻译": "Traducción fuera de línea", @@ -331,7 +330,6 @@ "xml目录": "Catálogo XML", "说明": "Explicación", "分析图像更新+周期执行": "Actualización de la imagen de análisis + Ejecución del ciclo", - "模糊匹配相似度": "Similitud de coincidencia inexistente", "翻译器字体": "Fuente del traductor", "设置界面字体": "Establecer la fuente de la interfaz", "专有名词翻译设置按钮": "Botón de configuración de traducción de términos propios", @@ -793,5 +791,6 @@ "使用webview显示": "Mostrar con Webview", "录音时模拟按键": "Teclas de simulación durante la grabación", "窗口截图": "Captura de pantalla de la ventana", - "自动截图": "Captura de pantalla automática" + "自动截图": "Captura de pantalla automática", + "模糊匹配": "Coincidencia inútil" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/fr.json b/LunaTranslator/files/lang/fr.json index d3eef893..a9d61d97 100644 --- a/LunaTranslator/files/lang/fr.json +++ b/LunaTranslator/files/lang/fr.json @@ -57,7 +57,6 @@ "最短翻译字数": "Nombre minimum de mots traduits", "最长翻译字数": "Nombre maximum de mots traduits", "预翻译采用模糊匹配": "Correspondance floue utilisée dans la pré - traduction", - "模糊匹配相似度限制": "Limite de similarité floue", "录制翻译文件": "Enregistrer le fichier de traduction", "导出的第一翻译源": "Première source de traduction exportée", "离线翻译": "Traduction hors ligne", @@ -331,7 +330,6 @@ "xml目录": "Répertoire XML", "说明": "Description", "分析图像更新+周期执行": "Mise à jour de l'image analytique + exécution du cycle", - "模糊匹配相似度": "Similarité de correspondance floue", "翻译器字体": "Police du traducteur", "设置界面字体": "Définir les polices d'interface", "专有名词翻译设置按钮": "Bouton de configuration de traduction nom propre", @@ -793,5 +791,6 @@ "使用webview显示": "Afficher avec webview", "录音时模拟按键": "Simulation des touches lors de l'enregistrement", "窗口截图": "Capture d'écran de la fenêtre", - "自动截图": "Capture d'écran automatique" + "自动截图": "Capture d'écran automatique", + "模糊匹配": "Correspondance floue" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/it.json b/LunaTranslator/files/lang/it.json index 1a7b2016..a948f432 100644 --- a/LunaTranslator/files/lang/it.json +++ b/LunaTranslator/files/lang/it.json @@ -57,7 +57,6 @@ "最短翻译字数": "Numero minimo di parole tradotte", "最长翻译字数": "Numero massimo di parole tradotte", "预翻译采用模糊匹配": "Pre-traduzione usando corrispondenza sfocata", - "模糊匹配相似度限制": "Limite di somiglianza sfocato", "录制翻译文件": "Registrazione dei file di traduzione", "导出的第一翻译源": "Prima fonte di traduzione esportata", "离线翻译": "Traduzione offline", @@ -323,7 +322,6 @@ "xml目录": "Cartella XML", "说明": "spiegare", "分析图像更新+周期执行": "Analizza gli aggiornamenti delle immagini + esecuzione del ciclo", - "模糊匹配相似度": "Similitudine di corrispondenza sfocata", "翻译器字体": "Font del traduttore", "设置界面字体": "Imposta carattere interfaccia", "内嵌的翻译器": "Traduttore incorporato", @@ -793,5 +791,6 @@ "使用webview显示": "Visualizzazione tramite webview", "录音时模拟按键": "Simula pulsanti durante la registrazione", "窗口截图": "Schermata finestra", - "自动截图": "Schermata automatica" + "自动截图": "Schermata automatica", + "模糊匹配": "Corrispondenza sfocata" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ja.json b/LunaTranslator/files/lang/ja.json index f76cdbb4..b762bab8 100644 --- a/LunaTranslator/files/lang/ja.json +++ b/LunaTranslator/files/lang/ja.json @@ -57,7 +57,6 @@ "最短翻译字数": "最短翻訳文字数", "最长翻译字数": "最長翻訳文字数", "预翻译采用模糊匹配": "プリ翻訳にファジィマッチングを採用", - "模糊匹配相似度限制": "ファジィマッチング類似度制限", "录制翻译文件": "翻訳ファイルの記録", "导出的第一翻译源": "エクスポートされた最初の翻訳ソース", "离线翻译": "オフライン翻訳", @@ -331,7 +330,6 @@ "xml目录": "xmlディレクトリ", "说明": "説明", "分析图像更新+周期执行": "解析画像更新+周期実行", - "模糊匹配相似度": "ファジィマッチング類似度", "翻译器字体": "翻訳機フォント", "设置界面字体": "インタフェースフォントの設定", "专有名词翻译设置按钮": "固有名詞翻訳設定ボタン", @@ -793,5 +791,6 @@ "使用webview显示": "webview表示の使用", "录音时模拟按键": "録音時アナログボタン", "窗口截图": "ウィンドウのスクリーンショット", - "自动截图": "自動スクリーンショット" + "自动截图": "自動スクリーンショット", + "模糊匹配": "ファジィマッチング" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ko.json b/LunaTranslator/files/lang/ko.json index 3d8eff14..9cfc8ba2 100644 --- a/LunaTranslator/files/lang/ko.json +++ b/LunaTranslator/files/lang/ko.json @@ -57,7 +57,6 @@ "最短翻译字数": "최소 번역 단어 수", "最长翻译字数": "최대 번역 단어 수", "预翻译采用模糊匹配": "사전 번역은 모호한 일치를 채택한다", - "模糊匹配相似度限制": "흐림 일치 유사도 제한", "录制翻译文件": "번역 파일 기록", "导出的第一翻译源": "내보낸 첫 번째 번역 소스", "离线翻译": "오프라인 번역", @@ -331,7 +330,6 @@ "xml目录": "xml 디렉토리", "说明": "설명", "分析图像更新+周期执行": "분석 이미지 업데이트 + 주기 실행", - "模糊匹配相似度": "흐림 일치 유사도", "翻译器字体": "번역기 글꼴", "设置界面字体": "인터페이스 글꼴 설정", "专有名词翻译设置按钮": "고유명사 번역 설정 버튼", @@ -793,5 +791,6 @@ "使用webview显示": "웹뷰를 사용하여 표시", "录音时模拟按键": "녹음 시 시뮬레이션 키", "窗口截图": "창 캡처", - "自动截图": "자동 캡처" + "自动截图": "자동 캡처", + "模糊匹配": "흐림 일치" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/pl.json b/LunaTranslator/files/lang/pl.json index 6ab369bb..171a3496 100644 --- a/LunaTranslator/files/lang/pl.json +++ b/LunaTranslator/files/lang/pl.json @@ -57,7 +57,6 @@ "最短翻译字数": "Minimalna liczba przetłumaczonych słów", "最长翻译字数": "Maksymalna liczba przetłumaczonych słów", "预翻译采用模糊匹配": "Tłumaczenie wstępne przy użyciu dopasowania rozmytego", - "模糊匹配相似度限制": "Limit podobieństwa rozmytego dopasowania", "录制翻译文件": "Nagrywanie plików tłumaczeniowych", "导出的第一翻译源": "Pierwsze wyeksportowane źródło tłumaczenia", "离线翻译": "Tłumaczenie offline", @@ -331,7 +330,6 @@ "xml目录": "Katalog XML", "说明": "wyjaśnij", "分析图像更新+周期执行": "Analiza aktualizacji obrazów+wykonanie cyklu", - "模糊匹配相似度": "Rozmyte podobieństwo dopasowania", "翻译器字体": "Czcionki tłumacza", "设置界面字体": "Ustaw czcionkę interfejsu", "专有名词翻译设置按钮": "Przycisk ustawienia tłumaczenia właściwego rzeczownika", @@ -793,5 +791,6 @@ "使用webview显示": "Wyświetlanie przy użyciu widoku internetowego", "录音时模拟按键": "Symulowanie przycisków podczas nagrywania", "窗口截图": "Zrzut ekranu okna", - "自动截图": "Automatyczny zrzut ekranu" + "自动截图": "Automatyczny zrzut ekranu", + "模糊匹配": "Dopasowanie rozmyte" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ru.json b/LunaTranslator/files/lang/ru.json index ec29ee78..9651ee0e 100644 --- a/LunaTranslator/files/lang/ru.json +++ b/LunaTranslator/files/lang/ru.json @@ -57,7 +57,6 @@ "最短翻译字数": "Min слов для перевода", "最长翻译字数": "Max слов для перевода", "预翻译采用模糊匹配": "Нечеткое совпадение", - "模糊匹配相似度限制": "Предел несовпадения", "录制翻译文件": "Запись переводов в файл", "导出的第一翻译源": "Экспорт источника перевода", "离线翻译": "Автономный перевод", @@ -331,7 +330,6 @@ "xml目录": "Каталог XML", "说明": "Примечания", "分析图像更新+周期执行": "Анализ обновлений изображений + цикл выполнения", - "模糊匹配相似度": "Нечеткое сходство", "翻译器字体": "Шрифт переводчика", "设置界面字体": "Настройка шрифтов интерфейса", "专有名词翻译设置按钮": "Кнопка настройки перевода", @@ -793,5 +791,6 @@ "使用webview显示": "Использовать webview", "录音时模拟按键": "Клавиша моделирования при записи", "窗口截图": "Снимок окна", - "自动截图": "Автоматический снимок экрана" + "自动截图": "Автоматический снимок экрана", + "模糊匹配": "Нечеткое согласование" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/th.json b/LunaTranslator/files/lang/th.json index 348c30a5..87549a13 100644 --- a/LunaTranslator/files/lang/th.json +++ b/LunaTranslator/files/lang/th.json @@ -1,7 +1,6 @@ { "使用代理": "ใช้พร็อกซี่", "进程": "กระบวนการ", - "模糊匹配相似度": "ความคล้ายคลึงกับการจับคู่เบลอ", "界面设置": "การตั้งค่าอินเทอร์เฟซ", "sqlite翻译记录": "บันทึกการแปล sqlite", "使用LE": "ใช้ LE", @@ -268,7 +267,6 @@ "注册地址": "ที่อยู่ลงทะเบียน", "捕获标题栏": "จับภาพแถบหัวเรื่อง", "月読ショウタ": "มูน読", - "模糊匹配相似度限制": "ขีด จำกัด ความคล้ายคลึงการจับคู่เบลอ", "自动下载更新(需要连接github)": "ดาวน์โหลดอัปเดตโดยอัตโนมัติ (ต้องเชื่อมต่อ github)", "自动检测": "การตรวจจับอัตโนมัติ", "繁体中文(BIG5)": "ภาษาจีนดั้งเดิม (BIG5)", @@ -793,5 +791,6 @@ "使用webview显示": "ใช้ webview เพื่อแสดงผล", "录音时模拟按键": "การจำลองปุ่มกดเมื่อบันทึก", "窗口截图": "ภาพหน้าจอของหน้าต่าง", - "自动截图": "ภาพหน้าจออัตโนมัติ" + "自动截图": "ภาพหน้าจออัตโนมัติ", + "模糊匹配": "จับคู่เบลอ" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/tr.json b/LunaTranslator/files/lang/tr.json index 272f0d3c..6ddcadd3 100644 --- a/LunaTranslator/files/lang/tr.json +++ b/LunaTranslator/files/lang/tr.json @@ -57,7 +57,6 @@ "最短翻译字数": "Tercüme edilen kelimelerin en az sayısı", "最长翻译字数": "Tercüme edilen sözlerin en büyük sayısı", "预翻译采用模糊匹配": "Önceki çeviri, çöplü eşleştirmeyi kabul ediyor", - "模糊匹配相似度限制": "Uçak eşleşme sınırı", "录制翻译文件": "Çeviri dosyasını kaydedin", "导出的第一翻译源": "İlk çevirim kaynağı dışarı aktarıldı", "离线翻译": "Devre dışı çeviri", @@ -331,7 +330,6 @@ "xml目录": "Xml dizini", "说明": "açıklayın", "分析图像更新+周期执行": "Görüntü güncellemesi", - "模糊匹配相似度": "Uçak eşleşme benzemi", "翻译器字体": "Çevirme yazıtipi", "设置界面字体": "Arayüz yazıtipini ayarla", "专有名词翻译设置按钮": "Özel isim tercüme düğmesi", @@ -793,5 +791,6 @@ "使用webview显示": "Web görüntüsünü kullanarak göster", "录音时模拟按键": "Kaydedirken düğmeleri simüle edin", "窗口截图": "Window screenshot", - "自动截图": "Otomatik ekran fotoğrafı" + "自动截图": "Otomatik ekran fotoğrafı", + "模糊匹配": "Çılgın eşleşme" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/uk.json b/LunaTranslator/files/lang/uk.json index b154d053..f8ec47de 100644 --- a/LunaTranslator/files/lang/uk.json +++ b/LunaTranslator/files/lang/uk.json @@ -57,7 +57,6 @@ "最短翻译字数": "Мінімальна кількість перекладених слів", "最长翻译字数": "Максимальна кількість перекладених слів", "预翻译采用模糊匹配": "Попередній переклад за допомогою неприємного збігання", - "模糊匹配相似度限制": "Обмеження подібності", "录制翻译文件": "Запис файлів перекладу", "导出的第一翻译源": "First translation source exported", "离线翻译": "Офлайн переклад", @@ -323,7 +322,6 @@ "xml目录": "Каталог XML", "说明": "пояснити", "分析图像更新+周期执行": "Аналізувати оновлення зображення+виконання циклу", - "模糊匹配相似度": "Людлива подібність", "翻译器字体": "Translator fonts", "设置界面字体": "Встановити шрифт інтерфейсу", "内嵌的翻译器": "Вбудований перекладач", @@ -793,5 +791,6 @@ "使用webview显示": "Показувати за допомогою веб- перегляду", "录音时模拟按键": "Імітувати кнопки під час запису", "窗口截图": "Знімок вікна", - "自动截图": "Автоматичний знімок екрана" + "自动截图": "Автоматичний знімок екрана", + "模糊匹配": "Незрозуміле збігання" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/vi.json b/LunaTranslator/files/lang/vi.json index b5530944..95fdfccd 100644 --- a/LunaTranslator/files/lang/vi.json +++ b/LunaTranslator/files/lang/vi.json @@ -57,7 +57,6 @@ "最短翻译字数": "Số lượng từ phiên dịch ngắn nhất", "最长翻译字数": "Số lượng từ phiên dịch dài nhất", "预翻译采用模糊匹配": "Sử dụng Blur Match", - "模糊匹配相似度限制": "Giới hạn độ tương đồng phù hợp mờ", "录制翻译文件": "Ghi lại tập tin dịch", "导出的第一翻译源": "Nguồn dịch đầu tiên xuất khẩu", "离线翻译": "Dịch ngoại tuyến", @@ -331,7 +330,6 @@ "xml目录": "Thư mục XML", "说明": "Mô tả", "分析图像更新+周期执行": "Phân tích cập nhật hình ảnh+thực hiện chu kỳ", - "模糊匹配相似度": "Độ tương đồng phù hợp mờ", "翻译器字体": "Bộ dịch", "设置界面字体": "Đặt phông giao diện", "专有名词翻译设置按钮": "Nút cài đặt danh từ độc quyền", @@ -793,5 +791,6 @@ "使用webview显示": "Sử dụng WebView để hiển thị", "录音时模拟按键": "Mô phỏng các phím khi ghi âm", "窗口截图": "Ảnh chụp cửa sổ", - "自动截图": "Ảnh chụp màn hình tự động" + "自动截图": "Ảnh chụp màn hình tự động", + "模糊匹配": "Phù hợp mờ" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/zh.json b/LunaTranslator/files/lang/zh.json index c9252fda..dac24ff5 100644 --- a/LunaTranslator/files/lang/zh.json +++ b/LunaTranslator/files/lang/zh.json @@ -1,7 +1,6 @@ { "使用代理": "", "进程": "", - "模糊匹配相似度": "", "界面设置": "", "sqlite翻译记录": "", "使用LE": "", @@ -265,7 +264,6 @@ "注册地址": "", "捕获标题栏": "", "月読ショウタ": "", - "模糊匹配相似度限制": "", "自动下载更新(需要连接github)": "", "自动检测": "", "繁体中文(BIG5)": "", @@ -793,5 +791,8 @@ "使用webview显示": "", "录音时模拟按键": "", "前景窗口截屏": "", - "自动截图": "" + "自动截图": "", + "模糊匹配": "", + "相似度": "", + "编辑距离": "" } \ No newline at end of file