# MDX/MDD一键转Android版GoldenDict可用格式

**URL:** <https://forum.freemdict.com/t/topic/45056>\
**Category:** 技术交流与词典编修\
**Created:** [2026 年9 月 13 日 07:47 UTC](https://forum.freemdict.com/t/topic/45056 "2026-09-13T07:47:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

作者： ![chigre3](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/47e85d/32.png) [@chigre3](https://forum.freemdict.com/u/chigre3)\
发布日期： [2026 年9 月 13 日 07:47 UTC](https://forum.freemdict.com/t/topic/45056/1 "2026-09-13T07:47:41Z")

</div>

整理了一个词典转换脚本，用于把 **MDict/MDX 词典转换成适合 Android GoldenDict 使用的 StarDict + DSL 资源词典** 。

[项目已上传GITHUB](https://github.com/chigre/mdxtogd)

本地下载：[mdxtogd\_v20260913.zip](https://forum.freemdict.com/uploads/short-url/7In2cfnQGpRC7h8zKEl2bN6XoE7.zip) (26.6 KB)

建议：首先自定义 GoldenDict 的全局CSS（sdcard/GoldenDict/.config/article-style.css 和  
article-style-night.css）

**转化后，显示上的问题一般仅需要调整一下CSS。**

脚本名称：

```plaintext
mdxtogd.py

```

配置文件：

```plaintext
config.txt

```

目前支持的输入格式包括：

```plaintext
MDX
Tabfile
MDict Textfile

```

其中 MDict Textfile 指类似下面这种格式：

```plaintext
词条1
内容第一行
内容第二行
</>
词条2
内容
</>

```

程序会先统一转成 Tabfile。正文中的实际换行会转换为字面量 `\n`，因此每个词条在 Tabfile 中始终只占一行，之后再继续进行资源路径替换和 StarDict 转换。

## 一、主要功能

### 1. 支持 MDX + 多个 MDD

如果输入：

```plaintext
词典.mdx

```

程序会自动寻找同目录下的：

```plaintext
词典.mdd
词典.1.mdd
词典.2.mdd
……

```

无需在配置文件中逐个填写。

MDD 中的图片、CSS、JS、字体、音频等资源会解包并重新整理，然后生成 Android GoldenDict 使用的：

```plaintext
词典.dsl
词典.dsl.files.zip

```

DSL 使用 UTF-8 with BOM。

* * *

### 2. 支持本地资源

有些 MDX 中引用的 CSS、图片或字体并不在 MDD 里，而是直接放在词典文件旁边，例如：

```plaintext
词典.mdx
mecd.css
images/
fonts/

```

程序也会尝试解析这些实际被引用到的本地资源，并纳入相同的资源重写流程。

CSS 内部继续引用的图片、字体等资源，也会进一步解析。

* * *

### 3. 资源包支持两种目录方式

配置：

```plaintext
resource_layout = root

```

表示把资源全部放到 `.dsl.files.zip` 根目录。

如果存在同名文件，会自动重命名，并同步修改正文/CSS/JS 中的引用。

也可以：

```plaintext
resource_layout = original

```

保留 MDD 原来的目录结构，例如：

```plaintext
images/a.png
css/style.css
fonts/font.woff2

```

对于资源特别多的词典，我个人更推荐 `original`，管理和排查都比较方便。

* * *

### 4. CSS 可以放 ZIP，也可以独立放文件夹

```plaintext
css_storage = zip

```

CSS 放入：

```plaintext
词典.dsl.files.zip

```

或者：

```plaintext
css_storage = folder

```

CSS 作为独立文件，与正式词典文件放在同一目录。

* * *

## 二、自动处理 Android GoldenDict 资源路径

程序会根据 DSL 在 Android GoldenDict 中的实际安装路径，计算 DSL resource ID，并把类似：

```plaintext
images/a.png
../fonts/font.woff2
mecd.css

```

改写成 Android GoldenDict 能访问的资源地址。

例如：

```plaintext
content://mobi.goldendict.android/resource/<DSL_ID>/images/a.png

```

DSL resource ID 使用 DSL 相对于 GoldenDict 根目录的路径计算。

例如：

```plaintext
/storage/emulated/0/GoldenDict/ENG/ENG-ZHO/词典名/词典名.dsl

```

实际参与计算的是：

```plaintext
ENG/ENG-ZHO/词典名/词典名.dsl

```

* * *

## 三、自动识别词典语言

配置文件中强烈建议填写：

```plaintext
INDEX_LANGUAGE =
CONTENTS_LANGUAGE =

```

不过写法比较宽松。

例如英语可以写：

```plaintext
eng
en
English
english
英语
英文
英

```

中文可以写：

```plaintext
zho
zh
chi
Chinese
中文
汉语
漢語
汉
漢
中

```

程序内部会统一转换成标准代码。

例如：

```plaintext
INDEX_LANGUAGE = 英
CONTENTS_LANGUAGE = 汉

```

会统一识别成：

```plaintext
eng → zho

```

DSL 中则自动生成：

```plaintext
#INDEX_LANGUAGE "English"
#CONTENTS_LANGUAGE "Chinese"

```

如果没有填写，程序还会尝试从词典文件名判断，例如：

```plaintext
xx英汉词典
→ eng / zho

xx汉英词典
→ zho / eng

英英词典
→ eng / eng

POR-ZH
→ por / zho

```

无法可靠判断时使用：

```plaintext
Unk / Unk

```

建议还是手工填写，自动判断主要作为兜底。

* * *

## 四、StarDict 的语言也会自动处理

这是专门针对 GoldenDict 做的一项处理。

StarDict 本身没有 DSL 那样的：

```plaintext
#INDEX_LANGUAGE
#CONTENTS_LANGUAGE

```

GoldenDict 可以根据 StarDict 文件名中的语言对判断语言。

因此，例如：

```plaintext
INDEX_LANGUAGE = eng
CONTENTS_LANGUAGE = zho

```

StarDict 自动生成：

```plaintext
词典名.en-zh.ifo
词典名.en-zh.idx
词典名.en-zh.dict
词典名.en-zh.dict.dz

```

这样 GoldenDict 可以识别为：

```plaintext
English → Chinese

```

但是 `.ifo` 内仍然保持：

```plaintext
bookname=词典名

```

因此词典在 GoldenDict 中显示的仍然是原来的词典名，不会显示成：

```plaintext
词典名.en-zh

```

类似地：

```plaintext
zho → eng
生成 .zh-en.*

eng → eng
生成 .en-en.*

fra → zho
生成 .fr-zh.*

```

如果某一端语言无法确定，则不会强行添加错误的语言后缀。

* * *

## 五、Android 目录自动生成

如果不填写：

```plaintext
install_dir =

```

程序会按照语言自动生成目录。

例如：

```plaintext
INDEX_LANGUAGE = eng
CONTENTS_LANGUAGE = zho

```

默认得到：

```plaintext
ENG/ENG-ZHO/词典名

```

最终 Android 位置类似：

```plaintext
/storage/emulated/0/GoldenDict/
└─ ENG/
   └─ ENG-ZHO/
      └─ 词典名/

```

这样词典多了以后，可以按照：

```plaintext
源语言
→ 语言方向
→ 具体词典

```

来分类。

转换完成后还会自动生成：

```plaintext
GoldenDict安装位置.txt

```

里面直接写明应该把正式词典文件复制到 Android 的哪个目录。

* * *

## 六、自动处理词典图标

如果 MDX/Textfile/Tabfile 同目录存在同名图片：

```plaintext
词典.png
词典.jpg
词典.jpeg
词典.bmp

```

程序会自动找到并转换为：

```plaintext
词典.bmp

```

尺寸：

```plaintext
48 × 64

```

用于 GoldenDict 词典图标。

图片会保持原始宽高比缩放，并居中到 48×64 画布，避免直接拉伸变形。

图像转换需要：

```plaintext
Pillow

```

可以安装：

```bat
python -m pip install Pillow

```

* * *

## 七、最终 Tabfile 会保留下来

程序完成各种：

```plaintext
entry://
图片路径
CSS路径
JS路径
字体路径
其它资源路径

```

替换以后，会保留：

```plaintext
词典名.android.txt

```

这是最终送入 StarDict 转换前的 Tabfile。

因此，如果转换完成后还想手工修改正文，可以直接编辑这个文件。

同时程序会生成：

```plaintext
makestardict.bat
_makestardict.py

```

修改完：

```plaintext
词典名.android.txt

```

以后直接双击：

```plaintext
makestardict.bat

```

即可重新生成 StarDict，不需要重新跑 MDX/MDD 解包和资源转换过程。

重新生成时同样会保持：

```plaintext
词典名.en-zh.*

```

这样的语言标记。

* * *

## 八、StarDict 的 `.dict` 与 `.dict.dz`

配置：

```plaintext
stardict_dictzip = true

```

会同时保留：

```plaintext
词典名.en-zh.dict
词典名.en-zh.dict.dz

```

如果：

```plaintext
stardict_dictzip = false

```

则只生成：

```plaintext
词典名.en-zh.dict

```

生成 `.dict.dz` 需要：

```bat
python -m pip install python-idzip

```

* * *

## 九、配置文件尽量简化

目前 `config.txt` 采用普通文本：

```plaintext
key = value

```

不使用 JSON，方便直接打开修改。

最基本可以只写：

```plaintext
source_file = ./词典.mdx

```

推荐再填写：

```plaintext
INDEX_LANGUAGE = eng
CONTENTS_LANGUAGE = zho

```

其它项目一般都有默认值。

一个常用示例：

```plaintext
source_file = ./外研社英汉多功能词典.mdx
input_type = auto

INDEX_LANGUAGE = 英
CONTENTS_LANGUAGE = 汉

dictionary_name =
output_dir =

device_goldendict_root = /storage/emulated/0/GoldenDict
install_dir =

css_storage = zip
resource_layout = original

local_resource_dirs = .
local_resource_recursive = true

rewrite_inside_resources = true

stardict_dictzip = true
stardict_html = true

keep_raw_tabfile = false

```

其中：

```plaintext
dictionary_name =
output_dir =

```

留空时会自动根据输入文件名生成。

* * *

## 十、两种运行方式

### 方法 1：使用 config.txt

```bat
python mdxtogd.py

```

程序默认读取当前目录的：

```plaintext
config.txt

```

* * *

### 方法 2：直接指定输入和输出

```bat
python mdxtogd.py xx/词典.mdx yy/新词典名称.ifo

```

Tabfile/Textfile 也可以：

```bat
python mdxtogd.py dict.tab out/NewDict.ifo
python mdxtogd.py dict.txt out/NewDict.ifo

```

如果语言是：

```plaintext
eng → zho

```

最终 StarDict 会自动生成：

```plaintext
out/NewDict.en-zh.ifo
out/NewDict.en-zh.idx
out/NewDict.en-zh.dict
out/NewDict.en-zh.dict.dz
out/NewDict.en-zh.bmp

```

而 DSL 和图标仍然保持：

```plaintext
NewDict.dsl
NewDict.dsl.files.zip

```

* * *

## 十一、主要依赖

核心需要：

```plaintext
Python
PyGlossary
mdict-utils

```

建议同时安装：

```plaintext
Pillow
python-idzip

```

例如：

```bat
python -m pip install pyglossary mdict-utils Pillow python-idzip

```

部分 PyGlossary 插件可能还会提示缺少 `lxml`，如果希望一起安装：

```bat
python -m pip install lxml

```

* * *

## 十二、输出目录示例

例如：

```plaintext
外研社英汉多功能词典/

```

转换工作目录大致如下：

```plaintext
外研社英汉多功能词典/
├─ 外研社英汉多功能词典/
│ ├─ 外研社英汉多功能词典.dsl
│ ├─ 外研社英汉多功能词典.dsl.files.zip
│ ├─ 外研社英汉多功能词典.en-zh.ifo
│ ├─ 外研社英汉多功能词典.en-zh.idx
│ ├─ 外研社英汉多功能词典.en-zh.dict
│ ├─ 外研社英汉多功能词典.en-zh.dict.dz
│ └─ 外研社英汉多功能词典.bmp
│
├─ 外研社英汉多功能词典.android.txt
├─ makestardict.bat
├─ _makestardict.py
├─ GoldenDict安装位置.txt
└─ conversion_report.json

```

Android 端只需要复制内层正式词典目录中的文件。

* * *

## 十三、一些说明

这套脚本主要是按我自己在 Android GoldenDict 上实际使用词典的需求逐步整理出来的，因此重点不是做一个通用格式转换器，而是尽量把：

```plaintext
MDX/MDD
↓
资源整理
↓
Android GoldenDict DSL资源
↓
StarDict
↓
语言识别
↓
目录部署

```

这一整套过程自动化。

不同 MDX 的 HTML/CSS/JS 写法差异很大，因此不敢保证所有词典都能完全无修改直接转换。如果碰到特殊资源路径、特殊脚本、特殊 MDD 结构等问题，也欢迎反馈具体词典结构或报错信息，后续可以继续完善。

建议第一次转换新词典后，重点检查：

```plaintext
conversion_report.json
GoldenDict安装位置.txt
词典名.android.txt

```

如果有：

```plaintext
⚠️ 未解析本地资源

```

最好先确认对应资源到底是在 MDD、本地文件夹，还是原词典引用本身已经失效。

目前我自己主要用于 Android GoldenDict 的 MDX → StarDict + DSL resource 转换，欢迎大家测试、改进和反馈。

---

<div class="post-metadata">

作者： ![chigre3](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/47e85d/32.png) [@chigre3](https://forum.freemdict.com/u/chigre3)\
发布日期： [2026 年9 月 13 日 07:54 UTC](https://forum.freemdict.com/t/topic/45056/2 "2026-09-13T07:54:58Z")

</div>

极速，支持词典格式多，支持Hunspell，词条索引可以自定义检索深度  
对于意大利语/西班牙语/葡萄牙语以及其他有特殊符号的语言来说，使用它来检索是便捷的（一定要找到所需语言的合适的Hunspell文件）。  
现在，专业版还可以免费获取key使用。

GOLDENDICT.MOBI （安卓版GoldenDict官网）  
[GoldenDict Mobile](http://goldendict.mobi/)

### About

GoldenDict Mobile is a multi-format dictionary program with reach formatting, colors, images and sounds. It fully supports a lot of popular dictionary formats. You can now carry all the dictionaries you want together with you on your Android device.

### Supported formats

- **Lingoes**.LD2 files
- **Babylon**.BGL files
- **ABBYY Lingvo**.LSD, .DSL, .LSA and .DAT files
- **StarDict** files
- **Dictd** files
- **Hunspell** morphologies

### Features

- All content is shown in full formatting, with images and sounds. We don’t compromise on quality.
- It’s fast. It flies when you have a dozen of dictionaries, and can handle hundreds of dictionaries simultaneously fairly well, too.
- The program will understand your typing no matter how you do it - forget about diacritics, case or punctuation!
- In-program popup mode is supported. Configure your e-book reader to use “ColorDict3” as your dictionary interface, and GoldenDict will pop up.
- Translating from clipboard is easy - just press and hold “Search” button on your device!
- Supported devices: all Android versions starting from 1.5 and up to 4.4.

### Getting it

GoldenDict Mobile is no longer being commercialized, and is probably going to be released as open source in the future.

Meanwhile you can continue using the latest released version, or any previously released one:

- You can download the latest version [here](http://goldendict.mobi/downloads/android/paid/GoldenDict-1.7.2-Android-4.4+-paid.apk). Older versions are available [here](http://goldendict.mobi/downloads/android/paid/old/).
- To get an offline license file, use the form [here](http://goldendict.mobi/free.php). You’d need to put a 10-digit device id into it, and it will let you download the file named ‘goldendict-key.txt’. Place it into /sdcard/GoldenDict or /sdcard/GoldenDict/.config dir. You can also simply try opening the downloaded file and choosing ‘Install GoldenDict License’ to install it automatically.

There’s also a completely free, open-source version of the program available for your desktop. [Get it here](http://goldendict.org/).

---

<div class="post-metadata">

作者： ![Wankata](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/w/a88e4f/32.png) [@Wankata](https://forum.freemdict.com/u/Wankata)\
发布日期： [2026 年9 月 13 日 08:40 UTC](https://forum.freemdict.com/t/topic/45056/3 "2026-09-13T08:40:53Z")

</div>

GoldenDict Mobile mods for latest OS Android (by me is installed v2.6):

> **[GoldenDict](https://cloud.freemdict.com/index.php/s/jBHGnJCFPNffQgG)**
>
> FreeMdict Cloud - A FreeMdict Storage

Open Source alternative for GoldenDict Mobile - supports AARD2 (.slob), Octopus (.mdx/.mdd), Babylon (.bgl), Stardict (.ifo), Abbyy Lingvo (.dsl) and ZIM (.zim) formats:

> **[GitHub - wuweidict/wudict: Native dictionary app that runs on android, linux,...](https://github.com/wuweidict/wudict)**
>
> Native dictionary app that runs on android, linux, mac, windows, reads AARD2 (.slob), Octopus (.mdx/.mdd), Babylon (.bgl), Stardict (.ifo), Abbyy Lingvo (.dsl), ZIM (.zim)

Releases:

> **[Releases · wuweidict/wudict](https://github.com/wuweidict/wudict/releases)**
>
> Native dictionary app that runs on android, linux, mac, windows, reads AARD2 (.slob), Octopus (.mdx/.mdd), Babylon (.bgl), Stardict (.ifo), Abbyy Lingvo (.dsl), ZIM (.zim) - wuweidict/wudict

Format converters:

> **[Converters](https://cloud.freemdict.com/index.php/s/P6FDXBP3PjTRHpf)**
>
> FreeMdict Cloud - A FreeMdict Storage

…and below on this file:

> **[Additional sources for dictionaries](https://docs.google.com/document/d/e/2PACX-1vTwXOzdXHdCKqmmnWarYamnKREr8Ij6JYKe2-4vC8dxX0ty4ntSRCOG3bwewwB_ny9pz2OGZDCCWM5b/pub)**
>
> This Doc is private

---

<div class="post-metadata">

作者： ![hua](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/hua/32/11090_2.png) [@hua](https://forum.freemdict.com/u/hua)\
发布日期： [2026 年9 月 13 日 08:41 UTC](https://forum.freemdict.com/t/topic/45056/4 "2026-09-13T08:41:46Z")

</div>

哈喽楼主，总算见到本人了。

---

<div class="post-metadata">

作者： ![chigre3](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/47e85d/32.png) [@chigre3](https://forum.freemdict.com/u/chigre3)\
发布日期： [2026 年9 月 13 日 13:11 UTC](https://forum.freemdict.com/t/topic/45056/5 "2026-09-13T13:11:34Z")

</div>

单纯分享一些工具；）

---

<div class="post-metadata">

作者： ![chigre3](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/47e85d/32.png) [@chigre3](https://forum.freemdict.com/u/chigre3)\
发布日期： [2026 年9 月 13 日 13:13 UTC](https://forum.freemdict.com/t/topic/45056/6 "2026-09-13T13:13:39Z")

</div>

MOD版都能修改什么内容吖？

---

<div class="post-metadata">

作者： ![Wankata](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/w/a88e4f/32.png) [@Wankata](https://forum.freemdict.com/u/Wankata)\
发布日期： [2026 年9 月 13 日 13:27 UTC](https://forum.freemdict.com/t/topic/45056/7 "2026-09-13T13:27:03Z")

</div>

> [@chigre3](#):
>
> 单纯分享一些工具；）

There is no need to change anything. According to the author, the program’s requirement regarding the operating system architecture under which the application runs has been modified, and the registration requirement has been removed.

---

<div class="post-metadata">

作者： ![hahaya](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/h/77aa72/32.png) [@hahaya](https://forum.freemdict.com/u/hahaya)\
发布日期： [2026 年9 月 13 日 13:33 UTC](https://forum.freemdict.com/t/topic/45056/8 "2026-09-13T13:33:33Z")

</div>

wow，这个好强大啊，支持格式好多，马上下载win版试试。

---

<div class="post-metadata">

作者： ![chigre3](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/47e85d/32.png) [@chigre3](https://forum.freemdict.com/u/chigre3)\
发布日期： [2026 年9 月 13 日 14:11 UTC](https://forum.freemdict.com/t/topic/45056/9 "2026-09-13T14:11:59Z")

</div>

是否可以对MOD版增加功能？其实我有一些想法。

---

<div class="post-metadata">

作者： ![Wankata](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/w/a88e4f/32.png) [@Wankata](https://forum.freemdict.com/u/Wankata)\
发布日期： [2026 年9 月 13 日 14:22 UTC](https://forum.freemdict.com/t/topic/45056/10 "2026-09-13T14:22:10Z")

</div>

I don’t think that’s possible. As far as I understand, the two authors of the modified versions simply changed the program’s requirements, not the options it offers. It still isn’t open-source, and likely never will be (an intention to make it so was announced over five years ago, yet the code was never actually opened). However, you can always reach out to the author of the other program -who is very responsive and accommodates user requests whenever possible - via the “[Issues](https://github.com/wuweidict/wudict/issues)” section.

---

<div class="post-metadata">

作者： ![chigre3](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/47e85d/32.png) [@chigre3](https://forum.freemdict.com/u/chigre3)\
发布日期： [2026 年9 月 13 日 14:24 UTC](https://forum.freemdict.com/t/topic/45056/11 "2026-09-13T14:24:55Z")

</div>

谢谢。有机会我把我的想法和可能的解决办法都一起写给GoldenDict的作者。  
你的软件我也下载使用了，挺好的，就是界面风格我还不太习惯 ；）  
希望你的多平台软件能够做得更好！

---

<div class="post-metadata">

作者： ![Wankata](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/w/a88e4f/32.png) [@Wankata](https://forum.freemdict.com/u/Wankata)\
发布日期： [2026 年9 月 13 日 14:36 UTC](https://forum.freemdict.com/t/topic/45056/12 "2026-09-13T14:36:57Z")

</div>

> [@chigre3](#):
>
> 谢谢。有机会我把我的想法和可能的解决办法都一起写给GoldenDict的作者。  
> 你的软件我也下载使用了，挺好的，就是界面风格我还不太习惯 ；）  
> 希望你的多平台软件能够做得更好！

Thanks, but I am not the author of the software. The author is a Russian-speaking user (I don’t know if he is Russian, Belarusian, Ukrainian, or from one of the former republics - it doesn’t matter). He primarily posts on a [Russian-language forum](https://4pda.to/forum/index.php?showtopic=1126164) that I visit, and I am simply sharing what he has created because I think it is really good. You can also find him in [this Telegram group](https://t.me/freemdict/244738); his nickname is Bio.

P. S. Homepage of the app: [https://wudict.legbehindneck.com/](https://wudict.legbehindneck.com/)

The author of GoldenDict stopped supporting the mobile version of the program long ago; the official desktop version has been updated only once in 15 years and is also being developed by others, such as xiaoyifang…

---

<div class="post-metadata">

作者： ![chigre3](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/47e85d/32.png) [@chigre3](https://forum.freemdict.com/u/chigre3)\
发布日期： [2026 年9 月 13 日 14:53 UTC](https://forum.freemdict.com/t/topic/45056/13 "2026-09-13T14:53:26Z")

</div>

目前我的手机上仍能正常安装和使用GoldenDict Mobile，以前还是在Google Play上购买的。如果未来开发者既不更新也不公开代码，那真的很可惜，那到时候就可能只能用MOD版本了。

你的wudict是open的，多平台，多格式，也是很轻量，这些方面都很好，我再多用用，这样才能给出使用反馈；）

与你聊天挺开心的。

---

<div class="post-metadata">

作者： ![hahaya](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/h/77aa72/32.png) [@hahaya](https://forum.freemdict.com/u/hahaya)\
发布日期： [2026 年9 月 13 日 15:08 UTC](https://forum.freemdict.com/t/topic/45056/14 "2026-09-13T15:08:41Z")

</div>

这个app目前是在浏览器中打开各种词库，无法做到GD那样做到在任何文档或浏览器网页文章中快捷取词查词，如果能做成单独的操作界面就好了

---

<div class="post-metadata">

作者： ![zaojz](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/z/c68b51/32.png) [@zaojz](https://forum.freemdict.com/u/zaojz)\
发布日期： [2026 年9 月 13 日 15:15 UTC](https://forum.freemdict.com/t/topic/45056/15 "2026-09-13T15:15:45Z")

</div>

goldendict安卓版似乎还是不支持mdx格式？

---

<div class="post-metadata">

作者： ![Wankata](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/w/a88e4f/32.png) [@Wankata](https://forum.freemdict.com/u/Wankata)\
发布日期： [2026 年9 月 13 日 15:17 UTC](https://forum.freemdict.com/t/topic/45056/16 "2026-09-13T15:17:49Z")

</div>

> [@zaojz](#):
>
> goldendict安卓版似乎还是不支持mdx格式？

Yes, GoldenDict does not support MDX.

---

<div class="post-metadata">

作者： ![chigre3](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/47e85d/32.png) [@chigre3](https://forum.freemdict.com/u/chigre3)\
发布日期： [2026 年9 月 13 日 15:31 UTC](https://forum.freemdict.com/t/topic/45056/17 "2026-09-13T15:31:24Z")

</div>

所以用这个python代码就可以“曲线救国”实现  
stardict的格式其实挺好的，还支持 主词头|副词头1|副词头2… 还有好多特点  
毕竟stardict的开发者也是个人物！设计格式的时候就想得挺周全了的

---

<div class="post-metadata">

作者： ![yx\_wh](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/yx_wh/32/77200_2.png) [@yx\_wh](https://forum.freemdict.com/u/yx_wh)\
发布日期： [2026 年9 月 15 日 01:30 UTC](https://forum.freemdict.com/t/topic/45056/18 "2026-09-15T01:30:44Z")

</div>

我上上个月在隔壁论坛学到了这一招，遂“古法”转制了基本最常用的辞典到stardict+dsl.zip资源包，没想到楼主直接把这自动化了！

> **[关于还原单词原形的问题——我感觉还是安卓版GoldenDict Mobile最好](https://forumcdn.freemdict.com/t/topic/44652/3)**
>
> 英、日、德、西班牙语Hunspell文件 DSL格式的MacMillan英语词典 BGL格式的新牛津英汉词典 GoldenDict Android用词典 链接:https://pan.baidu.com/s/16zxdX0lOVwSEz\_k5UToCnA?pwd=1234 提取码:1234 复制这段内容后打开百度网盘手机App，操作更方便哦 DSL、BGL往往自带一些简单颜色的排版，比用pyglossary把MDX转换成StarDict那个全素排版好看点。 ...

GoldenDict的最原始的作者Isakov可能已经淡出开发了，安卓版宣称开源也是遥遥无期。  
但是大家可以呼吁其他辞典软件的作者添加Hunspell功能嘛，像《词悦》的最新测试版已经有了，而且还支持两轮查询：

> <https://github.com/mumu-lhl/Ciyue/issues/729>
>
> \# 关于《词悦》的 Hunspell 的功能建议
> 
> \---
> 
> \## 1. 显示所有的 \`st:\` 结果
> 
> 日文的混书（混ぜ書き、mazegaki）是一种很日本的…现象。汉字和假名都是日文的正式文字，日文可以把有汉字的词汇写成汉字假名交杂的形式。比如说まんえん【蔓延】，写成汉字是「蔓延」，写成假名是「まんえん」，写成「まん延」「蔓えん」当然也可以（虽然「蔓えん」很少见）。加之二战后日本文字改革的时候推行了「当用汉字」政策限制汉字的使用，「まん延」这样的写法大行其道。这和中文不同，中文正式文本只会写成「蔓延」，「màn延」像小学生写作文。
> 
> 但是，日文辞典的条目入口一般只会收录全假名写法和尽量全汉字（能写汉字的部分都写成汉字）的写法。这时候可以在 \`ja\_JP.dic\` 中使用 \`st:\` 的方式把它们指引到全汉字条目：
> 
> \`\`\`
> まん延 st:蔓延
> まん延 st:万延
> たい積 st:体積
> たい積 st:堆積
> たい積 st:滞積
> \`\`\`
> 
> 但问题是一个混书形式可能对应多个原形，比如这里「まん延」同时对应「蔓延」「万延」，「たい積」同时对应「体積」「堆積」「滞積」。我试了下，\*\*GoldenDict‑ng 和安卓版 GoldenDict Mobile 是可以在查询「たい積」时同时给出「体積」「堆積」「滞積」的结果的\*\*，但是 \*\*《词悦》现在只能显示第一个结果\*\*。
> 
> 另外这个写法也能用来实现中文的简体繁体通查。
> 
> \`zh\_CN.aff\` 不需要任何实质内容，指定编码为 UTF‑8 就行：
> 
> \`\`\`
> SET UTF-8
> LANG zh
> FLAG long
> \# 空壳
> \`\`\`
> 
> \`zh\_CN.dic\` 的内容类似这样：
> 
> \`\`\`
> 12
> 簡體 st:简体
> 简体 st:簡體
> 繁體 st:繁体
> 繁体 st:繁體
> 发 st:髮
> 发 st:發
> 髮 st:发
> 發 st:发
> 復制 st:复制
> 複製 st:复制
> 复制 st:復制
> 复制 st:複製
> \`\`\`
> 
> 这跟上面类似，\*\*《词悦》现在只能显示第一个结果\*\*。
> 
> \*\*希望能显示所有的 \`st:\` 结果。\*\*
> 
> \<img width="1200" height="1920" alt="Image" src="https://github.com/user-attachments/assets/40572830-823f-423c-bb5b-d3fdb3e3f6d4" /\>
> \<img width="1200" height="1920" alt="Image" src="https://github.com/user-attachments/assets/b5f5e8e6-54e5-444f-ad5f-6d634e1ff2f3" /\>
> \<img width="1200" height="1920" alt="Image" src="https://github.com/user-attachments/assets/c234cc04-91d9-4b84-bfa7-2c92393747c1" /\>
> \<img width="1200" height="1920" alt="Image" src="https://github.com/user-attachments/assets/4eae873f-e4ef-486e-9de8-1462072f1377" /\>
> 
> \---
> 
> \## 2. 增加两次查询 Hunspell 的选项
> 
> 当我查询 \`"drunkest"\` 的时候，hunspell 根据生成形容词最高级的规则查到 \`drunk\`。当我查询 \`"drunk"\` 的时候才会根据 \`drunk st:drink\` 生成 \`drink\`。
> 
> \`\`\`bash
> % echo "drunkest" | hunspell -m -d ~/GoldenDict/Hunspell/en\_US
> drunkest st:drunk fl:T
> 
> % echo "drunk" | hunspell -m -d ~/GoldenDict/Hunspell/en\_US 
> drunk st:drink
> drunk st:drunk
> \`\`\`
> 
> 但是现在 《词悦》 调用 Hunspell 只会调用一次。\*\*希望能给出一个调用两次 Hunspell 的选项\*\*。第一次调用 \`drunkest\` 得到 \`drunk\` 之后，再调用一次 hunspell 从 \`drunk\` 得到 \`drink\`，并同时显示 \`drunkest\`、\`drunk\`、\`drink\` 的内容。
> 
> 当然对于英语这样词形变化比较简单的语言，直接硬编码 \`"drunkest st:drink"\` 也完全够用。但是对日语或者德语这样的语言来说，直接硬编码会让 \`.dic\` 里面到处充斥着硬编码，难以阅读和维护。
> 
> 德语例子：
> \`\`\`
> abgekämpfterem → abgekämpft → abkämpfen
> \`\`\`
> 
> 日语例子：
> \`\`\`
> 引きこもらない → 引きこもる → 引き籠もる
> \`\`\`
> 
> 如果能有两次调用 Hunspell，那我可以把 \`ja\_JP.dic\` 写成这样：
> 
> \`\`\`
> 引き籠もる/5A5I5T5E5OBDUYUBubKN
> ひきこもる/5A5I5T5E5OBDUYUBubKN
> 引きこもる/5A5I5T5E5OBDUYUBubKN
> 引きこもる st:引き籠もる
> \`\`\`
> 
> 但是如果没有两次调用，那我只能这么写，而且后缀还不全，我不能直接检索「引きこもらない」，我只能手动选中「引きこもら」才能查询：
> 
> \`\`\`
> 引き籠もる/5A5I5T5E5OBDUYUBubKN
> ひきこもる/5A5I5T5E5OBDUYUBubKN
> 引きこもっ st:引き籠もる
> 引きこもら st:引き籠もる
> 引きこもり st:引き籠もる
> 引きこもる st:引き籠もる
> 引きこもれ st:引き籠もる
> 引きこもろ st:引き籠もる
> \`\`\`
> 
> 但是对英文的还原原形，或者中文繁简转换来说两次调用 Hunspell 必要性不大或者毫无必要。因此\*\*可以把两次调用 Hunspell 做成每个 Hunspell 文件上的一个开关\*\*。
> 
> \---
> 
> 希望以上建议能被采纳，让《词悦》在非英语语言（尤其是日语、德语）的查词体验上更上一层楼。
> 
> \*\*Feature Suggestions for Hunspell in "Ciyue" (《词悦》)\*\*
> 
> \---
> 
> \## 1. Display All \`st:\` Results
> 
> In Japanese, \*mazegaki\* (混ぜ書き, mixed kana-kanji writing) is a very common phenomenon. Both kanji and kana are official scripts in Japanese, so words that have kanji forms can be written in a mixture of kanji and kana. For example, \*man'en\* (蔓延) can be written in full kanji as 「蔓延」, in full kana as 「まんえん」, or in mixed forms like 「まん延」 or 「蔓えん」 (though 「蔓えん」 is rare). Additionally, after World War II, Japan's script reform introduced the \*tōyō kanji\* policy to limit kanji usage, which made mixed forms like 「まん延」 widely prevalent. This is different from Chinese, where formal texts only use 「蔓延」 – writing 「màn延」 would look like a primary school student's essay.
> 
> However, Japanese dictionary entry headwords typically only include the \*\*full-kana\*\* form and the \*\*full-kanji\*\* form (i.e., writing as many parts as possible in kanji). In this case, we can use the \`st:\` mechanism in \`ja\_JP.dic\` to map mixed forms to their full-kanji entries:
> 
> \`\`\`
> まん延 st:蔓延
> まん延 st:万延
> たい積 st:体積
> たい積 st:堆積
> たい積 st:滞積
> \`\`\`
> 
> But the problem is that \*\*one mixed form may correspond to multiple original forms\*\*. For instance, 「まん延」 maps to both 「蔓延」 and 「万延」, while 「たい積」 maps to 「体積」, 「堆積」, and 「滞積」. I tested this: GoldenDict-ng and the Android version of GoldenDict Mobile can display \*\*all\*\* corresponding results (e.g., querying 「たい積」 shows entries for all three). However, \*\*Ciyue currently only displays the first result\*\*.
> 
> This mechanism can also be used to enable \*\*Simplified–Traditional Chinese conversion\*\* for lookup.
> 
> \`zh\_CN.aff\` does not need any substantive content; just specify UTF-8 encoding:
> 
> \`\`\`
> SET UTF-8
> LANG zh
> FLAG long
> \# empty shell
> \`\`\`
> 
> \`zh\_CN.dic\` could look like this:
> 
> \`\`\`
> 12
> 簡體 st:简体
> 简体 st:簡體
> 繁體 st:繁体
> 繁体 st:繁體
> 发 st:髮
> 发 st:發
> 髮 st:发
> 發 st:发
> 復制 st:复制
> 複製 st:复制
> 复制 st:復制
> 复制 st:複製
> \`\`\`
> 
> This is similar to the Japanese case above. Again, \*\*Ciyue currently only shows the first match\*\*.
> 
> \*\*I hope Ciyue will display \*all\* \`st:\` results, not just the first one.\*\*
> 
> \---
> 
> \## 2. Add an Option for Two Hunspell Queries (Recursive Stem Lookup)
> 
> When I query \`"drunkest"\`, Hunspell correctly finds \`drunk\` via the adjective superlative rule (\`fl:T\`). When I query \`"drunk"\`, it further yields \`drink\` from the explicit mapping \`drunk st:drink\`:
> 
> \`\`\`bash
> % echo "drunkest" | hunspell -m -d ~/GoldenDict/Hunspell/en\_US
> drunkest st:drunk fl:T
> 
> % echo "drunk" | hunspell -m -d ~/GoldenDict/Hunspell/en\_US 
> drunk st:drink
> drunk st:drunk
> \`\`\`
> 
> However, Ciyue currently calls Hunspell \*\*only once\*\*. I would like an option to call Hunspell \*\*twice\*\*:
> 
> 1. \*\*First call\*\*: \`drunkest\` → get the immediate stem \`drunk\`.
> 2. \*\*Second call\*\*: feed \`drunk\` back into Hunspell → get the deeper stem \`drink\`.
> 
> Then display all related forms together: \`drunkest\`, \`drunk\`, and \`drink\`.
> 
> Of course, for a language like English with relatively simple inflectional morphology, one could hard‑code \`drunkest st:drink\` directly in the dictionary file. But for languages like \*\*Japanese\*\* or \*\*German\*\*, hard‑coding would force the \`.dic\` file to be cluttered with countless entries, making it extremely difficult to read and maintain.
> 
> Examples:
> 
> \- German: \`abgekämpfterem\` → \`abgekämpft\` → \`abkämpfen\`
> \- Japanese: \`引きこもらない\` → \`引きこもる\` → \`引き籠もる\`
> 
> \---
> 
> \### What Two Calls Would Enable
> 
> If two Hunspell calls were possible, I could write \`ja\_JP.dic\` as simply as this:
> 
> \`\`\`
> 引き籠もる/5A5I5T5E5OBDUYUBubKN
> ひきこもる/5A5I5T5E5OBDUYUBubKN
> 引きこもる/5A5I5T5E5OBDUYUBubKN
> 引きこもる st:引き籠もる
> \`\`\`
> 
> \---
> 
> \### Without Two Calls (Current Workaround)
> 
> Without two calls, I have to manually list every conceivable inflectional stem, and even then the suffixes remain incomplete – I cannot directly look up \`引きこもらない\`; I can only manually select \`引きこもら\` to query:
> 
> \`\`\`
> 引き籠もる/5A5I5T5E5OBDUYUBubKN
> ひきこもる/5A5I5T5E5OBDUYUBubKN
> 引きこもっ st:引き籠もる
> 引きこもら st:引き籠もる
> 引きこもり st:引き籠もる
> 引きこもる st:引き籠もる
> 引きこもれ st:引きこもる (note: keep original logic, but I’ll preserve the user’s exact example)
> 引きこもろ st:引き籠もる
> \`\`\`
> \*(The user's point is that this is incomplete, cumbersome, and fails for forms like 引きこもらない.)\*
> 
> \---
> 
> \### Per-File Toggle
> 
> For \*\*English stem restoration\*\* or \*\*Simplified–Traditional Chinese conversion\*\*, a two‑call lookup is largely unnecessary or completely redundant. Therefore, \*\*this "two Hunspell calls" feature should be implemented as a toggle/switch on a per‑Hunspell‑dictionary‑file basis\*\*, so users can enable it only for languages that truly need it (e.g., Japanese, German) and keep it off for others (e.g., English, Chinese) to avoid unnecessary overhead.

---

<div class="post-metadata">

作者： ![yx\_wh](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/yx_wh/32/77200_2.png) [@yx\_wh](https://forum.freemdict.com/u/yx_wh)\
发布日期： [2026 年9 月 15 日 03:02 UTC](https://forum.freemdict.com/t/topic/45056/19 "2026-09-15T03:02:28Z")

</div>

I tried installing Wudict on Android, but its lemmatization by default accesses [raw.githubusercontent.com](http://raw.githubusercontent.com), and that domain is inaccessible in China without a 🪜.

> Could not read the catalogue: Get “[https://raw.githubusercontent.com/wuweidict/lemmas/main/manifest.json](https://raw.githubusercontent.com/wuweidict/lemmas/main/manifest.json)”: dial tcp [::]:443: connect: connection refused — languages already installed still work.

I manually ran git clone [GitHub - wuweidict/lemmas: lemmatization files for wudict https://wudict.legbehindneck.com/ · GitHub](https://github.com/wuweidict/lemmas.git) and then put de.tsv.gz into  
/storage/emulated/0/Android/data/com.legbehindneck.wudict/files/.wudict/lemmas  
This time it really did load the German morphology file, but I tried searching for “abgekämpftes” and it couldn’t find “abgekämpft”, let alone “abkämpfen”. I unzipped its morphology file and took a look: it turned out to be entirely a hard-coded word list, different from the Hunspell used by GoldenDict.  
But de.tsv does indeed contain these two lines:

```auto
abgekämpft	abgekämpfte	abgekämpftem	abgekämpften	abgekämpfter	abgekämpftere	abgekämpfterem	abgekämpfteren	abgekämpfterer	abgekämpfteres	abgekämpftes	abgekämpfteste	abgekämpftestem	abgekämpftesten	abgekämpftester	abgekämpftestes
abkämpfen	abgekämpft	abkämpfe	abkämpfend	abkämpfens	abkämpfest	abkämpfet	abkämpfst	abkämpft	abkämpfte	abkämpften	abkämpftest	abkämpftet	abzukämpfen

```

Why it can’t be found, I have no idea…  
In addition, the lemmatization file that comes with Wudict has no Japanese, let alone the fact that Chinese traditional/simplified cross-search can also be implemented with Hunspell.

我试着在安卓上安装了wudict，但是它的还原词形默认就会访问 [raw.githubusercontent.com](http://raw.githubusercontent.com)，然而这个域名在中国不用🪜是访问不了的。

> Could not read the catalogue: Get “[https://raw.githubusercontent.com/wuweidict/lemmas/main/manifest.json](https://raw.githubusercontent.com/wuweidict/lemmas/main/manifest.json)”: dial tcp [::]:443: connect: connection refused — languages already installed still work.

手动git clone [GitHub - wuweidict/lemmas: lemmatization files for wudict https://wudict.legbehindneck.com/ · GitHub](https://github.com/wuweidict/lemmas.git) 然后把de.tsv.gz放入  
/storage/emulated/0/Android/data/com.legbehindneck.wudict/files/.wudict/lemmas  
中，这下确实可以载入德文构词法文件了，但是我试了下搜索„abgekämpftes“，并不能找到„abgekämpft“，更别说„abkämpfen“了。解压它的构词法文件看了看，原来全部是写死的词表，跟GoldenDict采用的Hunspell不一样。  
但de.tsv里面确实有这两行：

```auto
abgekämpft	abgekämpfte	abgekämpftem	abgekämpften	abgekämpfter	abgekämpftere	abgekämpfterem	abgekämpfteren	abgekämpfterer	abgekämpfteres	abgekämpftes	abgekämpfteste	abgekämpftestem	abgekämpftesten	abgekämpftester	abgekämpftestes
abkämpfen	abgekämpft	abkämpfe	abkämpfend	abkämpfens	abkämpfest	abkämpfet	abkämpfst	abkämpft	abkämpfte	abkämpften	abkämpftest	abkämpftet	abzukämpfen

```

为什么查不到我就不知道了……  
另外，Wudict自带的词形还原文件是没有日文的，更别说中文繁简通查也可以用Hunspell实现了。

---

<div class="post-metadata">

作者： ![MeigenChou](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/meigenchou/32/90024_2.png) [@MeigenChou](https://forum.freemdict.com/u/MeigenChou)\
发布日期： [2026 年9 月 15 日 03:50 UTC](https://forum.freemdict.com/t/topic/45056/20 "2026-09-15T03:50:55Z")

</div>

> [@chigre3](#):
>
> 就想得挺周全了

然而你去看那个索引文件.idx就会发现设计是一坨史，所有索引只能按顺序读取，想实现二分法查就只能全部加载进内存（也可以只存偏移量）。对于松鼠来说同时查询几百本几千本词典将是个灾难。或者像goldendict那样重新构建索引。总体评价是拉完了

[下一页](https://forum.freemdict.com/t/topic/45056.md?page=2)
