commandline dictionary

wn wonder -over
Note: 1) Replace 'wonder' with any word you looking the meaning for in the above example 2) Need to install these packages: wordnet & wordnet-base (latter should be automatically installed because of dependency) 3) Combined size of packages is about 30MB on my old ubuntu system (I find it worth it)
Sample Output
Overview of noun wonder

The noun wonder has 3 senses (first 3 from tagged texts)

1. (5) wonder, wonderment, admiration -- (the feeling aroused by something strange and surprising)
2. (4) wonder, marvel -- (something that causes feelings of wonder; "the wonders of modern science")
3. (4) curiosity, wonder -- (a state in which you want to learn more about something)

Overview of verb wonder

The verb wonder has 3 senses (first 3 from tagged texts)

1. (58) wonder, inquire, enquire -- (have a wish or desire to know something; "He wondered who had built this beautiful church")
2. (41) wonder, question -- (place in doubt or express doubtful speculation; "I wonder whether this was the right thing to do"; "she wondered whether it would snow tonight")
3. (2) wonder, marvel -- (be amazed at; "We marvelled at the child's linguistic abilities")

3
By: b_t
2010-10-05 13:56:06

These Might Interest You

  • This one uses dictionary.com


    13
    pronounce(){ wget -qO- $(wget -qO- "http://dictionary.reference.com/browse/$@" | grep 'soundUrl' | head -n 1 | sed 's|.*soundUrl=\([^&]*\)&.*|\1|' | sed 's/%3A/:/g;s/%2F/\//g') | mpg123 -; }
    matthewbauer · 2010-03-13 04:23:56 4
  • Lost your luks passphrase? You can always bruteforce from the command line. See the sample output, a simple command using a dictionary. Show Sample Output


    0
    cat dictionary.txt|while read a; do echo $a|cryptsetup luksOpen /dev/sda5 sda5 $a && echo KEY FOUND: $a; done
    rodolfoap · 2014-04-16 18:49:53 1

  • 6
    head -100000 /dev/urandom | strings > temp.txt && for w in $(cat webster-dictionary.txt); do if [ ${#w} -gt 3 ]; then grep -io $w temp.txt; fi; done
    rugina · 2010-12-23 01:58:56 3
  • wget -qO - "http://www.google.com/dictionary/json?callback=dict_api.callbacks.id100&q=steering+wheel&sl=en&tl=en&restrict=pr,de&client=te" this does the actual google dictionary query, returns a JSON string encapsulated in some fancy tag sed 's/dict_api\.callbacks.id100.//' here we remove the tag beginning sed 's/,200,null)//' and here the tag end There are also some special characters which could cause problems with some JSON parsers, so if you get some errors, this is probably the case (sed is your friend). I laso like to trim the "webDefinitions" part, because it (sometimes) contains misleading information. sed 's/\,\"webDefinitions.*//' (but remember to append a "}" at the end, because the JSON string will be invalid) The output also contains links to mp3 files with pronounciation. As of now, this is only usable in the English language. If you choose other than English, you will only get webDefinitions (which are crap).


    1
    wget -qO - "http://www.google.com/dictionary/json?callback=dict_api.callbacks.id100&q=steering+wheel&sl=en&tl=en&restrict=pr,de&client=te" | sed 's/dict_api\.callbacks.id100.//' | sed 's/,200,null)//'
    sairon · 2011-03-08 15:00:39 0

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: