A Command-Line Dictionary Tool

Wordsmith

Photo by Joshua Hoehne on Unsplash

Photo by Joshua Hoehne on Unsplash

Author(s):

With the dict client, you can quickly search dozens of natural language dictionary databases for the perfect word.

As a writer, I rarely need to look up the definition of a word. If I don’t know a word, I’m not going to risk using it. However, I frequently check that the word has the exact nuance I want. If it does not, I turn to a thesaurus to search for a closer alternative. Unfortunately, a regular dictionary is next to useless for these purposes. That is why I was pleased to discover dict, which not only has the information needed for such purposes, but runs from the command line for added efficiency.

A client for the DICT dictionary network protocol, dict essentially searches several dozen databases and returns comprehensive results in seconds. It is available for major distributions, but note that each database is often in a separate package in distro repositories and must be installed separately from the basic command. The option --dbs (-D) will show a list of these databases, as will the web version of dict (Figure 1). The databases supported by dict include a number of dictionaries, a thesaurus, a collection of acronyms, the Jargon File, the CIA World Factbook, and 34 other languages besides English – far more than the average dictionary offers. The result is not only the range of literal meanings, but numerous contexts as well. Some default results for the word “red” from my current installation are shown in Table 1.

This amount of information makes for intensive scrolling, so dict used with only the basic command and a search term should usually be used with a pager like less or cat. Another option is to specify a specific database, so that only the relevant results are given, using the option --database (-d) DATABASE. For instance

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • dict

    With the dict client, you can quickly search dozens of natural language dictionary databases for the perfect word.

  • KTools: Kdict

    Don’t worry if your memory lets you down. All you need is a place to look for answers. If you want definitions, explanations, and vocubulary, Kdict, KDE’s dictionary utility, is the tool you need.

  • GoldenDict: A Dictionary Nugget
  • Free Software Projects

    Replace dictionaries and notepads with StarDict, the dictionary application, and RedNotebook, a combined notepad, diary, and calendar.

  • WordNet

    The WordNet lexical reference maps connections between words. Check out this fascinating tool based on language data from two decades of research.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News