This directory contains the files for a comprehensive spelling checker which can correct files containing text and embedded commands for a number of different word processors. All necessary files are provided, including dictionaries. This file contains a full description of the program and installation instructions. Files: ***** AAAREADME.TXT - this file BUILD.COM - installation procedure COMMONWRD.DAT - sequential file of most common words LEXIC08.DAT - main dictionary for words of <8 letters - indexed file LEXIC16.DAT - main dictionary for words of <16 letters - indexed file LEXIC32.DAT - main dictionary for words of <32 letters - indexed file NEWGOOD.TXT - new word file - indexed SPELL.EXE - SPELL program compiled under VMS v3.7 SPELL.HLP - HELP library module for SPELL SPELL.OBJ - object file of SPELL SPELL.PAS - VMS Pascal source text of SPELL Total of 12 files, 4263/4343 blocks. Functionality: ************* SPELL reads standard VMS text files - such as those created by EDT, and will recognize the syntax for embedded commands in RUNOFF, TeX and SCRIBE word processor input files, thus preventing many spurious "errors" from being registered. The program makes extensive use of VT100 screen formatting abilities, and as supplied, can only be used on VT100-compatible terminals. The entire program is written in Pascal, and should be readily modifiable for other terminals, or if additional functionality is required. The checker includes guessing algorithms which may optionally be invoked if a wrongly spelled word is encountered, a facility for creating personal dictionaries, and provision for the automatic submission of words not found in the dictionaries to a maintenance person so that the main dictionaries may be periodically updated. The checker creates a corrected file as output, and optionally also produces a log file showing all changes made. Installation: ************ There is an installation procedure in this submission which should make installation relatively painless. Unlike SPELL, it is not extensively error-trapped, so be careful when using it - hopefully, you will only need to use it once! To use this procedure, copy all the files in this directory to an empty directory on your system (not necessarily on your system disk), set your default to that directory, and invoke the procedure with an @BUILD command. Re-installation: *************** If you ever need to re-install SPELL (for instance because of an operating system upgrade), do NOT use the BUILD procedure provided without looking through it carefully, and commenting out any sections which deal with updating the dictionary files. Unless you do this, you will create new copies of the dictionaries, and will lose all the site-specific words that you have added since you first installed the program! This caveat also applies to sites running the Temple PROOFREAD program (see "Origins" below). Internals: ********* Spell operates by constructing an ordered tree of all new words as they are encountered in a document. Any word in the document is first checked against this tree, and if it is already in the tree, it is copied intact. If the word under test is not in the tree, and it is not one of a small number of very common words which are held in an array in memory, one of the three indexed files which constitute the main dictionary is searched, depending on the length of the word. If the word is still not found, an optional personal dictionary in the user's default directory is searched, and failing this, the list of words which users have marked as "right" but which have not yet been checked by the dictionary-person. If the word appears in this last list, the user is warned that it may not be correct, and given the opportunity to reject it. If a word is not found in any of these searches, the user is presented with two lines of context, with the word highlighted, and given a number of choices: C - you want to check alternative spellings in the dictionary. I will prompt you for words to check until you find one that is correct or you decide to give up checking. G - you want me to offer you some suggestions about possible spellings. I - you want to ignore the word - for instance an uncommon name. P - you want me to add the word to your Personal Dictionary. Q - you want to quit SPELL without checking any more of the file. R - the word is right and should be added to the main dictionary. W - you agree that the spelling of the word is wrong. I will ask you for the correct spelling or give you the option of asking me to guess. If the result of a "wrong", "guess" or "check" operation is to change the word being questioned by spell, the program will attempt to automatically match upper and lower case to the case of the word being replaced. If this turns out to be impossible, the user is prompted to supply the case. Wrong words are linked into a double tree together with replacements. If they occur again in the file, the user is prompted to decide whether they wish to make the same change again. Right words are added to an indexed file in the system dictionary directory, which is automatically accessed when the dictionary person invokes the SPELL/UPDATE command. SPELL writes a workfile called SPELLWRK.TMP, and if the session terminates successfully, and any changes have been made to the file being checked, then the workfile is renamed to the next higher version of the file being checked. The "front-end" of SPELL is a small DFA lexical scanner. This can easily be modified to include support for other word processors. All pre-processing of text is handled by this scanner, including recognition of words, constructs such as apostrophes and quotations, and recognition of embedded word-processor commands. Any word or character which is not recognized as a possible "legitimate" word is simply copied to the output file, and the remaining candidates for testing are made into a simple linked-list which contains some attributes of the words as well as their text, and allows simple manipulation of the text if errors are encountered. As supplied, SPELL operates with Control-Y disabled. This is not strictly necessary, given that an intermediate file is used for output, but in practice, we have found this to be a good idea in avoiding problems with accidental exits from the program. If you don't like this idea, taking out the call to the disabling routine is trivial. Almost all terminal I/O is handled using direct calls to QIO rather than Pascal I/O (sigh) since the latter is generally unsuitable for the types of screen and keyboard operations involved. Origins: ******* The SPELL program is based on a program called PROOFREAD which was written by Matthew Temple of Smith College, Northampton MA. His ideas and permission to use them are gratefully acknowledged. Submitted by: ********* ** Mark Resmer, Vassar College, Poughkeepsie NY 12601 (914) 452-7000 Ext 2437 resmer@vassar on CCnet and BITnet