July 13, 2024

sdcv: an offline dictionary you can query from the command line

Install sdcv:

$ sudo apt install sdcv

You should have the programme installed, but no dictionaries to query.

To add dictionaries, see https://yctct.com/sdcv-add-dic. In this post, I explain: where to find dictionaries, and where to extract the compressed files you’ll have downloaded so that sdcv can query them.

Once you have dictionaries in a directory where sdcv can find them, you will notice that the output of sdcv can be longer than one screen. If you want to add a function which passes the output of sdcv, see https://yctct.com/sdcv-pass-output-less.

If you have multiple dictionaries, the output will be very long. You will want to chose which dictionary exactly to query when you invoke sdcv. To do this, see: https://yctct.com/sdcv-alias.

You can also query a group of dictionaries. That is what I am trying right now. I’ll adjust over time. Below, I explain how I have organised grouped dictionaries so far and which aliases I’ve added to ~/.bash_aliases.

When I want to look up the definition of an English word, or translate a word to English, I run eng which is the alias for the command:

alias eng="def -u 'Merrian Webster 10th dictionary' \ 
        -u 'Collins Thesaurus (En-En)' \ 
        -u 'English Etymology' \ 
        -u 'dictd_www.dict.org_gcide'\ 
        -u 'dicoapertium-fr-en' \
        -u 'quick_frank-deu-eng' \
        -u 'Concise Oxford English Dictionary (En-En)'"

I also included an etymology and thesaurus under this alias, as well as other peculiar dictionaries (all under quick_eng-eng’), to try.

When I want to look up the definition of a German word or translate a word to German, I run de which is:

alias de="def -u 'quick_english-german' \ 
        -u 'quick_frank-eng-deu' \
        -u 'quick_ding-eng-ger' \
        -u 'French - German' \
        -u 'Duden'"

I also trying a few English-German dictionaries.

When I want to look up the definition of a French word or translate a word to French, I run fr which is:

alias fr="def -u 'dicoapertium-en-fr' \ 
        -u 'XMLittre' \
        -u 'Dictionnaire Allemand-Français - JP Cronimus' \
        -u 'Grand Dictionnaire de Cuisine, d’Alexandre Dumas (1873).' \
        -u 'quick_english-french'"

You can list all the dictionaries sdcv queries by running:

$ sdcv -l

personal computing command-line interface (cli) gnu linux trisquel shell literacy office applications wiki sdcv stardic offline

No affiliate links, no analytics, no tracking, no cookies. This work © 2016-2024 by yctct is licensed under CC BY-ND 4.0 .   about me   contact me   all entries & tags   FAQ   GPG public key

GPG fingerprint: 2E0F FB60 7FEF 11D0 FB45 4DDC E979 E52A 7036 7A88