# 求助.dict.dz如何转成.mdx和.mdd格式词典？

**URL:** <https://forum.freemdict.com/t/topic/20225>\
**Category:** 技术交流与词典编修\
**Tags:** 求助\
**Created:** [2023 年4 月 1 日 12:58 UTC](https://forum.freemdict.com/t/topic/20225 "2023-04-01T12:58:53Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

作者： ![beginner](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/b/e495f1/32.png) [@beginner](https://forum.freemdict.com/u/beginner)\
发布日期： [2023 年4 月 1 日 12:58 UTC](https://forum.freemdict.com/t/topic/20225/1 "2023-04-01T12:58:53Z")

</div>

学习小语种需要从网上找到几本stardict字典，但因为本人背单词使用eudic所以依然需要.mdd/.mdx格式的词典，请问如何转换？  
另：为何有stardict格式却没有.mdd/.mdx格式？请问是否是因为stardict有某方面优势？

---

<div class="post-metadata">

作者： ![shaoshi](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/shaoshi/32/14529_2.png) [@shaoshi](https://forum.freemdict.com/u/shaoshi)\
发布日期： [2023 年4 月 1 日 13:09 UTC](https://forum.freemdict.com/t/topic/20225/2 "2023-04-01T13:09:06Z")

</div>

我个人认为别转换了，直接放在Goldendict里用。

参看：

[词库种类及使用方法](https://forum.freemdict.com/t/topic/17795)

你一定要用欧路，就得看其说明：

欧路词库编辑器 -《欧路词典》的词库制作工具

支持源文件格式

- StarDict词库

1. 使用CvtStarDict2Txt将词库转为Txt文件
2. 直接将该文件作为源文件，即可压缩

> **[欧路辞典 词库编辑器](https://www.eudic.net/eudic/builder.aspx)**
>
> 欧路词典 专为苹果OS X系统开发语词典软件，支持加载Mdict、灵格斯等众多格式的扩充词库

---

<div class="post-metadata">

作者： ![beginner](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/b/e495f1/32.png) [@beginner](https://forum.freemdict.com/u/beginner)\
发布日期： [2023 年4 月 1 日 13:35 UTC](https://forum.freemdict.com/t/topic/20225/3 "2023-04-01T13:35:38Z")

</div>

主要是goldendict没有背单词功能所以还是暂时要用欧路  
以及我刚刚又看了一遍，貌似这个方法并不支持.dict.dz格式… = =

---

<div class="post-metadata">

作者： ![shaoshi](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/shaoshi/32/14529_2.png) [@shaoshi](https://forum.freemdict.com/u/shaoshi)\
发布日期： [2023 年4 月 1 日 13:42 UTC](https://forum.freemdict.com/t/topic/20225/4 "2023-04-01T13:42:20Z")

</div>

那样的话，你把startdict词库转为文本，用文本做mdx，有图像就做mdd吧。

没有一键转换的软件，得用人工。

参看：

[新手指南：怎样编辑mdx？](https://forum.freemdict.com/t/topic/16431)

---

<div class="post-metadata">

作者： ![beginner](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/b/e495f1/32.png) [@beginner](https://forum.freemdict.com/u/beginner)\
发布日期： [2023 年4 月 1 日 13:44 UTC](https://forum.freemdict.com/t/topic/20225/5 "2023-04-01T13:44:24Z")

</div>

感恩解惑！下周闲下来研究一下！

---

<div class="post-metadata">

作者： ![H4M5TER](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/h4m5ter/32/18734_2.png) [@H4M5TER](https://forum.freemdict.com/u/H4M5TER)\
发布日期： [2023 年4 月 2 日 11:23 UTC](https://forum.freemdict.com/t/topic/20225/6 "2023-04-02T11:23:06Z")

</div>

要进行词典格式转换，你应该把词典解包成源数据，然后重新进行打包  
我记得在本坛见过通用的词典解包工具，但是在本坛、谷歌、GitHub 都没搜出来  
退求其次找专用的，随手谷歌了一下 `.dict.dz unpack` 搜到这个

> **[GitHub - baskerville/sdunpack: Unpack a StarDict dictionary as plain text](https://github.com/baskerville/sdunpack)**
>
> Unpack a StarDict dictionary as plain text. Contribute to baskerville/sdunpack development by creating an account on GitHub.

---

<div class="post-metadata">

作者： ![shaoshi](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/shaoshi/32/14529_2.png) [@shaoshi](https://forum.freemdict.com/u/shaoshi)\
发布日期： [2023 年4 月 2 日 11:42 UTC](https://forum.freemdict.com/t/topic/20225/7 "2023-04-02T11:42:34Z")

</div>

有兴趣可以看看步天歌讨论的这个工具：

[PyGlossary：将不同格式的字典转换成 Kindle 字典](https://forum.freemdict.com/t/topic/18617)

---

<div class="post-metadata">

作者： ![步天歌](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/%E6%AD%A5%E5%A4%A9%E6%AD%8C/32/29973_2.png) [@步天歌](https://forum.freemdict.com/u/%E6%AD%A5%E5%A4%A9%E6%AD%8C)\
发布日期： [2023 年4 月 2 日 11:56 UTC](https://forum.freemdict.com/t/topic/20225/8 "2023-04-02T11:56:54Z")

</div>

很遗憾，由于mdx未完全开源的原因，这个工具不能实现idx一键转为mdx，还是用上面老哥提到的解压然后再压缩吧

---

<div class="post-metadata">

作者： ![步天歌](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/%E6%AD%A5%E5%A4%A9%E6%AD%8C/32/29973_2.png) [@步天歌](https://forum.freemdict.com/u/%E6%AD%A5%E5%A4%A9%E6%AD%8C)\
发布日期： [2023 年4 月 2 日 12:34 UTC](https://forum.freemdict.com/t/topic/20225/9 "2023-04-02T12:34:59Z")

</div>

最大优势：不会有版权纠纷（个人推测）

看法由来：  
stardict格式是由国人胡正先生于大学在校期间制定、完善的开源电子词典文件格式（主要开发时间：2002-2006年），由于其在词典索引上做了优化，外加使用清晰明确的软件许可证（GNU General Public License）分发，在 Linux 广受好评。

你找到的idx格式的小语种词典很可能出自某位使用Linux的外国程序员友人之手，而国内的程序员在彼时（2002-2006年）还是少数群体，关注这个项目的不多，开发者胡正不久后由于一些原因再也没有更新过 stardict ——这可能是 mdx 能后来居上的主要原因吧。

P.S.:胡正名列「 华人编程界的四大魔道天王」某些程度上可能不是因为stardict 而是其个人博客：

[辟支佛胡正 · 阿罗汉尊者 · 功德藏闯菩萨 · 大慈愍心佛 - 菩萨道Linux编程 (huzheng.org)](http://huzheng.org/)

（看网页的预加载标题应该也能嗅出一点诡异的味道，我劝大家还是不要点开了233）

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2023 年4 月 2 日 12:53 UTC](https://forum.freemdict.com/t/topic/20225/10 "2023-04-02T12:53:55Z")

</div>

谷歌应用商店里，仍然有大把的词典APP使用胡正的StarDict格式，很多安装量都在几百万以上，不看博客也是名符其实的。

---

<div class="post-metadata">

作者： ![aholx](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/a/53a042/32.png) [@aholx](https://forum.freemdict.com/u/aholx)\
发布日期： [2023 年4 月 2 日 12:54 UTC](https://forum.freemdict.com/t/topic/20225/11 "2023-04-02T12:54:36Z")

</div>

这位已经涅槃了吧，😆

---

<div class="post-metadata">

作者： ![beginner](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/b/e495f1/32.png) [@beginner](https://forum.freemdict.com/u/beginner)\
发布日期： [2023 年4 月 3 日 05:52 UTC](https://forum.freemdict.com/t/topic/20225/12 "2023-04-03T05:52:06Z")

</div>

词典的包里有三个文件，idx仅有500kb，另一dz文件有1200kb，请问解idx和解dz的产出是一样的吗？

---

<div class="post-metadata">

作者： ![shaoshi](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/shaoshi/32/14529_2.png) [@shaoshi](https://forum.freemdict.com/u/shaoshi)\
发布日期： [2023 年4 月 3 日 06:07 UTC](https://forum.freemdict.com/t/topic/20225/13 "2023-04-03T06:07:37Z")

</div>

目标是欧路词库，就不需要做mdx了。

1.用免费软件7zip (其他解压软件大概也行)把dz解压，就得到dict文件。

2.用欧路说的dict转文本软件CvtStarDict2Txt，把dict转换为文本。

3.用欧路的编译程式把文本编译成欧路可用的词库。

7zip下载  
[https://www.7-zip.org/download.html](https://www.7-zip.org/download.html)

供参考：

StarDict is a program for reading language dictionaries (AKA glossaries), written by Hu Zheng. It was intended as a successor to StarDic. Its dictionary format consists of an info file with extension “.ifo”, a data file with the extension “.dict” (commonly compressed with Dzip to become “.dict.dz”), an index file with extension “.idx”, and a synonyms file with the extension “.syn”. This is not to be confused with the Dictd format, also uses a data file with a “.dict” or “.dict.dz” extension, but has nothing else besides an index file, for which it uses the extension “.index” instead of “.idx”.

[http://justsolve.archiveteam.org/wiki/StarDict](http://justsolve.archiveteam.org/wiki/StarDict)

---

<div class="post-metadata">

作者： ![beginner](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/b/e495f1/32.png) [@beginner](https://forum.freemdict.com/u/beginner)\
发布日期： [2023 年4 月 3 日 08:30 UTC](https://forum.freemdict.com/t/topic/20225/14 "2023-04-03T08:30:25Z")

</div>

cool，这招确实管用，一下子解决了！感谢

---

<div class="post-metadata">

作者： ![liwenyi777](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/l/e95f7d/32.png) [@liwenyi777](https://forum.freemdict.com/u/liwenyi777)\
发布日期： [2023 年4 月 3 日 10:20 UTC](https://forum.freemdict.com/t/topic/20225/15 "2023-04-03T10:20:05Z")

</div>

欧路字典根据官网是支持eudict,mdict,lingoes,babylon等词典格式， PyGlossary支持stardict和lingoes格式的读和写操作的，你可以尝试将stardict格式转成lingoes格式，看欧路能不能读取。

---

<div class="post-metadata">

作者： ![cappy7](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@cappy7](https://forum.freemdict.com/u/cappy7)\
发布日期： [2024 年8 月 17 日 18:39 UTC](https://forum.freemdict.com/t/topic/20225/16 "2024-08-17T18:39:16Z")

</div>

你好，请问下如何提取syn文件中的数据，我尝试使用了CvtStarDict2Txt，但是只能提取到txt格式的词典数据，其中并未包含同义词数据。

[Chinese-English Wiktionary dictionary stardict.tar.gz](https://forum.freemdict.com/uploads/short-url/2eys7tB4nhp747tfQvJYHZxojvq.gz) (4.6 MB)

---

<div class="post-metadata">

作者： ![shaoshi](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/shaoshi/32/14529_2.png) [@shaoshi](https://forum.freemdict.com/u/shaoshi)\
发布日期： [2024 年8 月 17 日 23:18 UTC](https://forum.freemdict.com/t/topic/20225/17 "2024-08-17T23:18:11Z")

</div>

不了解这个东西，也没兴趣尝试。不爱亦莫能助，看有没有高人能为你指路。

---

<div class="post-metadata">

作者： ![cappy7](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@cappy7](https://forum.freemdict.com/u/cappy7)\
发布日期： [2024 年8 月 17 日 23:40 UTC](https://forum.freemdict.com/t/topic/20225/18 "2024-08-17T23:40:02Z")

</div>

已解决，通过[pyglossary](https://github.com/ilius/pyglossary)转换得到的txt词典文件中有包含同义词数据。

---

<div class="post-metadata">

作者： ![youarewise](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/youarewise/32/82344_2.png) [@youarewise](https://forum.freemdict.com/u/youarewise)\
发布日期： [2025 年11 月 26 日 22:59 UTC](https://forum.freemdict.com/t/topic/20225/19 "2025-11-26T22:59:41Z")

</div>

感谢！非常有帮助~ 😊
