# 如果词典软件支持这些功能你愿意用吗？

**URL:** <https://forum.freemdict.com/t/topic/14207>\
**Category:** 软件经验交流展望\
**Created:** [July 24, 2022, 2:10am UTC](https://forum.freemdict.com/t/topic/14207 "2022-07-24T02:10:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![surfactant](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@surfactant](https://forum.freemdict.com/u/surfactant)\
**Post date:** [July 24, 2022, 2:10am UTC](https://forum.freemdict.com/t/topic/14207/1 "2022-07-24T02:10:45Z")

</div>

1. 跨平台软件且词库数据可跨平台同步
2. 词条内容可随意编辑并插入图片音视频表格
3. 词条之间可创建互访链接
4. 词条可以无穷种方式创建分类索引
5. 检索方式支持仅词条或全文含通配符检索乃至图片OCR检索
6. 有需要可用脚本对词库进行整体处理

---

<div class="post-metadata">

**Author:** ![Vim](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/vim/32/8408_2.png) [@Vim](https://forum.freemdict.com/u/Vim)\
**Post date:** [July 24, 2022, 2:25am UTC](https://forum.freemdict.com/t/topic/14207/2 "2022-07-24T02:25:59Z")

</div>

现有的不都已经实现了？

---

<div class="post-metadata">

**Author:** ![surfactant](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@surfactant](https://forum.freemdict.com/u/surfactant)\
**Post date:** [July 24, 2022, 2:27am UTC](https://forum.freemdict.com/t/topic/14207/3 "2022-07-24T02:27:08Z")

</div>

词典软件可以编辑词条？我说的是一个单一的词典软件

---

<div class="post-metadata">

**Author:** ![匿名1281](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/%E5%8C%BF/9de0a6/32.png) [@匿名1281](https://forum.freemdict.com/u/%E5%8C%BF%E5%90%8D1281)\
**Post date:** [July 24, 2022, 2:53am UTC](https://forum.freemdict.com/t/topic/14207/4 "2022-07-24T02:53:55Z")

</div>

> [@surfactant](#):
>
> 词条可以无穷种方式创建分类索引

這若能從每個單詞釋義上來自動分類歸屬哪些關鍵分類索引那就太完美了 😅

---

<div class="post-metadata">

**Author:** ![匿名1301](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/%E5%8C%BF/bb73d2/32.png) [@匿名1301](https://forum.freemdict.com/u/%E5%8C%BF%E5%90%8D1301)\
**Post date:** [July 24, 2022, 2:58am UTC](https://forum.freemdict.com/t/topic/14207/5 "2022-07-24T02:58:11Z")

</div>

你實現了肯定用啊，合着你擱這提需求呢？

---

<div class="post-metadata">

**Author:** ![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)\
**Post date:** [July 24, 2022, 3:40am UTC](https://forum.freemdict.com/t/topic/14207/7 "2022-07-24T03:40:47Z")

</div>

词典软件的搜索能力和词典格式是息息相关的，格式越强大，软件能做的就更多。某种程度上，可以说越是通用的格式，词典软件能做的就越少，这是很矛盾的。还有平台上的差别，移动端能做的又更少了。

---

<div class="post-metadata">

**Author:** ![surfactant](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@surfactant](https://forum.freemdict.com/u/surfactant)\
**Post date:** [July 24, 2022, 4:01am UTC](https://forum.freemdict.com/t/topic/14207/8 "2022-07-24T04:01:15Z")

</div>

> [@匿名1281](#):
>
> 這若能從每個單詞釋義上來自動分類歸屬哪些關鍵分類索引那就太完美了

如果你只是需要分类索引，可以把词典导入笔记软件。然后手动索引步骤：输入关键词检索 \> 检索结果加一个tag \> 搞定。如果需要自动添加复杂的索引，在文本编辑软件中写个简单脚本，再复杂的索引也瞬间搞定。tag的管理类似管理文件夹树形结构一样简单。

> [@匿名1301](#):
>
> 你實現了肯定用啊，合着你擱這提需求呢？

你提需求，如果现有工具就能解决，你0成本搞定，我不花冤枉钱，不是皆大欢喜？

> [@one](#):
>
> 少了那些看不见的html、xml语法标记，词典的体积至少能减少一半以上。。。
> 
> 。。。而不是没了某个词典软件，我就看不了这种词典格式的内容

只能说你是个环保主义者 😅

> [@last\_idol](#):
>
> 越是通用的格式，词典软件能做的就越少

所以说目前的词典软件基本上还是沿用纸书的模式，内容/索引基本上都不允许直接更改

---

<div class="post-metadata">

**Author:** ![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)\
**Post date:** [July 24, 2022, 4:09am UTC](https://forum.freemdict.com/t/topic/14207/9 "2022-07-24T04:09:08Z")

</div>

举个实际的例子，说明词典格式和词典软件的关系：

假设拉丁字母，考虑国际化：

小写a，有39个变体：

> àáâãäåāăąǎǟǡǻȁȃȧɐəɚᶏᶕạảạảấầẩẫậắằẳẵặₐₔⱥⱯ

大写A，有32个变体：

> ÀÁÂÃÄÅĀĂĄƏǍǞǠǺȀȂȦȺᴀḀẠẢẤẦẨẪẬẮẰẲẴẶ

如果是词典软件来做忽略大小写查询的话，时间不可想象，有71个变体a需要去查询。但如果词典格式提前做好从变体a到拉丁字母a的映射，只需要1次查询就能出结果。

---

<div class="post-metadata">

**Author:** ![surfactant](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@surfactant](https://forum.freemdict.com/u/surfactant)\
**Post date:** [July 24, 2022, 4:17am UTC](https://forum.freemdict.com/t/topic/14207/10 "2022-07-24T04:17:27Z")

</div>

> [@last\_idol](#):
>
> 如果是词典软件来做忽略大小写查询的话，时间不可想象，有71个变体a需要去查询

我也认为当前的 mdict 词库格式是过于简单化了，忽略了查询变体是作为词典使用的一个基本要求。

但是这个工作如果交给词典软件来做应该也不是想你说的：“时间不可想象”，毕竟所有词头的数据量就算翻100倍也顶多赶上正文的数据量。另外，就算你在词典格式里支持把词头写成一个正则，词库看上去简单了，但正则的计算量并不会减少

---

<div class="post-metadata">

**Author:** ![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)\
**Post date:** [July 24, 2022, 4:34am UTC](https://forum.freemdict.com/t/topic/14207/12 "2022-07-24T04:34:24Z")

</div>

输入的字母越多，需要匹配的次数就会指数增长。

单个拉丁字母a，是71次，两个a就是5041次。如果查询单词：

> Kommunalfahrzeug

…

正则查询也不例外的。虽然假装成了一次查询，但匹配次数一样不会少。词典的索引里不会存正则的，存的都是从变体到常规字母的映射。比如：

> äußerst → ausserst

实际词典格式两个单词都会存储，常规查询用前者，需要做忽略大小写查询，使用后者。

---

<div class="post-metadata">

**Author:** ![surfactant](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@surfactant](https://forum.freemdict.com/u/surfactant)\
**Post date:** [July 24, 2022, 5:13am UTC](https://forum.freemdict.com/t/topic/14207/13 "2022-07-24T05:13:50Z")

</div>

> [@last\_idol](#):
>
> 单个拉丁字母a，是71次，两个a就是5041次。如果查询单词：

实际算法应该有比较好的办法处理这个问题，否则只要是稍微复杂一点的正则用最先进的超级计算机都处理不了

---

<div class="post-metadata">

**Author:** ![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)\
**Post date:** [July 24, 2022, 5:23am UTC](https://forum.freemdict.com/t/topic/14207/14 "2022-07-24T05:23:09Z")

</div>

没有。这和算法没关系。

---

<div class="post-metadata">

**Author:** ![surfactant](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@surfactant](https://forum.freemdict.com/u/surfactant)\
**Post date:** [July 24, 2022, 5:26am UTC](https://forum.freemdict.com/t/topic/14207/15 "2022-07-24T05:26:18Z")

</div>

你认为处理变体的最佳方案是什么？

---

<div class="post-metadata">

**Author:** ![surfactant](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@surfactant](https://forum.freemdict.com/u/surfactant)\
**Post date:** [July 24, 2022, 5:45am UTC](https://forum.freemdict.com/t/topic/14207/16 "2022-07-24T05:45:28Z")

</div>

> [@last\_idol](#):
>
> 词典软件的搜索能力和词典格式是息息相关的，格式越强大，软件能做的就更多。

请教下，你认为词典格式应该如何优化能做到搜索效率最高？

---

<div class="post-metadata">

**Author:** ![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)\
**Post date:** [July 24, 2022, 6:05am UTC](https://forum.freemdict.com/t/topic/14207/17 "2022-07-24T06:05:23Z")

</div>

最优解是参考物书堂的实现，定制特殊的格式。MDict格式的话，结构不用变，每个词头做两个索引，一个是正常的，一个是忽略变体忽略大小写后的。很多词典的作者已经做到这一步了。

---

<div class="post-metadata">

**Author:** ![surfactant](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@surfactant](https://forum.freemdict.com/u/surfactant)\
**Post date:** [July 24, 2022, 6:17am UTC](https://forum.freemdict.com/t/topic/14207/18 "2022-07-24T06:17:37Z")

</div>

不太明白，继续请教，你上面的这个例子就是存这两条索引：äußerst ausserst，对吗？如果现在我输入 außerst，词典软件具体怎么运行？

我大概明白你的意思了，如果检索词第一遍没找到，就根据一个变体映射表把这个检索词标准化一下，然后再检索一遍。的确是个好办法。

> [@last\_idol](#):
>
> 很多词典的作者已经做到这一步了。

Dict Tango 中的“用户码表文件”应该就是你说的这个“映射表”吧？

---

<div class="post-metadata">

**Author:** ![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)\
**Post date:** [July 24, 2022, 6:47am UTC](https://forum.freemdict.com/t/topic/14207/19 "2022-07-24T06:47:24Z")

</div>

词典软件和格式如果有缺陷，就需要词典作者自己去弥补，但也有很多边缘情况受限于格式本身缺陷，作者自己是照顾不到的，可区分词典软件好用与否的关键就在这。

MDict没有映射表，GoldenDict可以查原形，但变体之间无法互相查询，DictTango是有自定义映射表的。

---

<div class="post-metadata">

**Author:** ![surfactant](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@surfactant](https://forum.freemdict.com/u/surfactant)\
**Post date:** [July 24, 2022, 6:49am UTC](https://forum.freemdict.com/t/topic/14207/20 "2022-07-24T06:49:08Z")

</div>

涨知识了 👍

---

<div class="post-metadata">

**Author:** ![surfactant](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@surfactant](https://forum.freemdict.com/u/surfactant)\
**Post date:** [July 24, 2022, 6:52am UTC](https://forum.freemdict.com/t/topic/14207/21 "2022-07-24T06:52:18Z")

</div>

但是这个映射表对复数、过去分词这样的变体还是无能为力，这个现在最好的解决方案你了解吗？

---

<div class="post-metadata">

**Author:** ![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)\
**Post date:** [July 24, 2022, 6:53am UTC](https://forum.freemdict.com/t/topic/14207/22 "2022-07-24T06:53:24Z")

</div>

变形查询这个就是构词库，GoldenDict，深蓝词典，DictTango都有的。

[Next page](https://forum.freemdict.com/t/topic/14207.md?page=2)
