DICT(1p)

πŸ“¦
version 2.22 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 πŸ’…

  • -h server, -host server β€” the hostname for the DICT server. if you don't specify one it defaults to dict.org. 🏠
  • -p port, -port port β€” specify the port for connections (default is 2628, from RFC 2229).
  • -d dbname, -database dbname β€” the name of a specific database (dictionary) to query. 🎯
  • -m, -match β€” look for words which match the pattern (using the specified strategy). πŸ”
  • -i dbname, -info dbname β€” request information on the specified database. typically this gives you a couple of pages of text, so, be ready πŸ“–
  • -c string, -client string β€” specify the CLIENT identification string sent to the DICT server.
  • -D, -dbs β€” list the available databases (dictionaries) on the DICT server. πŸ“š
  • -s strategy, -strategy strategy β€” 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 for pdict.
  • -version β€” display the version of pdict
  • -verbose β€” display verbose information as pdict runs.
  • -debug β€” display debugging information as pdict runs. 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 πŸ™ˆ
  • pdict doesn't know how to handle firewalls. 🧱
  • The authentication aspects of RFC 2229 aren't currently supported. πŸ”
  • Display of list results (eg from -strats and -dbs) could be better. ngl, it's giving "fine, not great" πŸ’…
  • pdict isn'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 (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