


                             SPELL_CHECK


This directory contains the source code and the executable images for an
interactive spelling checker utility for VAXTPU based editors as discussed in
the Spring 1988 Decus Symposium in Cincinnati Ohio session LT108.

This utility, when added to a VAXTPU based editor, gives the capability to
interactively check the spellings of the words in the editing buffer. It does so
by identifying a word and checking for its presence in two dictionaries: A
system dictionary, and a user's personal dictionary.

Requirements: A VAXTPU based editor with a PROMPT AREA, and a MESSAGE_BUFFER
              mapped to MESSAGE_WINDOW.

When invoked, the procedure starts at the beginning of the editing buffer,
scanning each word and checking to see if it is in the dictionaries or not.
If a word is not found, it is highlighted in reverse video.

The message window shows:
   Word "word" not found in the dictionary!

The prompt area shows:
   Press C)orrect; Add to U)ser, S)ystem dictionary; I)gnore; Q)uit.

If the user presses <C>, a replacement spelling for the word is prompted.
If the user presses <U>, the word is added to the User's personal dictionary.
If the user presses <S> then, if the user has not been previously identified as
a system user, the user is prompted for a password. If the user correctly enters
the password, the user is identified as a system user. Once the user has been
identified as a system user, the word is added to the System dictionary. The
current password is BOZO. To change the password for your editor, change the
initialization of the global variable SCH$EDT_SPELL_PASWRD in the file
SPELL_CHECK.INC.

Although the current dictionary is in English, any language that can be written
in DEC multinational character set can be used.

This directory contains the following files:

000README.MEM   - This file
SPELL_CHECK.TPU - TPU program
SPELL_CHECK.INC - Global symbols
SPELL_CHECK.FOR - Fortran program
SPELL_CHECK.OBJ - Object module
SPELL_CHECK.OPT - Linker Options file
SPELL_CHECK.EXE - Executable image
SPELL_CHECK.DAT - 10,000 word dictionary

                ADDING THIS TO YOUR VAXTPU BASED EDITOR

1) If you have your own VAXTPU based editor (it may be layered on EDTSECINI or
   EVESECINI) then,

   - Add SPELL_CHECK.TPU to your VAXTPU editor program.
   - Add SPELL_CHECK.INC to the INIT_VARIABLE procedure.
   - If desired, bind a key to the procedure SCH$EDT_SPELL_CHECK.
   - Compile your editor program.
   - Load SPELL_CHECK.EXE, and SPELL_CHECK.DAT in suitable directories.
   - Define following logicals:
     TPUSECINI to point to the image (.GBL or .TPU$SECTION) of your editor.
     TPU$SECINI to point to SPELL_CHECK.EXE.
     DICTIONARY$SYSTEM to point to SPELL_CHECK.DAT
     DICTIONARY$USER to a user's personal dictionary file.

     The first three logicals may be system logicals. Initially there will be no
     user's dictionary file. It will be created the first time this procedure is
     used.

2) If you do not have your own VAXTPU based editor and you use EDT Emulator or
   EVE then,

   - Append SPELL_CHECK.INC at the bottom of SPELL_CHECK.TPU
   - Set up a symbol similar to following in your LOGIN.COM:

     ED*IT :== EDIT/TPU/SECTION=<section>/COMMAND=<directory>SPELL_CHECK.TPU
     where, <section>   is EDTSECINI or EVESECINI
            <directory> is the directory containing SPELL_CHECK.TPU


                  USING SPELL CHECK INTERACTIVELY

Type SPELL_CHECK at TPU Command prompt, or press the key if the procedure is
bound to a key.
