1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428
|
.\"
.\" $Id: ispell.1X,v 1.80 1995/01/08 23:23:31 geoff Exp $
.\"
.\" Copyright 1992, 1993, Geoff Kuenning, Granada Hills, CA
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All modifications to the source code must be clearly marked as
.\" such. Binary redistributions based on modified source code
.\" must be clearly marked as modified versions in the documentation
.\" and/or other materials provided with the distribution.
.\" 4. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgment:
.\" This product includes software developed by Geoff Kuenning and
.\" other unpaid contributors.
.\" 5. The name of Geoff Kuenning may not be used to endorse or promote
.\" products derived from this software without specific prior
.\" written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Log: ispell.1X,v $
.\" Revision 1.80 1995/01/08 23:23:31 geoff
.\" Document the new personal-dictionary behavior (dictionary named after
.\" the hash file is preferred).
.\"
.\" Revision 1.79 1994/10/25 05:46:02 geoff
.\" Document the new DICTIONARY variable, and improve the documentation of
.\" the -d flag.
.\"
.\" Revision 1.78 1994/09/16 05:06:58 geoff
.\" Make it clear that the + command doesn't change the string-character
.\" type.
.\"
.\" Revision 1.77 1994/04/27 01:50:35 geoff
.\" Remove the bug about the tex parser getting confused by \endxxx.
.\"
.\" Revision 1.76 1994/03/21 01:54:08 geoff
.\" Document the '&' command in -a mode.
.\"
.\" Revision 1.75 1994/03/15 06:24:26 geoff
.\" Document the changes to the +/-/~ commands and the -T switch.
.\"
.\" Revision 1.74 1994/01/25 07:11:39 geoff
.\" Get rid of all old RCS log lines in preparation for the 3.1 release.
.\"
.\"
.TH ISPELL 1 local
.SH NAME
ispell, buildhash, munchlist, findaffix, tryaffix, icombine, ijoin \- Interactive
spelling checking
.SH SYNOPSIS
.B ispell
.RI [ common-flags ]
.RB [ \-M | \-N ]
.RB [ \-L \fIcontext\fP ]
.RB [ \-V ]
files
.br
.B ispell
.RI [ common-flags ]
.B \-l
.br
.B ispell
.RI [ common-flags ]
.RB [ \-f
file]
.RB [ \-s ]
.RB { \-a | \-A }
.br
.B ispell
.RB [ \-d
.IR file ]
.RB [ \-w
.IR chars ]
.B \-c
.br
.B ispell
.RB [ \-d
.IR file ]
.RB [ \-w
.IR chars ]
.BR \-e [ e ]
.br
.B ispell
.RB [ \-d
.IR file ]
.B \-D
.br
.B ispell
.BR \-v [ v ]
.IP \fIcommon-flags\fP:
.RB [ \-t ]
.RB [ \-n ]
.RB [ \-b ]
.RB [ \-x ]
.RB [ \-B ]
.RB [ \-C ]
.RB [ \-P ]
.RB [ \-m ]
.RB [ \-S ]
.RB [ \-d
.IR file ]
.RB [ \-p
.IR file ]
.RB [ \-w
.IR chars ]
.RB [ \-W
.IR n ]
.RB [ \-T
.IR type ]
.PP
.B buildhash
.RB [ \-s ]
.I
dict-file affix-file hash-file
.br
.B buildhash
.B \-s
.I
count affix-file
.if n .TP 10
.if t .PP
.B munchlist
.RB [ \-l
.IR aff-file ]
.RB [ \-c
.IR conv-file ]
.RB [ \-T
.IR suffix ]
.if n .br
.RB [ \-s
.IR hash-file ]
.RB [ \-D ]
.RB [ \-v ]
.RB [ \-w
.IR chars ]
.RI [ files ]
.if n .TP 10
.if t .PP
.B findaffix
.RB [ \-p | \-s ]
.RB [ \-f ]
.RB [ \-c ]
.RB [ \-m
.IR min ]
.RB [ \-M
.IR max ]
.RB [ \-e
.IR elim ]
.if n .br
.RB [ \-t
.IR tabchar ]
.RB [ \-l
.IR low ]
.RI [ files ]
.PP
.B tryaffix
.RB [ \-p | \-s]
.RB [ \-c ]
.I expanded-file
.IR affix [ +addition ]
...
.PP
.B icombine
.RB [ \-T
.IR type ]
.RI [ aff-file ]
.PP
.B ijoin
.RB [ \-s | \-u ]
.I join-options
.I file1
.I file2
.SH DESCRIPTION
.PP
.I Ispell
is fashioned after the
.I spell
program from ITS (called
.I ispell
on Twenex systems.) The most common usage is "ispell filename". In this
case,
.I ispell
will display each word which does not appear in the dictionary at the
top of the screen and allow you to change it. If there are "near
misses" in the dictionary (words which differ by only a single letter, a
missing or extra letter, a pair of transposed letters, or a missing
space or hyphen), then they are
also displayed on following lines.
As well as "near misses", ispell may display other guesses
at ways to make the word from a known root, with each guess preceded
by question marks.
Finally, the line containing the
word and the previous line
are printed at the bottom of the screen. If your terminal can
display in reverse video, the word itself is highlighted. You have the
option of replacing the word completely, or choosing one of the
suggested words. Commands are single characters as follows
(case is ignored):
.PP
.RS
.IP R
Replace the misspelled word completely.
.IP Space
Accept the word this time only.
.IP A
Accept the word for the rest of this
.I ispell
session.
.IP I
Accept the word, capitalized as it is in the
file, and update private dictionary.
.IP U
Accept the word, and add an uncapitalized (actually, all lower-case)
version to the private dictionary.
.IP 0-\fIn\fR
Replace with one of the suggested words.
.IP L
Look up words in system dictionary (controlled by the WORDS
compilation option).
.IP X
Write the rest of this file, ignoring misspellings, and start next file.
.IP Q
Exit immediately and leave the file unchanged.
.IP !
Shell escape.
.IP ^L
Redraw screen.
.IP ^Z
Suspend ispell.
.IP ?
Give help screen.
.RE
.PP
If the
.B \-M
switch is specified,
a one-line mini-menu at the bottom of the screen will
summarize these options.
Conversely, the
.B \-N
switch may be used to suppress the mini-menu.
(The minimenu is displayed by default if
.I ispell
was compiled with the MINIMENU option,
but these two switches will always override the default).
.PP
If the
.B \-L
flag is given, the specified number is used as the number of
lines of context to be shown at the bottom of the screen
(The default is to calculate the amount of context as a certain percentage
of the screen size).
The amount of context is subject to a system-imposed limit.
.PP
If the
.B \-V
flag is given, characters that are not in the 7-bit ANSI printable
character set will always be displayed in the style of "cat -v", even if
.I ispell
thinks that these characters are legal ISO Latin-1 on your system.
This is useful when working with older terminals.
Without this switch,
.I ispell
will display 8-bit characters "as is" if they have been defined as
string characters for the chosen file type.
.PP
"Normal" mode, as well as the
.BR \-l ,
.BR \-a ,
and
.B \-A
options (see below) also
accepts the following "common" flags on the command line:
.RS
.IP \fB\-t\fR
The input file is in TeX or LaTeX format.
.IP \fB\-n\fR
The input file is in nroff/troff format.
.IP \fB\-b\fR
Create a backup file by appending ".bak"
to the name of the input file.
.IP \fB\-x\fR
Don't create a backup file.
.IP \fB\-B\fR
Report run-together words with missing blanks as spelling errors.
.IP \fB\-C\fR
Consider run-together words as legal compounds.
.IP \fB\-P\fR
Don't generate extra root/affix combinations.
.IP \fB\-m\fR
Make possible root/affix combinations that
aren't in the dictionary.
.IP \fB\-S\fR
Sort the list of guesses by probable correctness.
.IP "\fB\-d\fR file"
Specify an alternate dictionary file.
For example, use
.B "\-d deutsch"
to choose a German dictionary in a German installation.
.IP "\fB\-p\fR file"
Specify an alternate personal dictionary.
.IP "\fB\-w\fR chars"
Specify additional characters that can be part of a word.
.IP "\fB\-W\fR n"
Specify length of words that are always legal.
.IP "\fB-T\fR type"
Assume a given formatter type for all files.
.RE
.PP
The
.B \-n
and
.B \-t
options select whether
.I ispell
runs in nroff/troff
.RB ( \-n )
or TeX/LaTeX
.RB ( \-t )
input mode.
(The default is controlled by the DEFTEXFLAG installation option.)
TeX/LaTeX mode is also automatically selected if an input file has
the extension ".tex", unless overridden by the
.B \-n
switch.
In TeX/LaTeX mode, whenever a backslash ("\e") is found,
.I ispell
will skip to the next whitespace or TeX/LaTeX delimiter. Certain commands
contain arguments which should not be checked, such as labels and reference
keys as are found in the \ecite command, since they contain arbitrary,
non-word arguments. Spell checking is also suppressed when in math mode.
Thus, for example, given
.PP
.RS
\echapter {This is a Ckapter}
\ecite{SCH86}
.RE
.PP
.I ispell
will find "Ckapter" but not "SCH".
The
.B \-t
option does not recognize the TeX comment character "%", so comments are
also spell-checked.
It also assumes
correct LaTeX syntax. Arguments to infrequently used commands and some
optional arguments are sometimes checked unnecessarily.
The bibliography will not be checked if
.I ispell
was compiled with
.B IGNOREBIB
defined. Otherwise, the bibliography will be checked but the reference
key will not.
.PP
References for the
.IR tib (1)
bibliography system, that is, text between a ``[.'' or ``<.'' and
``.]'' or ``.>'' will always be ignored in TeX/LaTeX mode.
.PP
The
.B \-b
and
.B \-x
options control whether
.I ispell
leaves a backup (.bak) file for each input file.
The .bak file contains
the pre-corrected text. If there are file opening / writing errors,
the .bak file may be left for recovery purposes even with the
.B \-x
option.
The default for this option is controlled by the DEFNOBACKUPFLAG
installation option.
.PP
The
.B \-B
and
.B \-C
options control how
.I ispell
handles run-together words, such as "notthe" for "not the".
If
.B \-B
is specified, such words will be considered as errors, and
.I ispell
will list variations with an inserted blank or hyphen as possible
replacements.
If
.B \-C
is specified, run-together words will be considered to be
legal compounds, so long as both components are in the dictionary, and
each component is at least as long as a language-dependent minimum (3 characters, by default).
This is useful for languages such as German and Norwegian, where
many compound words are formed by concatenation.
(Note that compounds formed from three or more root words will still
be considered errors).
The default for this option is language-dependent;
in a multi-lingual installation the default may vary depending on
which dictionary you choose.
.PP
The
.B \-P
and
.B \-m
options control when
.I ispell
automatically generates suggested root/affix combinations for possible
addition to your personal dictionary.
(These are the entries in the "guess" list which are preceded by question
marks.)
If
.B \-P
is specified, such guesses are displayed only if
.I ispell
cannot generate any possibilities that match the current dictionary.
If
.B \-m
is specified, such guesses are always displayed.
This can be useful if the dictionary has a limited word list, or a word
list with few suffixes.
However, you should be careful when using this option, as it can
generate guesses that produce illegal words.
The default for this option is controlled by the dictionary file used.
.PP
The
.B \-S
option suppresses
.IR ispell "'s"
normal behavior of sorting the list of possible replacement words.
Some people may prefer this, since it somewhat enhances the probability
that the correct word will be low-numbered.
.PP
The
.B \-d
option is used to specify an alternate hashed dictionary file,
other than the default.
If the filename does not contain a "/",
the library directory for the default dictionary file is prefixed;
thus, to use a dictionary in the local directory "-d ./xxx.hash" must
be used.
This is useful to allow dictionaries for alternate languages.
Unlike previous versions of
.IR ispell ,
a dictionary of
.IR /dev/null
is illegal, because the dictionary contains the affix table.
If you need an effectively empty dictionary, create a one-entry list
with an unlikely string (e.g., "qqqqq").
.PP
The
.B \-p
option is used to specify an alternate personal dictionary file.
If the file name does not begin with "/", $HOME is prefixed. Also, the
shell variable WORDLIST may be set, which renames the personal dictionary
in the same manner. The command line overrides any WORDLIST setting.
If neither the
.B \-p
switch nor the WORDLIST environment variable is given,
.I ispell
will search for a personal dictionary in both the current directory
and $HOME, creating one in $HOME if none is found.
The preferred name is constructed by appending ".ispell_" to the base name
of the hash file.
For example, if you use the English dictionary, your personal
dictionary would be named ".ispell_english".
However, if the file ".ispell_words" exists, it will be used as the
personal dictionary regardless of the language hash file chosen.
This feature is included primarily for backwards compatibility.
.PP
If the
.B \-p
option is
.I not
specified,
.I ispell
will look for personal dictionaries in both the current directory and
the home directory.
If dictionaries exist in both places, they will be merged.
If any words are added to the personal dictionary, they will be
written to the current directory if a dictionary already existed in
that place;
otherwise they will be written to the dictionary in the home directory.
.PP
The
.B \-w
option may be used to specify characters other than alphabetics
which may also appear in words. For instance,
.B \-w
"&" will allow "AT&T"
to be picked up. Underscores are useful in many technical documents.
There is an admittedly crude provision in this option for 8-bit international
characters.
Non-printing characters may be specified in the usual way by inserting a
backslash followed by the octal character code;
e.g., "\e014" for a form feed.
Alternatively, if "n" appears in the character string, the (up to)
three characters
following are a DECIMAL code 0 - 255, for the character.
For example, to include bells and form feeds in your words (an admittedly
silly thing to do, but aren't most pedagogical examples):
.PP
.RS
n007n012
.RE
.PP
Numeric digits other than the three following "n" are simply numeric
characters. Use of "n" does not conflict with anything because actual
alphabetics have no meaning - alphabetics are already accepted.
.I Ispell
will typically be used with input from a file, meaning that preserving
parity for possible 8 bit characters from the input text is OK. If you
specify the -l option, and actually type text from the terminal, this may
create problems if your stty settings preserve parity.
.PP
The
.B \-W
option may be used to change the length of words that
.I ispell
always accepts as legal.
Normally,
.I ispell
will accept all 1-character words as legal, which is equivalent to
specifying "\fB\-W 1\fR."
(The default for this switch is actually controlled by the MINWORD
installation option, so it may vary at your installation.)
If you want all words to be checked against the dictionary, regardless
of length, you might want to specify "\fB\-W 0\fR."
On the other hand, if your document specifies a lot of three-letter acronyms,
you would specify "\fB\-W 3\fR" to accept all words of three letters or
less.
Regardless of the setting of this option,
.I ispell
will only generate words that are in the dictionary as suggested replacements
for words;
this prevents the list from becoming too long.
Obviously, this option can be very dangerous, since short misspellings may
be missed.
If you use this option a lot, you should probably make a last pass without it
before you publish your document, to protect yourself against errors.
.PP
The
.B \-T
option is used to specify a default formatter type for use in
generating string characters.
This switch overrides the default type determined from
the file name.
The
.I type
argument may be either one of the unique names defined in the language
affix file (e.g.,
.BR nroff )
or a file suffix including the dot (e.g.,
.BR .tex ).
If no
.B \-T
option appears and no type can be determined from the file name, the default
string character type declared in the
language affix file will be used.
.PP
The
.B \-l
or "list" option to
.I ispell
is used to produce a list of misspelled words from the standard input.
.PP
The
.B \-a
option
is intended to be used from other programs through a pipe. In this
mode,
.I ispell
prints a one-line version identification message, and then begins
reading lines of input. For each input line,
a single line is written to the standard output for each word
checked for spelling on the line. If the word
was found in the main dictionary, or your personal dictionary, then the
line contains only a '*'. If the word was found through affix removal,
then the line contains a '+', a space, and the root word.
If the word was found through compound formation (concatenation of two
words, controlled by the
.B \-C
option), then the line contains only a '\-'.
.PP
If the word
is not in the dictionary, but there are near misses, then the line
contains an '&', a space, the misspelled word, a space, the number of
near misses,
the number of
characters between the beginning of the line and the
beginning of the misspelled word, a colon, another space,
and a list of the near
misses separated by
commas and spaces.
Following the near misses (and identified only by the count of near
misses), if the word could be formed by adding
(illegal) affixes to a known root,
is a list of suggested derivations, again separated by commas and spaces.
If there are no near misses at all, the line format is the same, except
that the '&' is replaced by '?' (and the near-miss count is always zero).
The suggested derivations following the near misses are in the form:
.PP
.RS
[prefix+] root [-prefix] [-suffix] [+suffix]
.RE
.PP
(e.g., "re+fry-y+ies" to get "refries")
where each optional
.I pfx
and
.I sfx
is a string.
Also, each near miss or guess is capitalized the same as the input
word unless such capitalization is illegal;
in the latter case each near miss is capitalized correctly
according to the dictionary.
.PP
Finally, if the word does not appear in the dictionary, and
there are no near misses, then the line contains a '#', a space,
the misspelled word, a space,
and the character offset from the beginning of the line.
Each sentence of text input is terminated
with an additional blank line, indicating that
.I ispell
has completed processing the input line.
.PP
These output lines can be summarized as follows:
.PP
.RS
.IP OK:
*
.IP Root:
+ <root>
.IP Compound:
\-
.IP Miss:
& <original> <count> <offset>: <miss>, <miss>, ..., <guess>, ...
.IP Guess:
? <original> 0 <offset>: <guess>, <guess>, ...
.IP None:
# <original> <offset>
.RE
.PP
For example, a dummy dictionary containing the words "fray", "Frey",
"fry", and "refried" might produce the following response to the
command "echo 'frqy refries | ispell -a -m -d ./test.hash":
.RS
.nf
(#) International Ispell Version 3.0.05 (beta), 08/10/91
& frqy 3 0: fray, Frey, fry
& refries 1 5: refried, re+fry-y+ies
.fi
.RE
.PP
This mode
is also suitable for interactive use when you want to figure out the
spelling of a single word.
.PP
The
.B \-A
option works just like
.BR \-a ,
except that if a line begins with the string "&Include_File&", the rest
of the line is taken as the name of a file to read for further words.
Input returns to the original file when the include file is exhausted.
Inclusion may be nested up to five deep.
The key string may be changed with the environment variable
.B INCLUDE_STRING
(the ampersands, if any, must be included).
.PP
When in the
.B \-a
mode,
.I ispell
will also accept lines of single words prefixed with any
of '*', '&', '@', '+', '-', '~', '#', '!', '%', or '^'.
A line starting with '*' tells
.I ispell
to insert the word into the user's dictionary (similar to the I command).
A line starting with '&' tells
.I ispell
to insert an all-lowercase version of the word into the user's
dictionary (similar to the U command).
A line starting with '@' causes
.I ispell
to accept this word in the future (similar to the A command).
A line starting with '+', followed immediately by
.B tex
or
.B nroff
will cause
.I ispell
to parse future input according the syntax of that formatter.
A line consisting solely of a '+' will place
.I ispell
in TeX/LaTeX mode (similar to the
.B \-t
option) and '-' returns
.I ispell
to nroff/troff mode (but these commands are obsolete).
However, string character type is
.I not
changed;
the '~' command must be used to do this.
A line starting with '~' causes
.I ispell
to set internal parameters (in particular, the default string
character type) based on the filename given in the rest of the line.
(A file suffix is sufficient, but the period must be included.
Instead of a file name or suffix, a unique name, as listed in the language
affix file, may be specified.)
However, the formatter parsing is
.I not
changed; the '+' command must be used to change the formatter.
A line prefixed with '#' will cause the
personal dictionary to be saved.
A line prefixed with '!' will turn on
.I terse
mode (see below), and a line prefixed with '%' will return
.I ispell
to normal (non-terse) mode.
Any input following the prefix
characters '+', '-', '#', '!', or '%' is ignored, as is any input
following the filename on a '~' line.
To allow spell-checking of lines beginning with these characters, a
line starting with '^' has that character removed before it is passed
to the spell-checking code.
It is recommended that programmatic interfaces prefix every data line
with an uparrow to protect themselves against future changes in
.IR ispell .
.PP
To summarize these:
.PP
.RS
.IP *
Add to personal dictionary
.IP @
Accept word, but leave out of dictionary
.IP #
Save current personal dictionary
.IP ~
Set parameters based on filename
.IP +
Enter TeX mode
.IP -
Exit TeX mode
.IP !
Enter terse mode
.IP %
Exit terse mode
.IP ^
Spell-check rest of line
.fi
.RE
.PP
In
.I terse
mode,
.I ispell
will not print lines beginning with '*', '+', or '\-', all of which
indicate correct words.
This significantly improves running speed when the driving program is
going to ignore correct words anyway.
.PP
The
.B \-s
option is only valid in conjunction with the
.B \-a
or
.B \-A
options, and only on BSD-derived systems.
If specified,
.I ispell
will stop itself with a
.B SIGTSTP
signal after each line of input.
It will not read more input until it receives a
.B SIGCONT
signal.
This may be useful for handshaking with certain text editors.
.PP
The
.B \-f
option is only valid in conjunction with the
.B \-a
or
.B \-A
options.
If
.B \-f
is specified,
.I ispell
will write its results to the given file, rather than to standard output.
.PP
The
.B \-v
option causes
.I ispell
to print its current version identification on the standard output
and exit.
If the switch is doubled,
.I ispell
will also print the options that it was compiled with.
.PP
The
.BR \-c ,
.BR \-e [ 1-4 ],
and
.B \-D
options of
.IR ispell ,
are primarily intended for use by the
.I munchlist
shell script.
The
.B \-c
switch causes a list of words to be read from the standard input.
For each word, a list of possible root words and affixes will be
written to the standard output.
Some of the root words will be illegal and must be filtered from the
output by other means;
the
.I munchlist
script does this.
As an example, the command:
.PP
.RS
echo BOTHER | ispell -c
.RE
.PP
produces:
.PP
.RS
.nf
BOTHER BOTHE/R BOTH/R
.fi
.RE
.PP
The
.B \-e
switch is the reverse of
.BR \-c ;
it expands affix flags to produce a list of words.
For example, the command:
.PP
.RS
echo BOTH/R | ispell -e
.RE
.PP
produces:
.PP
.RS
.nf
BOTH BOTHER
.fi
.RE
.PP
An optional expansion level can also be specified. A level of 1
.RB ( \-e1 )
is the same as
.B \-e
alone.
A level of 2 causes the original root/affix combination to be
prepended to the line:
.PP
.RS
.nf
BOTH/R BOTH BOTHER
.fi
.RE
.PP
A level of 3 causes multiple lines to be output, one for each
generated word, with the original root/affix combination followed by
the word it creates:
.PP
.RS
.nf
BOTH/R BOTH
BOTH/R BOTHER
.fi
.RE
.PP
A level of 4 causes a floating-point number to be appended to each of
the level-3 lines, giving the ratio between the length of the root and
the total length of all generated words including the root:
.PP
.RS
.nf
BOTH/R BOTH 2.500000
BOTH/R BOTHER 2.500000
.fi
.RE
.PP
Finally, the
.B \-D
flag causes the affix tables from the dictionary file
to be dumped to standard output.
.PP
Unless your system administrator has suppressed the feature to save space,
.I ispell
is aware of the correct capitalizations of words in the dictionary and
in your personal dictionary.
As well as recognizing words that must be capitalized (e.g., George) and
words that must be all-capitals (e.g., NASA), it can also handle words
with "unusual" capitalization (e.g., "ITCorp" or "TeX").
If a word is capitalized incorrectly, the list of possibilities will
include all acceptable capitalizations.
(More than one capitalization may be acceptable;
for example, my dictionary lists both "ITCorp" and "ITcorp".)
.PP
Normally, this feature will not cause you surprises, but there is one
circumstance you need to be aware of.
If you use "I" to
add a word to your dictionary that is at the beginning of a sentence
(e.g., the first word of this paragraph if "normally" were not in the
dictionary), it will be marked as "capitalization required".
A subsequent usage of this word without capitalization (e.g., the quoted word
in the previous sentence) will be considered a misspelling by
.IR ispell ,
and it will suggest the capitalized version.
You must then compare the actual spellings by eye, and then type "I"
to add the uncapitalized variant to your personal dictionary.
You can avoid this problem by using "U" to add the original word,
rather than "I".
.PP
The rules for capitalization are as follows:
.IP (1)
Any word may appear in all capitals, as in headings.
.IP (2)
Any word that is in the dictionary in all-lowercase form may appear
either in lowercase or capitalized (as at the beginning of a sentence).
.IP (3)
Any word that has "funny" capitalization (i.e., it contains both cases
and there is an uppercase character besides the first) must appear
exactly as in the dictionary, except as permitted by rule (1).
If the word is acceptable in all-lowercase, it must appear thus in a
dictionary entry.
.SS buildhash
.PP
The
.I buildhash
program builds hashed dictionary files for later use by
.I ispell.
The raw word list (with affix flags) is given in
.IR dict-file ,
and the the affix flags are defined by
.IR affix-file .
The hashed output is written to
.IR hash-file .
The formats of the two input files are described in
.IR ispell (4).
The
.B \-s
(silent) option suppresses the usual status messages that are written
to the standard error device.
.SS munchlist
.PP
The
.I munchlist
shell script is used to reduce the size of dictionary files,
primarily personal dictionary files.
It is also capable of combining dictionaries from various sources.
The given
.I files
are read (standard input if no arguments are given),
reduced to a minimal set of roots and affixes that will match the
same list of words, and written to standard output.
.PP
Input for munchlist contains of raw words (e.g from your personal
dictionary files) or root and affix combinations (probably generated
in earlier munchlist runs). Each word or root/affix combination must
be on a separate line.
.PP
The
.B \-D
(debug) option leaves temporary files around under standard names instead
of deleting them, so that the script can be debugged.
Warning:
this option can eat up an enormous amount of temporary file space.
.PP
The
.B \-v
(verbose) option causes progress messages to be reported to stderr so
you won't get nervous that
.I munchlist
has hung.
.PP
If the
.B \-s
(strip) option is specified, words that are in the specified
.I hash-file
are removed from the word list.
This can be useful with personal dictionaries.
.PP
The
.B \-l
option can be used to specify an alternate
.I affix-file
for munching dictionaries in languages other than English.
.PP
The
.B \-c
option can be used to convert dictionaries that were built with an
older affix file, without risk of accidentally introducing unintended
affix combinations into the dictionary.
.PP
The
.B \-T
option allows dictionaries to be converted to a canonical
string-character format.
The suffix specified is looked up in the affix file
.RB ( \-l
switch)
to determine the string-character format used for the input file;
the output always uses the canonical string-character format.
For example, a dictionary collected from TeX source files might be
converted to canonical format by specifying
.BR "\-T tex" .
.PP
The
.B \-w
option is passed on to
.IR ispell .
.SS findaffix
.PP
The
.I findaffix
shell script is an aid to writers of new language descriptions in choosing
affixes.
The given dictionary
.I files
(standard input if none are given) are examined for possible prefixes
.RB ( \-p
switch) or suffixes
.RB ( \-s
switch, the default).
Each commonly-occurring affix is presented along with
a count of the number of times it appears
and an estimate of the number of bytes that would be saved in a dictionary
hash file if it were added to the language table.
Only affixes that generate legal roots (found in the original input)
are listed.
.PP
If the "-c" option is not given, the output lines are in the
following format:
.IP
strip/add/count/bytes
.PP
where
.I strip
is the string that should be stripped from a root
word before adding the affix,
.I add
is the affix to be added,
.I count
is a count of the number of times that this
.IR strip / add
combination appears, and
.I bytes
is an estimate of the number of bytes that
might be saved in the raw dictionary file if this combination is
added to the affix file.
The field separator in the output will
be the tab character specified by the
.B -t
switch; the default is a slash ("/").
.PP
If the
.B \-c
("clean output") option is given, the appearance of
the output is made visually cleaner (but harder to post-process)
by changing it to:
.IP
-strip+add<tab>count<tab>bytes
.PP
where
.IR strip ,
.IR add ,
.IR count ,
and
.I bytes
are as before, and
.I "<tab>"
represents the ASCII tab character.
.PP
The method used to generate possible affixes will also generate
longer affixes which have common headers or trailers. For example,
the two words "moth" and "mother" will generate not only the obvious
substitution "+er" but also "-h+her" and "-th+ther" (and possibly
even longer ones, depending on the value of
.IR min ).
To prevent
cluttering the output with such affixes, any affix pair that shares
a common header (or, for prefixes, trailer) string longer than
.I elim
characters (default 1) will be suppressed.
You may want to set "elim" to a value greater than 1 if your language has string
characters;
usually the need for this parameter will become obvious
when you examine the output of your
.I findaffix
run.
.PP
Normally, the affixes are sorted according to the estimate of bytes saved.
The
.B \-f
switch may be used to cause the affixes to be sorted by frequency of
appearance.
.PP
To save output file space,
affixes which occur fewer than 10 times are eliminated;
this limit may be changed with the
.B \-l
switch.
The
.B \-M
switch specifies a maximum affix length (default 8).
Affixes longer than this will not be reported.
(This saves on temporary disk space and makes the script run faster.)
.PP
Affixes which generate stems shorter than 3 characters are suppressed.
(A stem is the word after the
.I strip
string has been removed, and before the
.I add
string has been added.)
This reduces both the running time and the size of the output file.
This limit may be changed with the
.B \-m
switch.
The minimum stem length should only be set to 1 if you have a
.I lot
of free time and disk space (in the range of many days and hundreds of
megabytes).
.PP
The
.I findaffix
script requires a non-blank field-separator character for internal
use.
Normally, this character is a slash ("/"), but if the slash
appears as a character in the input word list, a different character
can be specified with the
.B \-t
switch.
.PP
Ispell dictionaries should be expanded before being fed to
.IR findaffix ;
in addition, characters that are not in the English alphabet (if any) should
be translated to lowercase.
.SS tryaffix
.PP
The
.I tryaffix
shell script is used to estimate the effectiveness of a proposed
prefix
.RB ( \-p
switch) or suffix
.RB ( \-s
switch, the default) with a given
.IR expanded-file .
Only one affix can be tried with each execution of
.IR tryaffix ,
although multiple arguments can be used to describe varying forms of the
same affix flag (e.g., the
.B D
flag for English can add either
.I D
or
.I ED
depending on whether a trailing E is already present).
Each word in the expanded dictionary that ends (or begins) with the chosen
suffix (or prefix) has that suffix (prefix) removed;
the dictionary is then searched for root words that match the stripped word.
Normally, all matching roots are written to standard output, but if the
.B \-c
(count) flag is given, only a statistical summary of the results is written.
The statistics given are a count of words the affix potentially applies to
and an estimate of the number of dictionary bytes that a flag using the
affix would save.
The estimate will be high if the flag generates words
that are currently generated by other affix flags
(e.g., in English,
.I bathers
can be generated by either
.I bath/X
or
.IR bather/S ).
.P
The dictionary file,
.IR expanded-file ,
must already be expanded (using the
.B \-e
switch of
.IR ispell )
and sorted, and things will usually work best if uppercase
has been folded to lower with 'tr'.
.PP
The
.I affix
arguments are things to be stripped from the dictionary
file to produce trial roots:
for English,
.I con
(prefix) and
.I ing
(suffix) are examples.
The
.I addition
parts of the argument are letters that would have
been stripped off the root before adding the affix.
For example, in English the affix
.I ing
normally strips
.I e
for words ending in that letter (e.g.,
.I like
becomes
.IR liking )
so we might run:
.PP
.RS
.nf
tryaffix ing ing+e
.fi
.RE
.PP
to cover both cases.
.PP
All of the shell scripts contain documentation as commentary at the
beginning;
sometimes these comments contain useful information beyond the scope
of this manual page.
.PP
It is possible to install
.I ispell
in such a way as to only support ASCII range text if desired.
.SS icombine
The
.I icombine
program is a helper for
.IR munchlist .
It reads a list of words in dictionary format (roots plus flags) from
the standard input, and produces a reduced list on standard output
which combines common roots found on adjacent entries.
Identical roots which have differing flags will have their flags
combined, and roots which have differing capitalizations will be
combined in a way which only preserves important capitalization
information.
The optional
.I aff-file
specifies a language file which defines the character sets used and
the meanings of the various flags.
The
.B \-T
switch can be used to select among alternative string character types
by giving a dummy suffix that can be found in an
.B altstringtype
statement.
.SS ijoin
The
.I ijoin
program is a re-implementation of
.IR join (1)
which handles long lines and 8-bit characters correctly.
The
.B \-s
switch specifies that the
.IR sort (1)
program used to prepare the input to
.I ijoin
uses signed comparisons on 8-bit characters;
the
.B \-u
switch specifies that
.IR sort (1)
uses unsigned comparisons.
All other options and behaviors of
.IR join (1)
are duplicated as exactly as possible based on the manual page, except
that
.I ijoin
will not handle newline as a field separator.
See the
.IR join (1)
manual page for more information.
.SH ENVIRONMENT
.IP DICTIONARY
Default dictionary to use, if no
.B \-d
flag is given.
.IP WORDLIST
Personal dictionary file name
.IP INCLUDE_STRING
Code for file inclusion under the
.B \-A
option
.IP TMPDIR
Directory used for some of munchlist's temporary files
.SH FILES
.IP !!LIBDIR!!/!!DEFHASH!!
Hashed dictionary (may be found in some other local directory,
depending on the system).
.IP !!LIBDIR!!/!!DEFLANG!!
Affix-definition file for
.I munchlist
.IP "/usr/dict/web2 or /usr/share/dict/words"
For the Lookup function (depending on the WORDS compilation option).
.IP $HOME/.ispell_\fIhashfile\fP
User's private dictionary
.IP .ispell_\fIhashfile\fP
Directory-specific private dictionary
.SH SEE ALSO
.IR spell (1),
.IR egrep (1),
.IR look (1),
.IR join (1),
.IR sort (1),
.IR sq (1L),
.IR tib (1L),
.IR ispell (4L),
.IR english (4L)
.SH BUGS
It takes several to many seconds for
.I ispell
to read in the hash table, depending on size.
.sp
When all options are enabled,
.I ispell
may take several seconds to generate all the guesses at corrections for
a misspelled word;
on slower machines this time is long enough to be annoying.
.sp
The hash table is stored as a quarter-megabyte (or larger) array, so a PDP-11
or 286 version does not seem likely.
.sp
.I Ispell
should understand more
.I troff
syntax, and deal more intelligently with contractions.
.sp
Although small personal dictionaries are sorted before they are written out,
the order of capitalizations of the same word is somewhat random.
.sp
When the
.B \-x
flag is specified,
.I ispell
will unlink any existing .bak file.
.sp
There are too many flags, and many of them have non-mnemonic names.
.sp
.I Munchlist
does not deal very gracefully with dictionaries which contain
"non-word" characters.
Such characters ought to be deleted from the dictionary with a warning
message.
.sp
.I Findaffix
and
.I munchlist
require tremendous amounts of temporary file space for
large dictionaries.
They do respect the TMPDIR environment variable, so this space can be
redirected.
However, a lot of the temporary space needed is for sorting, so TMPDIR
is only a partial help on systems with an uncooperative
.IR sort (1).
("Cooperative" is defined as accepting the undocumented -T switch).
At its peak usage,
.I munchlist
takes 10 to 40 times the original
dictionary's size in Kb.
(The larger ratio is for dictionaries that already have heavy affix
use, such as the one distributed with
.IR ispell ).
.I Munchlist
is also very slow;
munching a normal-sized dictionary (15K roots, 45K expanded words) takes
around an hour on a small workstation.
(Most of this time is spent in
.IR sort (1),
and
.I munchlist
can run much faster on machines that have a more modern
.I sort
that makes better use of the memory available to it.)
.I Findaffix
is even worse;
the smallest English dictionary cannot be processed with this script in
a mere 50Kb of free space, and even after specifying switches to
reduce the temporary space required, the script will run for over 24 hours
on a small workstation.
.SH AUTHOR
Pace Willisson (pace@mit-vax), 1983, based on the PDP-10 assembly version.
That version was written by
R. E. Gorin in 1971,
and later revised by W. E. Matson (1974) and W. B. Ackerman (1978).
.P
Collected, revised, and enhanced for the Usenet by Walt Buehring, 1987.
.P
Table-driven multi-lingual version by Geoff Kuenning, 1987-88.
.P
Large dictionaries provided by Bob Devine (vianet!devine).
.P
A complete list of contributors is too large to list here, but is
distributed with the ispell sources in the file "Contributors".
.SH VERSION
The version of ispell described by this manual page is
International Ispell Version 3.1.00, 10/08/93.
|