DICT(1p) | User Contributed Perl Documentation | DICT(1p) |
pdict - a perl client for accessing network dictionary servers
pdict [OPTIONS] word
pdict is a client for the Dictionary server protocol (DICT), which is used to query natural language dictionaries hosted on a remote machine. When used in the most simple way,
% pdict word
pdict will look for definitions of word in the dictionaries hosted at dict.org. If no definitions are found, then dict will look for words which are similar, and list them:
% pdict bonana no definition for "bonana" - perhaps you meant: banana, bonanza, Banana, Bonanza, Bonasa
This feature is only available if the remote DICT server supports the soundex or Levenshtein matching strategies. You can use the -stats switch to find out for yourself.
You can specify the hostname of the DICT server using the -h option:
% pdict -h dict.org dictionary
A DICT server can support a number of databases; you can use the -d option to specify a particular database. For example, you can look up computer-related terms in the Free On-line Dictionary Of Computing (FOLDOC) using:
% pdict -h dict.org -d foldoc byte
To find out what databases (dictionaries) are available on a server, use the -dbs option:
% pdict -dbs
There are many dictionaries hosted on other servers around the net; a list of some of them can be found at
http://www.dict.org/links.html
Instead of requesting word definitions, you can use pdict to request a list of words which match a pattern. For example, to look for four-letter words starting in 'b' and ending in 'p', you would use:
% pdict -match -strategy re '^b..p$'
The -match option says you want a list of matching words rather than a definition. The -strategy re says to use POSIX regular expressions when matching the pattern ^b..p$.
Most DICT servers support a number of matching strategies; you can get a list of the strategies provided by a server using the -strats switch:
% pdict -h dict.org -strats
http://www.cis.ohio-state.edu/htbin/rfc/rfc2229.html
$Revision: 1.2 $
Neil Bowers <neil@bowers.com>
Copyright (C) 2002 Neil Bowers. All rights reserved.
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2016-03-11 | perl v5.22.1 |