Command line Dictionary: using WordNet

I always wanted to have an offline + command line dictionary on my linux box.

First, I don’t want to open a web browser to search the definition of a single word. Secondly I wanted my dictionary to be ‘fast’ and ‘simple’.

I think now I found one. WordNet..WordNet is a database for English words maintained by serious people at Princeton University [find out more]

Okay, the first thing is to download and install the wordnet package on your system.

Download WordNet 3.0 for Unix-like systems.

tar zxvf WordNet-3.0.tar.gz
cd WordNet-3.0/

(* Your system may not have tcl/tk installed. If that is your case, sudo apt-get install pkg-config tcl-dev tk-dev.)

sudo make install

Okay, now your program is ready. You just need to let your system know where the
program is located and how to use it. Add this to your .bashrc file and source it

export PATH;

Now you can look up words in your terminal as below:

[user@romanegloo WordNet-3.0]$ wn wordnet -over

Overview of noun wordnet

The noun wordnet has 2 senses (no senses from tagged texts)

1. wordnet -- (any of the machine-readable lexical databases modeled
        after the Princeton WordNet)
2. WordNet, Princeton WordNet -- (a machine-readable lexical database
        organized by meanings; developed at Princeton University)

You also can make your script to make it simpler and faster.

wn $1 -over

[user@romanegloo WordNet-3.0]$ dic fast

Overview of noun fast

The noun fast has 1 sense (first 1 from tagged texts)

1. (1) fast, fasting -- (abstaining from food)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s