zotero-pdf-translate icon indicating copy to clipboard operation
zotero-pdf-translate copied to clipboard

字典引擎能否支持本地词库

Open beckybecky111 opened this issue 2 years ago • 4 comments

如题,能否支持诸如mdd等本地词典,在网络质量较差的情况下也能够流畅地使用 As described in title, can you support local dictionary, so that we can get translation when the network quality is poor.

beckybecky111 avatar Aug 15 '22 03:08 beckybecky111

是否有相关本地词典获取或使用的文档或参考资料?

windingwind avatar Aug 16 '22 06:08 windingwind

大佬你看这个行不行 一个支持mdd格式的词典软件 https://github.com/xiaoyifang/goldendict 这个仓库有相关的词典文件 https://github.com/OrcheInk/english-dictionary mdd和mdx格式分析 https://github.com/csarron/mdict-analysis

sensty avatar Sep 04 '22 07:09 sensty

感谢分享。我简单调研了一下mdict在js上实现的相关包,似乎很不完全。支持浏览器的代码只有一个7年前的:https://github.com/fengdh/mdict-js 其余的包大多在node环境下。 根据代码大致看了一下,词典文件内部使用的lzo压缩格式似乎没有很好支持浏览器的包,要么需要打包二进制分发(意味着可能无法跨平台),要么依赖nodejs。

.. note:: python-lzo is required to read mdx files created with engine 1.2

也许暂时放弃对这类文件的支持比较好? 其余部分尚在尝试。

windingwind avatar Sep 04 '22 12:09 windingwind

本地词库似乎无法通过纯js的方式支持(或至少很困难)。我将保留该issue开启,但暂时将不会在这方向尝试。

windingwind avatar Sep 18 '22 09:09 windingwind

关闭issue,因为无计划支持。

windingwind avatar Oct 21 '22 14:10 windingwind