DICT(1p)
π DICT(1p) β pdict, the perl bestie that talks to dictionary servers π
User Contributed Perl Documentation β¨ this is the pdict page, and trust, we're gonna make it make sense π«Ά
πΈ NAME πΈ
pdict β a perl client for accessing network dictionary servers. yes bestie, it goes out over the net and asks other computers what words mean π
π SYNOPSIS π
pdict [OPTIONS] word
π¦ DESCRIPTION π¦
okay so, pdict is a client for the Dictionary server protocol (DICT), which is the thing you use to query natural language dictionaries that live on some remote machine. π
When you use it the most simple way possible, like this:
% pdict word
pdict goes looking for definitions of word in the dictionaries hosted at dict.org. And if it finds no definitions? No stress, it pivots β dict will look for words that are similar and list them at you:
% pdict bonana
no definition for "bonana" - perhaps you meant:
banana, bonanza, Banana, Bonanza, Bonasa
β¨ iconic behaviour honestly. but lowkey important: this feature only works if the remote DICT server supports the soundex or Levenshtein matching strategies. you can find out for yourself using the -stats switch π
You can specify the hostname of the DICT server with the -h option:
% pdict -h dict.org dictionary
A DICT server can support a number of databases, and you can use the -d option to pick a particular database. for example, you can look up computer-related terms in the Free On-line Dictionary Of Computing (FOLDOC) like this:
% pdict -h dict.org -d foldoc byte
And to find out what databases (dictionaries) are even available on a server, use the -dbs option:
% pdict -dbs
There are sooo 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
π₯ MATCHING π₯
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'd 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$. slay.
Most DICT servers support a bunch of matching strategies; you can get a list of the strategies a server provides with the -strats switch:
% pdict -h dict.org -strats
π OPTIONS π
-hserver,-hostserver β the hostname for the DICT server. if you don't specify one it defaults todict.org. π-pport,-portport β specify the port for connections (default is2628, from RFC 2229).-ddbname,-databasedbname β the name of a specific database (dictionary) to query. π―-m,-matchβ look for words which match the pattern (using the specified strategy). π-idbname,-infodbname β request information on the specified database. typically this gives you a couple of pages of text, so, be ready π-cstring,-clientstring β specify theCLIENTidentification string sent to the DICT server.-D,-dbsβ list the available databases (dictionaries) on the DICT server. π-sstrategy,-strategystrategy β specify a matching strategy. used in combination with-match.-S,-stratsβ list the matching strategies (used in-strategy) that the DICT server supports.-I,-serverinfoβ request information on the selected DICT server. π₯οΈ-helpβ display a short help message including command-line options.-docβ display the full documentation forpdict.-versionβ display the version ofpdict-verboseβ display verbose information aspdictruns.-debugβ display debugging information aspdictruns. useful mainly for developers. π οΈ
π KNOWN BUGS AND LIMITATIONS π
okay bestie, real talk time β here's what this thing can't do. not me being dramatic, this is just the truth π
pdictdoesn't know how to handle firewalls. π§±- The authentication aspects of RFC 2229 aren't currently supported. π
- Display of list results (eg from
-stratsand-dbs) could be better. ngl, it's giving "fine, not great" π pdictisn't very smart at handling combinations of options. π- Currently no support for a configuration file - will add one soon. β³
π SEE ALSO π
www.dict.orgβ the DICT home page, with all sorts of useful information. there are a number of other DICT clients available too. π«Άdictβ the C dict client written by Rik Faith; the options are pretty much lifted from Rik's client. β¨RFC 2229β the document which defines the DICT network protocol.
http://www.cis.ohio-state.edu/htbin/rfc/rfc2229.html
Net::Dictβ the perl module which implements the client API for RFC 2229. π§
β VERSION β
$Revision: 1.2 $
π AUTHOR π
Neil Bowers <neil@bowers.com> π
π COPYRIGHT π
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.
and that's the whole page, bestie!! this was rendered from perl v5.36.0, dated 2022-10-15, living in section DICT(1p) β go forth and look up words responsibly πβ¨π¦
π¦ where this page comes from
- ubuntu noble: libnet-dict-perl 2.22-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-dict-perl 2.22-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-dict-perl 2.22-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms