[olug] Unix Tip: ONLINE/COMMAND-LINE DICTIONARY

thehaas at binary.net thehaas at binary.net
Mon May 5 12:39:48 UTC 2003


On Sun, May 04, 2003 at 05:54:25PM -0500, Adam Korab wrote:
> Or just use a dict protocol server and any old dict protocol client.
> Check out www.dict.org (old homepage section is most useful)

I prefer using Google (via the Google API) for my spelling help -- it 
seems to be better with suggestions.

Here is a simple script written with the Google API for Python -- I'm
sure there is one for Perl as well:

   #!/usr/bin/env python
   
   import google,sys
   
   word = google.doSpellingSuggestion(sys.argv[1])
   
   if not word:
   	print "## I guess '%s' is the right spelling .  . . " %sys.argv[1]
   
   else:
   	print "'%s' : '%s'" %(sys.argv[1],word)
   

-- mikeh



More information about the OLUG mailing list