.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DICT 1p" .TH DICT 1p "2022-10-15" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" pdict \- a perl client for accessing network dictionary servers .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBpdict\fR [\s-1OPTIONS\s0] \fIword\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBpdict\fR is a client for the Dictionary server protocol (\s-1DICT\s0), which is used to query natural language dictionaries hosted on a remote machine. When used in the most simple way, .PP .Vb 1 \& % pdict word .Ve .PP \&\fBpdict\fR will look for definitions of \fIword\fR in the dictionaries hosted at \fBdict.org\fR. If no definitions are found, then dict will look for words which are similar, and list them: .PP .Vb 3 \& % pdict bonana \& no definition for "bonana" \- perhaps you meant: \& banana, bonanza, Banana, Bonanza, Bonasa .Ve .PP This feature is only available if the remote \s-1DICT\s0 server supports the \fIsoundex\fR or \fILevenshtein\fR matching strategies. You can use the \fB\-stats\fR switch to find out for yourself. .PP You can specify the hostname of the \s-1DICT\s0 server using the \fB\-h\fR option: .PP .Vb 1 \& % pdict \-h dict.org dictionary .Ve .PP A \s-1DICT\s0 server can support a number of databases; you can use the \fB\-d\fR option to specify a particular database. For example, you can look up computer-related terms in the Free On-line Dictionary Of Computing (\s-1FOLDOC\s0) using: .PP .Vb 1 \& % pdict \-h dict.org \-d foldoc byte .Ve .PP To find out what databases (dictionaries) are available on a server, use the \fB\-dbs\fR option: .PP .Vb 1 \& % pdict \-dbs .Ve .PP There are many dictionaries hosted on other servers around the net; a list of some of them can be found at .PP .Vb 1 \& http://www.dict.org/links.html .Ve .SS "\s-1MATCHING\s0" .IX Subsection "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 would use: .PP .Vb 1 \& % pdict \-match \-strategy re \*(Aq^b..p$\*(Aq .Ve .PP The \fB\-match\fR option says you want a list of matching words rather than a definition. The \fB\-strategy re\fR says to use \s-1POSIX\s0 regular expressions when matching the pattern \fB^b..p$\fR. .PP Most \s-1DICT\s0 servers support a number of matching strategies; you can get a list of the strategies provided by a server using the \fB\-strats\fR switch: .PP .Vb 1 \& % pdict \-h dict.org \-strats .Ve .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-h\fR \fIserver\fR or \fB\-host\fR \fIserver\fR" 4 .IX Item "-h server or -host server" The hostname for the \s-1DICT\s0 server. If one isn't specified then defaults to \fBdict.org\fR. .IP "\fB\-p\fR \fIport\fR or \fB\-port\fR \fIport\fR" 4 .IX Item "-p port or -port port" Specify the port for connections (default is 2628, from \s-1RFC 2229\s0). .IP "\fB\-d\fR \fIdbname\fR or \fB\-database\fR \fIdbname\fR" 4 .IX Item "-d dbname or -database dbname" The name of a specific database (dictionary) to query. .IP "\fB\-m\fR or \fB\-match\fR" 4 .IX Item "-m or -match" Look for words which match the pattern (using the specified strategy). .IP "\fB\-i\fR \fIdbname\fR or \fB\-info\fR \fIdbname\fR" 4 .IX Item "-i dbname or -info dbname" Request information on the specified database. Typically results in a couple of pages of text. .IP "\fB\-c\fR \fIstring\fR or \fB\-client\fR \fIstring\fR" 4 .IX Item "-c string or -client string" Specify the \s-1CLIENT\s0 identification string sent to the \s-1DICT\s0 server. .IP "\fB\-D\fR or \fB\-dbs\fR" 4 .IX Item "-D or -dbs" List the available databases (dictionaries) on the \s-1DICT\s0 server. .IP "\fB\-s\fR \fIstrategy\fR or \fB\-strategy\fR \fIstrategy\fR" 4 .IX Item "-s strategy or -strategy strategy" Specify a matching strategy. Used in combination with \fB\-match\fR. .IP "\fB\-S\fR or \fB\-strats\fR" 4 .IX Item "-S or -strats" List the matching strategies (used in \-strategy) supported by the \s-1DICT\s0 server. .IP "\fB\-I\fR or \fB\-serverinfo\fR" 4 .IX Item "-I or -serverinfo" Request information on the selected \s-1DICT\s0 server. .IP "\fB\-help\fR" 4 .IX Item "-help" Display a short help message including command-line options. .IP "\fB\-doc\fR" 4 .IX Item "-doc" Display the full documentation for \fBpdict\fR. .IP "\fB\-version\fR" 4 .IX Item "-version" Display the version of \fBpdict\fR .IP "\fB\-verbose\fR" 4 .IX Item "-verbose" Display verbose information as \fBpdict\fR runs. .IP "\fB\-debug\fR" 4 .IX Item "-debug" Display debugging information as \fBpdict\fR runs. Useful mainly for developers. .SH "KNOWN BUGS AND LIMITATIONS" .IX Header "KNOWN BUGS AND LIMITATIONS" .IP "\(bu" 4 \&\fBpdict\fR doesn't know how to handle firewalls. .IP "\(bu" 4 The authentication aspects of \s-1RFC 2229\s0 aren't currently supported. .IP "\(bu" 4 Display of list results (eg from \fB\-strats\fR and \fB\-dbs\fR) could be better. .IP "\(bu" 4 \&\fBpdict\fR isn't very smart at handling combinations of options. .IP "\(bu" 4 Currently no support for a configuration file \- will add one soon. .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "www.dict.org" 4 .IX Item "www.dict.org" The \s-1DICT\s0 home page, with all sorts of useful information. There are a number of other \s-1DICT\s0 clients available. .IP "dict" 4 .IX Item "dict" The C dict client written by Rik Faith; the options are pretty much lifted from Rik's client. .IP "\s-1RFC 2229\s0" 4 .IX Item "RFC 2229" The document which defines the \s-1DICT\s0 network protocol. .Sp http://www.cis.ohio\-state.edu/htbin/rfc/rfc2229.html .IP "Net::Dict" 4 .IX Item "Net::Dict" The perl module which implements the client \s-1API\s0 for \s-1RFC 2229.\s0 .SH "VERSION" .IX Header "VERSION" \&\f(CW$Revision:\fR 1.2 $ .SH "AUTHOR" .IX Header "AUTHOR" Neil Bowers .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2002 Neil Bowers. All rights reserved. .PP This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.