Blob


1 .TH DICT 1
2 .SH NAME
3 dict, adict \- dictionary browser
4 .SH SYNOPSIS
5 .B dict
6 [
7 .B -k
8 ]
9 [
10 .B -d
11 .I dictname
12 ]
13 [
14 .B -c
15 .I command
16 ]
17 [
18 .I pattern
19 ]
20 .B adict
21 [
22 .B -d
23 .I dictname
24 ]
25 [
26 .I pattern
27 ]
28 .SH DESCRIPTION
29 .I Dict
30 is a dictionary browser.
31 If a
32 .I pattern
33 is given on the command line,
34 .I dict
35 prints all matching entries;
36 otherwise it repeatedly accepts and executes commands.
37 The options are
38 .TF -d\ \fIdictname\fP
39 .TP
40 .BI -d " dictname"
41 Use the given dictionary.
42 A list of available dictionaries is printed by option
43 .BR -d? .
44 The default is the first dictionary on the list that is
45 installed on the system.
46 .TP
47 .BI -c " command"
48 Execute one command and quit.
49 The command syntax is described below.
50 .TP
51 .B -k
52 Print a pronunciation key.
53 .PD
54 .PP
55 Patterns are regular expressions (see
56 .IR regexp (7)),
57 with an implicit leading
58 .L ^
59 and trailing
60 .LR $ .
61 Patterns are matched against an index of headwords and variants,
62 to form a `match set'.
63 By default, both patterns and the index are folded:
64 upper case characters are mapped into their lower case equivalents,
65 and Latin accented characters are mapped into their non-accented
66 equivalents.
67 In interactive mode, there is always a `current match set'
68 and a `current entry' within the match set.
69 Commands can change either or both, as well as print the entries
70 or information about them.
71 .PP
72 Commands have an address followed by a command letter.
73 Addresses have the form:
74 .TF /\fIre\fP/.\fIn\fP
75 .TP
76 .BI / re /
77 Set the match set to all entries matching the regular expression
78 .IR re ,
79 sorted in dictionary order.
80 Set the current entry to the first of the match set.
81 .TP
82 .BI ! re !
83 Like
84 .BI / re /
85 but use exact matching, i.e., without case and accent folding.
86 .TP
87 .I n
88 An integer
89 .I n
90 means change the current entry to the
91 .IR n th
92 of the current match set.
93 .TP
94 .BI # n
95 The integer
96 .I n
97 is an absolute byte offset into the raw dictionary.
98 (See the
99 .B A
100 command, below.)
101 .TP
102 .IB addr +
103 After setting the match set and current entry according to
104 .IR addr ,
105 change the match set and current entry to be the next entry
106 in the dictionary (not necessarily in the match set) after
107 the current entry.
108 .TP
109 .IB addr -
110 Like
111 .IB addr +
112 but go to previous dictionary entry.
113 .PD
114 .PP
115 The command letters come in pairs: a lower case and the
116 corresponding upper case letter.
117 The lower case version prints something about the current
118 entry only, and advances the current entry to the next
119 in the match set (wrapping around to the beginning after
120 the last).
121 The upper case version prints something about all of the
122 match set and resets the current entry to the beginning of
123 the set.
124 .TF \fLa,A\fP
125 .TP
126 .BR p , P
127 Print the whole entry.
128 .TP
129 .BR h , H
130 Print only the headword(s) of the entry.
131 .TP
132 .BR a , A
133 Print the dictionary byte offset of the entry.
134 .TP
135 .BR r , R
136 Print the whole entry in raw format (without translating
137 special characters, etc.).
138 .PD
139 .PP
140 If no command letter is given for the first command,
141 .B H
142 is assumed.
143 After an
144 .BR H ,
145 the default command is
146 .BR p .
147 Otherwise, the default command is the previous command.
148 .PP
149 .I Adict
150 is a dictionary browser for
151 .IR acme (1).
152 When run with no arguments, it creates a new
153 .I acme
154 window named
155 .B /adict/
156 listing the installed dictionaries.
157 Clicking with button 3 on a dictionary name will create
158 a new empty window named
159 .BI /adict/ dict /.
160 Typing and then clicking on a pattern in this window will
161 create a new lookup window named
162 .BI /adict/ dict / pattern
163 containing the dictionary's definition of
164 .IR pattern .
165 Clicking with button 3 on any word in this new window will
166 create new lookup windows.
167 .PP
168 If
169 .I adict
170 is run with a
171 .I pattern ,
172 it starts with the
173 .BI /adict/ dict / pattern
174 window.
175 .PP
176 If
177 .I adict
178 is run with no pattern but with a
179 .B -d
180 option,
181 it starts with the
182 .BI /adict/ dict /
183 window.
184 .SH FILES
185 .TP
186 .B \*9/dict
187 dictionaries
188 .PD
189 .SH "SEE ALSO"
190 .IR regexp (7)
191 .SH SOURCE
192 .B \*9/src/cmd/dict
193 .br
194 .B \*9/bin/adict
195 .SH BUGS
196 A font with wide coverage of the Unicode Standard
197 should be used for best results.
198 (Try
199 .BR \*9/font/pelm/unicode.9.font .)
200 .PP
201 If the
202 .I pattern
203 doesn't begin with
204 a few literal characters, matching takes a long time.
205 .PP
206 The dictionaries are not distributed outside Bell Labs,
207 though see
208 .B \*9/dict/README
209 for information on using free dictionaries prepared
210 by Project Gutenberg.