














                                    DDSPELL
                                       a
                                   Tiny/Fast
                                Spelling Checker



                                  Version 1.0










                       Copyright 2001-2005 Dave Dunfield
                              All rights reserved



                     DDSPELL: a tiny/fast spelling checker

                               TABLE OF CONTENTS


                                                                         Page

     1. INTRODUCTION                                                        1

        1.1 System Requirements                                             1
        1.2 Limitations                                                     1

     2. The DDSPELL Program                                                 2

        2.1 Command Line Options                                            2
        2.2 Dictionary file format                                          3
        2.3 Screen Layout                                                   4

     3. Using DDSPELL                                                       5

        3.1 Commands                                                        5
        3.2 Editor                                                          7
    DDSPELL: a tiny/fast spelling checker                            Page: 1


    1. INTRODUCTION

       DDSPELL is a small/fast spell checker  which  will  read  ASCII  text
       files and verify the spelling of each  word  found  within  the  file
       against a large "dictionary"  of known words.  When unknown words are
       found, DDSPELL allows the word to be replaced with a selection from a
       menu  of  "close"  words  that  were   found   in   the   dictionary,
       editing/replacement of the entire word,  or you can add the  word  to
       the dictionary.

       A  "word"  is defined as any string of 1 or  more  characters,  which
       begins and ends with an alphabetic character ('A'-'Z'),  and contains
       only alphabetic characters plus "-" or "'".


       1.1 System Requirements

             Operating system: DOS 3.0 or greater
             Processor: Any 8088 or compatible processor
             Free Memory: 320K

       1.2 Limitations

          1.2.1 Word Size

             Single words up to 255 characters in length  can  be  processed
             from the input file,  although words longer than 31  characters
             can not be stored in the dictionary.

          1.2.2 Line Size

             Input text lines can be up up to  4095  characters  in  length,
             although lines longer than 240 characters will not be  entirely
             displayed in the line view window,  and lines longer than  1540
             characters cannot be edited.

          1.2.3 Dictionary Size

             DDSPELL  uses  2  64K  "segments"  to  store  the   words   the
             dictionary. One segment is the hash index table, which stores 2
             characters from all possible words.  The second segment  stores
             the remaining characters from each individual word. Assuming an
             average word size of  8  characters,  this  provide  dictionary
             storage for over 10,000 words (65536/6).

          1.2.4 Extra Word List

             DDSPELL's extra word list feature has  a  limit  of  500  extra
             words.  Note also that the extra  words  DO  occupy  dictionary
             memory space using the same rules as noted above.
    DDSPELL: a tiny/fast spelling checker                            Page: 2


    2. The DDSPELL Program

       To spell check one or  more  documents,  use:  DDSPELL  <filename>...
       <options> where <filename>...  represents the names of up to 25 files
       containing the documents in the form of  ASCII  text,  and  <options>
       represents any command line options  that  you  wish  to  apply  (see
       following section).

       2.1 Command Line Options

          The following command line <options> are available:

          2.1.1 /D = Do not warn duplicate dictionary entries

             This option prevents DDSPELL from printing an error message for
             each duplicate entry found in the  input  dictionary  or  extra
             word list.  This provides a useful means of extracting  a  word
             list from any existing document file. Simply make a copy of the
             document file,  then run DDSPELL specifying this  file  as  the
             dictionary or extra word list.  DDSPELL  will  read  the  file,
             silently removing all duplicated words,  and will then re-write
             the file as a simple word list in dictionary format.

          2.1.2 /M = Force monochrome display

             Inhibits the color display, even if a color adapter is present.
             This option may be useful if your  monitor/adapter  combination
             provides an unpleasant or unusable display for DDSPELL.

             Note: If some of the DDSPELL windows appear to be an unreadable
             washed-out yellow color,  try adjusting the color  contrast  on
             your monitor. Those windows should be an easy to read brown.

          2.1.3 /P = Disable auto-prefix

             DDSPELL  automatically  recognizes  the   following   hypenated
             prefixes:
                auto- bi- cross- double- hand- in- less-  multi-  near-  no-
                non- off- on- post- pre- re- single- triple- un- uni-
             If a word is not recognized, and it is found to contain a known
             word which is prefixed by one of these,  the word is passed  as
             "OK". The /P option disables this feature, causing unrecognized
             hypenated words to be processed like any other.

          2.1.4 D=file = Specify dictionary filename

             DDSPELL normally reads it's primary word list (dictionary) from
             a file called  "DDSPELL.DCT"  which  must  be  located  in  the
             DDSPELL home directory  (the same directory as the  DDSPELL.COM
             program file).  The D= option allows you  to  use  a  different
             dictionary file.  If the filename specified does not contain  a
             path specification  (determined by the presence of ':' or '\'),
             the new file is assumed to reside in the DDSPELL home directory
             (hint:  Use  "D=.\file"  if you want to use  a  file  from  the
             current directory).
    DDSPELL: a tiny/fast spelling checker                            Page: 3


          2.1.5 E=file = Specify extra word file

             DDSPELL supports a second  dictionary,  called  "Extra"  words.
             This allows you to minimize the main dictionary size by keeping
             lists of specialized words for use with specific documents. The
             extra word file is optional,  but if specified,  you must  give
             the entire path to it  (it is not  assumed  to  reside  in  the
             DDSPELL home directory).

          2.1.6 M=number - Specify minimum word size

             DDSPELL does not check the  spelling  of  words  which  contain
             fewer characters  than  the  minimum  word  size.  The  default
             setting of this value is 2,  which means that DDSPELL does  not
             normally complain about single  letters  appearing  within  the
             word text.  Setting M=1 would cause "spelling errors" for those
             letters which are not a recognized single-letter word.  Setting
             M=3  might  be  useful  in  a  document  containing  a  lot  of
             two-character abbreviations.

       2.2 Dictionary file format

          DDSPELL stores it's primary and extra word lists in files known as
          a  "dictionary".  These files  will  be  accepted  by  DDSPELL  in
          "free-format"  (as many words per line as  you  like,  punctuation
          ignored etc.) within the limits of any document.

          When rewriting it's dictionary after it has been changed,  DDSPELL
          will write the file as a simple word list, one word per line.  Due
          to the way DDSPELL optimizes it's dictionary memory, the file will
          NOT be output in completely alphabetical order,  and in fact  will
          usually be written in a different order every  time  a  change  is
          made to it.

          If you want to compare two dictionarys,  or just want to keep your
          dictionary files in order,  use the MSDOS  "sort"  utility to sort
          the dictionary files:

                       SORT <olddictionary >newdictionary

          DDSPELL does  not  care  about  word  ordering  when  reading  the
          dictionary.
    DDSPELL: a tiny/fast spelling checker                            Page: 4


       2.3 Screen Layout

          Once active, DDSPELL shows the following windows on the screen, in
          order from top to bottom:

          2.3.1 Title Window

             The title window shows the name of  the  file  currently  being
             processed,  the line number  within  the  file,  and  the  word
             currently being examined.

          2.3.2 Line Display Window

             The line display window shows the entire line  currently  being
             processed. The word being examined will be hilighted in reverse
             video.

             Note:  Only the first  240  characters  of  the  line  will  be
             displayed.

          2.3.3 Main Working Window

             The main working  window  performs  multiple  functions,  which
             varies depending on the function currently being performed.

                - When "close" words are found:
                  Offers a selection of available "close" words.
                - When no close words are found:
                  Offers a selection of available commands.
                - When editing a word/line/filename:
                  Presents the text being edited
                - Display informational messages and prompts at other times.

          2.3.4 Command/Status window

             When processing words,  the  command/status  window  shows  any
             selection entry being made  on  the  left,  while  showing  the
             remaining free dictionary space on the right.

             When editing text, the command/status windows shows the current
             character position within the line as well as the maximum  line
             length.
    DDSPELL: a tiny/fast spelling checker                            Page: 5


    3. Using DDSPELL

       Once active, DDSPELL will scan the document files and prompt with any
       words which it does not recognize.  If words exist in the dictionary,
       DDSPELL will offer these words in the form of  a  menu,  otherwise  a
       short list of the available commands is displayed.

       When determining "close"  words,  DDSPELL searches the dictionary for
       words which differ from the original word by the following rules:
          - Has any one character different
          - Has any two adjacent characters transposed
          - Is missing any one character
          - Has one extra character in any position
          - Matches the original word after removing any  of  the  following
            common suffixes from it:
               s 's ing ed es er or ly age
       (When a word is found by removing a suffix, DDSPELL hilights the word
       menu selection number, allowing you to easily know that the main part
       of the word matches a correct dictionary entry)

       When replacing a word with one selected from the dictionary,  DDSPELL
       uses the following rules to determine the capitalization of  the  new
       word:
          - If the first character of the original word was a  capital,  the
            first character of the new word is written as a capital.
          - If all remaining alphabetic characters of the the original  word
            were capitals,  the remainder of the  new  word  is  written  in
            capitals, otherwise it is written in lower case.

       3.1 Commands

          The following command keys may be used when DDSPELL prompts with a
          unrecognized word:

          3.1.1 0-9 - Select word from displayed "close word" menu

             The number keys allow you to select a word  from  the  menu  of
             "close" words. The number you have entered is shown on the left
             side of the command/status window.  When you have  entered  all
             digits of the entry number,  press ENTER to replace the word in
             the source file.

          3.1.2 ENTER - Replace with selected "close" word

             After entering a selection number from  the  close  word  menu,
             press ENTER to accept this as the new word,  replacing the  one
             in the source file with the one selected from the menu.

          3.1.3 BACKSPACE - Backup in select entry

             The  BACKSPACE  key  removes  the  last  digit  entered  in   a
             selection.
    DDSPELL: a tiny/fast spelling checker                            Page: 6


          3.1.4 SPACE - Accept word "as is"

             Pressing SPACE causes DDSPELL to  skip  the  word,  leaving  it
             unchanged.  DDSPELL  will  continue  to  detect  this  word  as
             unrecognized,  therefore if the same word occurs again  in  the
             document, you will again be prompted for the action to take.

          3.1.5 A - Accept word

             Causes DDSPELL to  "Accept"  the displayed word as a new  word.
             The word is NOT added to the dictionary,  but is added  to  the
             "Extra word" list. Further occurrences of this word will not be
             flagged.

             If you use this command,  and specified an extra word list file
             (E=file) when you started DDSPELL, you will be prompted with an
             offer to resave the new extra word list to that file at the end
             of the session.  (If no E=file was specified,  extra words  are
             "thrown away" at the end of a session).

          3.1.6 B - Backup to start of line

             Causes DDSPELL to re-scan the entire source file line from  the
             beginning.

          3.1.7 D - add word to Dictionary

             Causes DDSPELL to accept the word,  and add it to the permanent
             dictionary.  Further  occurrences  of  the  word  will  not  be
             flagged.

             You will be prompted with an offer to resave the dictionary  at
             the end of the session.

          3.1.8 E - Edit word

             Invokes the DDSPELL editor, allowing you to make changes to the
             displayed word.  After saving the word from the editor, DDSPELL
             will re-scan the word.


          3.1.9 L - Edit line

             Invokes the DDSPELL editor, allowing you to make changes to the
             entire displayed line.  After saving the line from the  editor,
             DDSPELL will re-scan from the beginning of the new line.

          3.1.10 R - Replace word

             Invokes the DDSPELL editor with an "empty" buffer, allowing you
             to enter text to completely replace the displayed  word.  After
             saving the word from the editor,  DDSPELL will re-scan the  new
             word.
    DDSPELL: a tiny/fast spelling checker                            Page: 7


          3.1.11 F10 - Exit DDSPELL

             Causes DDSPELL to terminate,  updates  to  the  dictionary  and
             extra word file will be saved,  however changes to the  current
             document are lost.

       3.2 Editor

          DDSPELL includes a  simple  word/line  editor.  when  active,  the
          following keys are accepted:

          3.2.1 ENTER - Accept changes and exit

             Replace the word/line in the source file with the one from  the
             edit buffer and exits the editor.


          3.2.2 F10 - Exit without saving changes

             Exits the editor without replacing the original word/line being
             edited. All changes while editing are lost.

          3.2.3 Left/Right arrow keys - Move cursor by 1 character

             Moves the cursor back/forth by one character position.

          3.2.4 Up/Down arrow keys - Move cursor by 77 characters


             Moves  the  cursor  back/forth  by  77   character   positions,
             effectively moving it by one displayed line within the editor.

          3.2.5 Home - Position to start of word/line

             Positions the cursor to the beginning of  the  word/line  being
             edited.

          3.2.6 End - Position to end of word/line

             Positions the cursor the the end of the word/line being edited.

          3.2.7 PgUp - Clear entire line

             Clears the edit buffer,  presenting you with an  empty  screen.
             This is useful if you decide to "start over from the beginning"
             with a word or line being edited.

          3.2.8 PgDn - Clear to end of line

             Clears the edit buffer from the cursor position to the  end  of
             the buffer.
    DDSPELL: a tiny/fast spelling checker                            Page: 8


          3.2.9 Ins - Toggle insert mode on/off

             Toggles on/off the insertion of data into a line.

             When insert  is  ON,  the  "[INS]"  indicator  appears  in  the
             command/status window, and the cursor changes to a block.  Data
             entered into the line will be inserted,  with the previous data
             to the right of the cursor shifting to the right to make room.

             When insert is OFF,  the  "[INS]"  indicator does not appear in
             the command/status window,  and the cursor changes to  a  line.
             Data entered into  the  line  will  overwrite  data  previously
             occupying the positions in the  line  where  the  new  data  is
             entered.

          3.2.10 Del - Delete character under cursor

             Removes the character under the cursor from  the  edit  buffer.
             Data to the right of the cursor position will move to the  left
             to  "fill"  in the space previously  occupied  by  the  deleted
             character.

          3.2.11 Backspace - Delete character preceding cursor

             Moves the cursor one position  to  the  left,  then  perform  a
             delete operation, removing the character under the cursor.

          3.2.12 <text>

             Any ASCII data entered into the line will be entered  into  the
             line.  The new data will either be inserted into the  line,  or
             will overwrite previous data,  depending on the current "Insert
             mode" setting.
