この記事ではOpenBSD上でdicodによる辞書サーバーを立ち上げるあらましを紹介します。
なお、辞書は英英辞書のGNU Collaborative International Dictionary of English (GCIDE) を使う想定です。pkg_info -Q dictとするとFreeDictをはじめとして色々な辞書が列挙されるため、他の辞書についても工夫次第で使えるかもしれません。
まず、必要なパッケージをインストールします。
doas pkg_add dico gcide
GNU Dicoのデーモンdicodを有効化して起動します。
doas rcctl enable dicod
doas rcctl start dicod
Dicoの構成ファイルは/etc/dicod.confにあります。やさしいことに、このファイルにはGCIDEの雛形がコメントアウトされています。コメントを外して一応再起動します。
doas rcctl restart dicod
これで手筈は整いました。DicoのREPLを試してみましょう。
$ dico
dico> .database gcide
dico> osmotic
From gcide, GNU Collaborative International Dictionary of English, version 0.54:
osmotic (?), a. Pertaining to, or having the property of, osmosis; as, “osmotic force”.
[1913 Webster]
うまくいきました!
Emacsをお使いのかたはこちらもどうぞ:
使用許諾
Copyright (C) 2026 gemmaro
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without any warranty.