Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the problem of how to query dictionaries offline without network Linux

Shulou Source: shulou.com Published: 2022-06-01 07:53:15 11月11日 Update

This article mainly explains "how to solve the problem of how to query the dictionary offline without network Linux". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow Xiaobian's train of thought to study and learn "how to solve the problem of how to query the dictionary offline without network Linux".

First of all, you need to set dictd locally. Dictd is a dictionary database server. It allows you to access online dictionaries. But wait a minute, aren't we going to use it offline? This is why we want to install it locally. It comes with a command line client.

To install on Ubuntu or Debian, you need to type:

$sudo apt-get install dictd

This is very simple. Now you need to install the dictionary you use. Dictd automatically reloads its database after each dictionary plug-in is installed. Let's install an English dictionary and an English synonym dictionary.

Enter:

$sudo apt-get install dict-gcide

$sudo apt-get install dict-moby-thesaurus

If you want to query other languages that you can query, you can type:

$sudo apt-cache search "dict package"

This will list something like this:

Dict-freedict-eng-ara-DictpackageforEnglish-ArabicFreedict dictionary

Dict-freedict-eng-cro-DictpackageforEnglish-CroatianFreedict dictionary

Dict-freedict-eng-cze-DictpackageforEnglish-CzechFreedict dictionary

Dict-freedict-eng-deu-DictpackageforEnglish-GermanFreedict dictionary

Dict-freedict-eng-fra-DictpackageforEnglish-FrenchFreedict dictionary

Now that you have successfully installed dictd, you can look up the dictionary.

First, let's check if the dictd service is running and what databases are installed:

$dict-I

Sample output:

Dictd 1.12.0/rf on Linux3.2.0-29-generic-pae

On my_host: up 95.000 Magi 2 forks (75.8/hour)

DatabaseHeadwordsIndexDataUncompressed

Gcide 2036453859 kB 12 MB 38 MB

Moby-thesaurus 30263528 kB 10 MB 28 MB

In order to query a word, you can specify the dictionary to query. Let's look up the English one dictionary (gcid):

$dict-d gcide [the word you want to look up]

If you do not use the-d parameter, dictd will search all installation dictionaries and return matching results.

Thank you for your reading, the above is the content of "how to solve the problem of how to query dictionaries offline without network Linux". After the study of this article, I believe you have a deeper understanding of how to solve the problem of how to query dictionaries offline without network Linux. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Dictionaries queries questions computers networks data databases learning input content words English services success reasons parameters synonyms commands clients clients Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Technology MariaDB vpn Apple