Ruby/DICT




Overview and Introduction

Ruby/DICT is an RFC 2229 compliant client-side library implementation of the DICT protocol, written in the Ruby programming language. It can be used to write clients that access dictionary definitions from a set of natural language dictionary databases.

In the words of the RFC:

The DICT protocol is designed to provide access to multiple databases. Word definitions can be requested, the word index can be searched (using an easily extended set of algorithms), information about the server can be provided (e.g., which index search strategies are supported, or which databases are available), and information about a database can be provided (e.g., copyright, citation, or distribution information). Further, the DICT protocol has hooks that can be used to restrict access to some or all of the databases.

The archive also includes rdict, a dictionary client built on top of the Ruby/DICT library.

Here are some examples of its usage:

$ rdict -D

This will provide you with a list of databases you can query.

$ rdict -S

This will provide you with a list of strategies you can employ to match words.

$ rdict -m -s prefix foo

This shows you a list of all words that begin with 'foo' in all of the databases.

$ rdict -m -s re '^(cu|ke)rb$'

This shows you all the definitions relating to both 'curb' and 'kerb' from all the databases. The 're' strategy allows regular expression matching.

$ rdict -m -s suffix fix

This shows a list of all words that end in 'fix' in all of the databases.

Files

FileType
ruby-dict-0.9.4.tar.gztarred and gzipped source
ruby-dict-0.9.4-1.i386.rpmBinary RPM for Ruby 1.8.x
ruby-dict-0.9.4-1.src.rpmSource RPM