Hdict
queries a dictionary server using the protocol specified in rfc2229. A dict server usually has multiple lexicons and can search for a word in the lexicon and return the definition for that word. A dict server has a list of lexicons to search in by default and has a default searching strategy.
If a strategy has been specified with
-m,
all matching (lexicon, word)-pairs are returned.
Otherwise, definitions are returned. If a lexicon has been specified with
-d ,
definitions for all matching words in that lexicon are returned.
By default, only exact matches are returned and only the definitions in the first queried database that has definition.
-D
List lexicons available at the server.
-I
Print information and statistics about server.
-M
List matching strategies the server is able to execute.
-v
Be verbose, prints protocol messages to standard error.
-q
If matching is done, with the
-m
flag, print only the matching lexicon and word for each hit. By default, a command is printed that retrieves the definition when run.
-a address
Address of server to connect to. Default is
tcp!dict.org!2628,
which contains many free dictionaries.
-d lexicon
Search only in
lexicon.
Note that the dict protocol specifies special lexicon names: ``!'' searches in all default lexicons (as configured at the server) until the first hit has been found. ``*'' searches in all default lexicons and continues searching when hits have been found. ``!'' is used when no database is specified.
-i lexicon
Print information about
lexicon.
-m strategy
Use
strategy
for searching. Common strategies include
exact,
prefix,
substring,
suffix,
regexp,
soundexand
lev.
By default, for each hit a command is printed that retrieves the definition when run. Use
-q
for only printing the lexicon and word.
SOURCE
/appl/cmd/hdict.b
SEE ALSO
lexicon(2)
``A Dictionary Server Protocol'', rfc2229.
CAVEATS
Many `features' from the specification are unsupported. These include
authentication, MIME responses, dict URL's, command pipelining and
extensions.