Offline dictionaries in Ubuntu

By default, Ubuntu comes with a dictionary. Whenever you look up a word in this dictionary, it queries the online dictionaries for the results. This is fine if your have a 24/7 internet connection. However, if you are offline, mobile without internet, or has a flaky connection, using this dictionary becomes a pain.

Occasionally, my home internet suffered from slow or interrupted connection. In such situation, the dictionary will simply get stuck when looking up a word.

Obviously, the solution is an offline dictionary. Thankfully, you don’t have to look further than the same dictionary application. This tip came from here.

Installation

First, install the dictionary server:

sudo apt-get install dictd

Next. install the words definition packages:

sudo apt-get install dict-gcide dict-wn

Note:
dict-gcide contains the GNU version of the Collaborative International Dictionary of English.
dict-wn is the WordNet(c), an on-line lexical reference system.

You may also want to install a thesaurus:

sudo apt-get install dict-moby-thesaurus

Configuration

I updated this section for Intrepid Ibex. The dictionary application, previously under Accessories menu, has been moved to Office menu. Go to Preferences dialogbox.

Dictionary: preferences

Click “Add”. Enter a source description (I use “Local”). Then, enter “localhost” as the hostname. Leave the port number as it is.

Dictionary: add source

Once you have entered the information above, click “Add”. Now, select the “Local” entry you have just created, and close the Preferences dialogbox.

Dictionary: preferences

Test it

Try search for a word. You would find that the results now appeared almost instantaneously. Also, you no longer have to be online to find a word definition.

There’s more!

If you don’t like the default dictionary application, there is an alternative: StarDict. I find StarDict interface to be slightly confusing, but it has three great features:

  1. a spelling suggestion plugin which is simply amazing
  2. results appeared as you type
  3. “scanning” function, which will show a floating window with the dictionary results when you selected a word anywhere else

To install StarDict:

sudo apt-get install stardict stardict-plugin-spell

StarDict

You can find the StarDict under the Accessories menu. After installation, you might want to go the StarDict website to download words definition packages. Click the “Go to StarDict website” icon on the lower-right of the main window. Follow the instructions on the website on downloading and installing the words definition packages. Once that is done, I preferred to turn off “Net Dict”. This stop StarDict from referring to online websites for the word defintion.

Trackbacks & Pingbacks 1

  1. From Using Default GNOME Dictionary Offlinely on Ubuntu Karmic Koala « Bongkar Muat on 06 Dec 2009 at 3:08 am

    [...] Using Default GNOME Dictionary Offlinely on Ubuntu Karmic Koala 6 December 2009 — batubolu Saat instalasi awal saya cukup senang ketika mendapatkan kamus yang langsung terinstal. Tapi ternyata harus memiliki akses internet jika ingin menggunakannya. Kemudian saya browsing untuk aplikasi kamus, namun malah nyasar ke sini. [...]

Comments 14

  1. ashish wrote:

    This post is very helpful.I just want to know from which database it is searching ? is it searching from the installed pkg dictd ?

    Posted 25 Aug 2009 at 12:43 pm
  2. chewearn wrote:

    hi ashish
    The dictionary package used is indicated in fine print below the definition of the searched word.

    To change to a different package, select
    Menu > View > Available Databases

    Double-click on the specific package to enable.

    Posted 25 Aug 2009 at 1:32 pm
  3. Swaprava wrote:

    Excellent work chewearn!! I could install the offline thesaurus for dict, however for stardict, my default result comes in Chinese, any workaround to make it English?

    Posted 28 Dec 2009 at 11:24 am
  4. chewearn wrote:

    hi Swaprava
    Click the icon “Manage dictionaries” (lower right side of the application window) to find the English dictionaries.

    Posted 28 Dec 2009 at 3:52 pm
  5. ujjwal wrote:

    this is not working for ubuntu 9.10.
    meaning after installation of the dictionary it is not being configured. the local host is not available in port 2628.
    please suggest.

    Posted 04 Aug 2010 at 12:24 pm
  6. chewearn wrote:

    hi ujjwal
    Enter 127.0.0.1 as hostname, instead of localhost. Then, restart the Dictionary application and you should be good to go.

    Posted 04 Aug 2010 at 8:12 pm
  7. pendyala wrote:

    thanks chewearn
    how it is working when we change hostname to 127.0.0.1 or localhost.
    and what is this 127.0.0.1

    Posted 31 Aug 2010 at 9:13 pm
  8. chewearn wrote:

    hi pendyala
    127.0.0.1 is the loopback IP address.

    However, I don’t know why the Dictionary application in Ubuntu 9.10 doesn’t work with “localhost”.

    Posted 31 Aug 2010 at 9:41 pm
  9. Vishnu wrote:

    Hi. Stardict is a good dictionary which I used for almost 2 years. But now the website is removed. So I am not able to get the word definition packages. I lost my word definition package when I re-installed Ubuntu.

    Can you please help me get the word definition package. I want an English to English package.

    Thanks in advance.

    Posted 04 Jul 2011 at 2:40 am
  10. chewearn wrote:

    Looks like StarDict is abandoned. Go to http://stardict.sourceforge.net/ for suggestion on alternatives.

    Posted 05 Jul 2011 at 8:50 pm
  11. Srivaths wrote:

    Thank you chewearn, it worked for me with ip.

    Posted 08 Jul 2011 at 10:45 am
  12. qweeak wrote:

    great article

    Posted 26 Jul 2011 at 9:59 pm
  13. bubby wrote:

    Hi,

    Just wanted to update that stardict package is available at http://code.google.com/p/stardict-3/downloads/list

    Posted 05 Aug 2011 at 12:59 pm
  14. chewearn wrote:

    hi bubby
    Thanks for the link.

    Posted 06 Aug 2011 at 12:23 pm

Post a Comment

Your email is never published nor shared. Required fields are marked *