# Chambers 20th Century Dictionary Data Processing

**URL:** <https://forum.freemdict.com/t/topic/7998>\
**Category:** 技术交流与词典编修\
**Created:** [2021 年8 月 29 日 15:21 UTC](https://forum.freemdict.com/t/topic/7998 "2021-08-29T15:21:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年8 月 29 日 15:21 UTC](https://forum.freemdict.com/t/topic/7998/1 "2021-08-29T15:21:50Z")

</div>

来源： Project Gutenberg

目标：从 HTML 文件提取信息，制作可查性良好的电子词典。

[dcurls.txt](https://forum.freemdict.com/uploads/short-url/wfjzkf4ZeHbpYRFmdblhVnLCO6v.txt) (232 字节)

[dc.7z](https://forum.freemdict.com/uploads/short-url/ir0qNKM84DSaQtlwxIO6dBbCL7x.7z) (3.0 MB)

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年8 月 31 日 15:24 UTC](https://forum.freemdict.com/t/topic/7998/3 "2021-08-31T15:24:16Z")

</div>

[extract\_cha\_13\_alpha2.py](https://forum.freemdict.com/uploads/short-url/lETSNNdnUM26EzdCPiCIkKHxBGg.py) (526 字节)

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年8 月 31 日 15:34 UTC](https://forum.freemdict.com/t/topic/7998/4 "2021-08-31T15:34:10Z")

</div>

Alpha 版只做一件事：把主词条包裹起来。测试通过了才进入下一环节。

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年9 月 2 日 16:21 UTC](https://forum.freemdict.com/t/topic/7998/5 "2021-09-02T16:21:12Z")

</div>

考虑对词头进行美式拼写“扩容”。比如 Realise \>\> [Realise, Realize]

一个方案：[Python NLP British English vs American English - Stack Overflow](https://stackoverflow.com/questions/42329766/python-nlp-british-english-vs-american-english)

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年9 月 3 日 12:40 UTC](https://forum.freemdict.com/t/topic/7998/6 "2021-09-03T12:40:32Z")

</div>

看是否能把 Wiktionary 单词地区拼写、变体的数据提取出来。

---

<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)\
发布日期： [2021 年9 月 3 日 12:44 UTC](https://forum.freemdict.com/t/topic/7998/7 "2021-09-03T12:44:02Z")

</div>

这么扩是为啥呀，词典软件会做这件事吗？

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年9 月 3 日 13:03 UTC](https://forum.freemdict.com/t/topic/7998/9 "2021-09-03T13:03:04Z")

</div>

我经常查美式拼写的单词，纯英式词典给不出结果，得再查一遍英式拼写（还不一定能拼出来）。

更正：

可以让词典软件来做拼写扩容。优先显示所查词条，没有再看该词典词头列表内有没有其它地区的拼写，有则显示。

---

<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)\
发布日期： [2021 年9 月 3 日 13:15 UTC](https://forum.freemdict.com/t/topic/7998/10 "2021-09-03T13:15:32Z")

</div>

扩容的词头变形拼写，单独放一个词典里，这样所有词典都能用上，类似 The Little Dict 。

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年9 月 3 日 13:25 UTC](https://forum.freemdict.com/t/topic/7998/11 "2021-09-03T13:25:38Z")

</div>

可以。但最好是让词典软件自动跳转，用户直接看结果。跳转词条可标识一行小字：“由 … 跳至 …"，与正常词条区分。

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年9 月 5 日 10:23 UTC](https://forum.freemdict.com/t/topic/7998/12 "2021-09-05T10:23:30Z")

</div>

不打算对原始文本匹配后手工修改了，拆分词条的计划搁置，但会稍微优化下排版。计算思维。

---

<div class="post-metadata">

作者： ![王寒北](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/%E7%8E%8B/5e9695/32.png) [@王寒北](https://forum.freemdict.com/u/%E7%8E%8B%E5%AF%92%E5%8C%97)\
发布日期： [2021 年9 月 8 日 01:19 UTC](https://forum.freemdict.com/t/topic/7998/13 "2021-09-08T01:19:41Z")

</div>

遇到点困难就放弃了？

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年9 月 8 日 01:33 UTC](https://forum.freemdict.com/t/topic/7998/14 "2021-09-08T01:33:53Z")

</div>

不困难啊，校对部分，识字的猪都能做。但没人给稿费，我不想浪费几十个工时。

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年9 月 8 日 04:01 UTC](https://forum.freemdict.com/t/topic/7998/15 "2021-09-08T04:01:22Z")

</div>

> “We choose to go to the Moon in this decade and do the other things, not because they are easy, but because they are hard, **because that goal will serve to organize and measure the best of our energies and skills,** because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one which we intend to win, and the others, too.”

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年9 月 14 日 04:14 UTC](https://forum.freemdict.com/t/topic/7998/16 "2021-09-14T04:14:34Z")

</div>

插图下载：新建 /images，把 imgurls.txt 扔进去，cd 到那儿，执行：

```

wget -m -e robots=off -np -nd -R 'index.html*' -i imgurls.txt

```

[imgurls.txt](https://forum.freemdict.com/uploads/short-url/hOmdxvWSSssgk6C42qzvbpNxfuy.txt) (216 字节)

[images.7z](https://forum.freemdict.com/uploads/short-url/c4SDCEp0aoPnRlVSVETVszpupo5.7z) (7.7 MB)

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年9 月 20 日 02:50 UTC](https://forum.freemdict.com/t/topic/7998/17 "2021-09-20T02:50:29Z")

</div>

[extract\_cha\_13\_beta.py](https://forum.freemdict.com/uploads/short-url/yBvfDXqGvGFGTqOl512re2QYmOC.py) (1.3 KB)

Got the main entries.

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年9 月 20 日 18:26 UTC](https://forum.freemdict.com/t/topic/7998/19 "2021-09-20T18:26:03Z")

</div>

难的是给衍生词准确地加标签。测了又测，改了又改。

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年9 月 21 日 08:06 UTC](https://forum.freemdict.com/t/topic/7998/23 "2021-09-21T08:06:02Z")

</div>

国庆再继续了。休息。

![002CAAL6gy1guo297g5ipg60m80ci0z002](https://forumcdn.freemdict.com/uploads/default/original/2X/3/35728cf36c2c5255e868f19680ce3ee92a77dc52.gif)

---

<div class="post-metadata">

作者： ![王寒北](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/%E7%8E%8B/5e9695/32.png) [@王寒北](https://forum.freemdict.com/u/%E7%8E%8B%E5%AF%92%E5%8C%97)\
发布日期： [2021 年9 月 23 日 03:48 UTC](https://forum.freemdict.com/t/topic/7998/24 "2021-09-23T03:48:08Z")

</div>

图片有明显逻辑问题  
最后月饼装盒可以全自动，难道前面的那些更简单的工序不能用机器完成？

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年10 月 1 日 04:25 UTC](https://forum.freemdict.com/t/topic/7998/26 "2021-10-01T04:25:40Z")

</div>

Working in a 10-hour coding marathon without break time.

[extract\_cha\_13\_beta6.py](https://forum.freemdict.com/uploads/short-url/qQE3YkKDQwh2krZKapv2JwbTTVi.py) (7.7 KB)

---

<div class="post-metadata">

作者： ![lurker](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/lurker/32/16016_2.png) [@lurker](https://forum.freemdict.com/u/lurker)\
发布日期： [2021 年10 月 1 日 06:11 UTC](https://forum.freemdict.com/t/topic/7998/27 "2021-10-01T06:11:51Z")

</div>

动词分词应被提取。b/i 标签套娃了。

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