ぼんやりDTP

DTPに関係したりしなかったりするぼんやりとした話をなんとなく。

コマンドラインで辞書を引きたい

コマンドラインで辞書を引きたい

色々方法があるようだが、英英辞典なら pyvoc というのがインストール、利用が簡便そう。

動作としては Oxford Dictionary API を利用しているようだ。

とりあえず辞書を引くだけなら下記の手順で終わる。

pyvoc のインストール

$ pip3 install pyvoc

pyvoc で「word」を引く。

$ pyvoc word

出力例(実際は多少色分けして表示される):

word 
Noun:            single meaningful element of speech or writing
example:         I don't like the word ‘unofficial’

Verb:            express something spoken or written
example:         he words his request in a particularly ironic way

Interjection:    used to express agreement or affirmation
example:         Word, that's a good record, man

参考ページ:

  1. Linux のコマンドラインでオフライン英和辞書 - Qiita

  2. シェルから使うオフラインの英和・和英辞書 - Qiita

  3. software recommendation - Is there an offline command-line dictionary? - Ask Ubuntu

  4. Pyvoc - A Command line Dictionary And Vocabulary Building Tool

  5. GitHub - joegesualdo/dictionary-cli: English dictionary from the command line

  6. GitHub - melboiko/myougiden: A Japanese/English dictionary for the command line, colorful and full of features.

  7. Using a Linux Command Line Dictionary - Putorius