home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / msdos / txtutl / cspella.arc / CSPELLA.DOC next >
Encoding:
Text File  |  1987-12-15  |  15.4 KB  |  332 lines

  1.  
  2.  
  3.  
  4.  
  5.         
  6.         
  7.                 
  8.                         COPYRIGHT(C) 1987 PETER A. BANKS
  9.  
  10.  
  11.  
  12.            The copyright of this program is retained by its author.
  13.            It may be  freely  distributed. It may  neither be  sold
  14.            for  profit  nor included in  a  sold  software  package
  15.                       without permission of the author.
  16.  
  17.         
  18.         
  19.                                   DESCRIPTION
  20.  
  21.         
  22.         "CSPELLA" is a spelling checker program written in Turbo C V1 for
  23.         IBM PC and clones.  There is also a version for Digital Equipment
  24.         Corporation's Rainbow.   Cspella  marks  words  not found in it's
  25.         internal dictionaries with a  special mark character.  Ascii text
  26.         editors can later be used to search for this mark character to do
  27.         spelling correction  at  a later time.  The internal dictionaries
  28.         in  Cspella  have   almost  16,000  basic  words.    Due  to  the
  29.         suffix-handling  capacity  of  "CSPELLA",    in    effect,    the
  30.         dictionaries  may  contain up to  48,000  words.    In  addition,
  31.         "CSPELLA" supports a short user dictionary of up to 1000 words.
  32.  
  33.  
  34.         "CSPELLA", while  standing  in the tradition of previous "SPELLA"
  35.         programs, is radically  improved.    For  ease  of use and speed,
  36.         there is no longer  a  separate  standard  dictionary  file.  The
  37.         executable program including the integrated  dictionary  occupies
  38.         45%  less  disk space.  Program  design  is  greatly  simplified,
  39.         resulting  in increased speed.  Due to  the  elimination  of  the
  40.         separate  standard dictionary file, disk accesses are drastically
  41.         reduced, resulting in even greater speed.  The program  can spell
  42.         a 10k byte document in about 2 seconds on an  8mhz AT clone.  The
  43.         Rainbow  Version  does the 10k byte document in about 11 seconds.
  44.         The  earlier Turbo Pascal versions did the same 10K byte document
  45.         in 20  seconds  for the AT CLONE and 100 seconds for the Rainbow.
  46.         This is an increase in speed of 9 to 10 times.
  47.  
  48.         
  49.         The New Version in  C  supports  three new switches.  -V displays
  50.         text as it is spelled.    The  -D  switch  is  used  to  dump the
  51.         dictionary.    The  -M  allows the  user  to  specify  what  mark
  52.         character  is  used  to  label mispelled words.The  Command  line
  53.         parser was also modified to allow for Unix  Compatibility  should
  54.         the program ever be ported over to Unix.           
  55.                 
  56.                 
  57.         
  58.                 
  59.                         
  60.         
  61.                                    INSTALLATION
  62.       
  63.         In the  MSDOS  operating  system,  use the following commands to
  64.         copy "CSPELLA" into the desired directory.  
  65.          
  66.         E:>COPY  A:CSPELLA.EXE  E:\speldir\CSPELLA.EXE
  67.            
  68.         Edit autoexec.bat.   Enter  the  following  lines if they are not
  69.         already present.  The "PATH" statement tells the operating system
  70.         where to look for the program.  This enables you to run "CSPELLA"
  71.         from anywhere on the system.   The  "SET CSPELLA" statement tells
  72.         the operating system where to look for the personal dictionaries. 
  73.           
  74.         PATH E:\speldir\;
  75.  
  76.         The CSPELLA  command line is
  77.         
  78.         CSPELLA <FILENAME> <USERDIC> -V -D -N -M?
  79.         
  80.         -V enable Video display of text
  81.         -D dumps all of the dictionaries to Video Screen
  82.         -M allows user to define mark character
  83.         
  84.         -N WARNING DO NOT USE WITH SEDT OR PTP. LOSS OF DATA WILL RESULT
  85.         -N Is used for WORDSTAR Compatitibility Only.
  86.         
  87.         Switches can be place before or after the file names
  88.         
  89.         Source Document must be listed before the optional Personal Dictionary 
  90.         
  91.         Please hit any key to continue___
  92.  
  93.         
  94.         After the user hits the key the following  screen appears         
  95.         
  96.         Enter document to be spelled [Default exit]
  97.         ________________________________________________________________
  98.                  
  99.         If the user entered  the  filename  from the MSDOS System Prompt,
  100.         Cspella  writes the filename on  the  dotted  line.    Otherwise,
  101.         Cspella prompts the user to enter  it now.  If the program cannot
  102.         locate the file, it will give an  error  message and ask the user
  103.         to enter the filename again.  The program will loop in this cycle
  104.         until  it  gets  a  valid  file name or a  null  string  (just  a
  105.         carriage-return.) If it gets a null string, the program will exit
  106.         to the operating system.  Full MSDOS pathing is supported.              
  107.         
  108.         Assuming that a valid  file  name  for  the  source file has been 
  109.         entered, "CSPELLA" will now display the following line.   
  110.                 
  111.         Enter the personal dictionary [Default none]
  112.         _________________________________________________________________
  113.         
  114.  
  115.         
  116.         
  117.         
  118.                         
  119.         If the user entered the filename  of the personal dictionary from 
  120.         the MSDOS System Prompt, the filename is  written  on  the dotted 
  121.         line.    Otherwise, he is prompted to now  enter  it  now.    The 
  122.         program  assumes  that if pathing information is not included  in 
  123.         the file name then the file is in the logged directory, or in the 
  124.         directory  set  by the logical "CSPELLA" in autoexec.bat.  If the 
  125.         program cannot  open  the  user-dictionary, it will give an error 
  126.         message and ask  the  user  to  enter  the  filename  again.  The 
  127.         program will loop in  this  cycle until it gets a valid file name 
  128.         or a null string (just  a  carriage-return.)  If  it  gets a null 
  129.         string,  the  program  will  assume that  there  is  no  personal 
  130.         dictionary to be used.
  131.         
  132.         
  133.         "CSPELLA" will now go off  and mark errors, scrolling the text on
  134.         the  screen as it processes it.   Errors  in  the  text  will  be
  135.         displayed  at  bottom of screen .  The  program  will  gracefully
  136.         exit back to the operating  system if any key is pressed while it
  137.         spells the document.  When "CSPELLA" is done it will write to the
  138.         screen the total number of words and  the total number of errors.
  139.         The program will now display the following line.
  140.         
  141.         
  142.         Do you wish to save the input file?[Default no]___ 
  143.         
  144.                 
  145.         If the user enters "y" or "Y", "CSPELLA" will save the input as a
  146.         .B$K  file.   Otherwise, by default, the input file will  not  be
  147.         saved.
  148.          
  149.         
  150.                
  151.         If no  personal  dictionary  was specified and there are spelling
  152.         errors in the  text, "CSPELLA" will now prompt to see if the user
  153.         wishes to create a  personal  dictionary.   If the answer is "N",
  154.         Spella is finished its task.    If the user answers "Y", the name
  155.         of  the personal dictionary must be  entered.    Unless  specific
  156.         pathing  information  is included in the filename,  the  personal
  157.         dictionary  will  be  placed  in  the directory declared  in  the
  158.         environment  statement  in  AUTOEXEC.BAT.    If that file already
  159.         exists, the  user will be asked if he/she wishes to overwrite the
  160.         existing personal dictionary.    If the answer is "N" Spella will
  161.         end its work without  creating a new personal dictionary.  If the
  162.         user answers "Y" the existing  dictionary  will  be over written.
  163.         Each word marked as an error  is now displayed.  The user is then
  164.         asked if he/she wishes to add each  specific word to the personal
  165.         dictionary.  If the answer is "Y" or "y" then the word is added.
  166.         
  167.         If  a  personal  dictionary was specified at the beginning of the
  168.         program  and  there  were  spelling  errors, the user is asked if
  169.         he/she wishes  to  add  any  of  the  words.  If the user answers
  170.         anything but "Y"  or  "y"  the  program will conclude.  Otherwise
  171.         each word marked as  an  error  is  displayed.   The user is then
  172.         asked if he/she wishes to  add each specific word to the personal
  173.         dictionary.  If the answer is "Y" or "y" then the word is added.
  174.           
  175.         
  176.                       
  177.         "CSPELLA" is now done.  If  "CSPELLA"  was  called from an editor
  178.         the  user is now returned to that  program.    If  "CSPELLA"  was
  179.         called from the MSDOS System prompt, it returns  to the operating
  180.         system  in the directory from which it was called.    The  marked
  181.         file may now be edited.  
  182.                 
  183.         -N OPTION
  184.                  
  185.         The -N Option for  Wordstar  compatibility is only available from
  186.         the command line.  WARNING!!  DO NOT USE THE -N OPTION WITH SEDT.
  187.         THE NULL CHARACTER WILL CAUSE A FATAL CONDITION IN SEDT RESULTING
  188.         IN LOSS OF LARGE BLOCKS OF TEXT.    To use Wordstar to search for
  189.         the  null  characters,  press  <CONTROL-L>.  "CSPELLA" cannot  be
  190.         called automatically from Wordstar.  Use stand alone mode.
  191.                 
  192.                                    LIMITATIONS
  193.                        
  194.         "CSPELLA" will not process words  bigger than 20 characters.  Nor
  195.         will it process words of less  than  3 characters.  Therefore the
  196.         user  must  assume  responsibility  for checking these  types  of
  197.         words.
  198.         
  199.         "CSPELLA" does not check the appropriateness of suffixes added to
  200.         words but merely strips them to see if they  were added according
  201.         to the general rules of spelling.  Example, "CSPELLA" would treat
  202.         "lioned"  as  valid  word.  This is not usually a problem,  since
  203.         most spelling errors are of words we know the proper forms of.        
  204.         
  205.         
  206.                           WHERE TO GET "CSPELLA"
  207.     
  208.         DIGITAL EQUIPMENT CORP. EMPLOYEES  with  system  accounts  on  the
  209.         "ENET" may obtain "CSPELLA"  executables by copying "CSPELLA.ARC"
  210.         from 
  211.                   LEXREX::CSPELLA$CLONE:*.* for the IBM version
  212.                   LEXREX::CSPELLA$RBW:*.* for the DEC Rainbow version
  213.                 
  214.                  WARRANTY AND WHERE TO REPORT BUGS OR SUGGESTIONS
  215.  
  216.         Since  I  am not charging  anything  for  "CSPELLA"  I  will  not
  217.         guarantee the product.  However if you really  like "CSPELLA" you
  218.         may feel  free  to offer my wife and I a free trip to Hawaii.  If
  219.         you  live  in    the    Northwest,  offer  me  a  new  job  as  a
  220.         Software/Hardware Professional.  (Doesn't hurt to ask!) Seriously
  221.         though, feel  free  to  contact  me  with    "bug"    reports  or
  222.         suggestions, before 10:00 PM Eastern Standard Time at:
  223.         
  224.         Peter A.  Banks 32-6 Briarwood Lane Marlborough ,Ma 01752
  225.         Work Telephone:1-617-568-4855 (DTN 225-4855) ENET:RETORT::BANKS
  226.         HOME PHONE: 617-481-8242   
  227.          
  228.         
  229.         
  230.         
  231.         
  232.         
  233.                
  234.                            PROGRAM FLOW OF "CSPELLA"
  235.          
  236.         Initialize VALUES get file name etc.
  237.                   
  238.         Loop1     Read in  processable line
  239.         
  240.         Loop2     PARSE OUT TO A WORD
  241.  
  242.          if word                 
  243.         |-------<  first lookup in internal dictionaries.
  244.         |
  245.         |-------<  If not in dictionaries strip suffix look up again 
  246.         |          in internal dictionaries.              
  247.         |if word 
  248.         |-------<  If  still  not  found  binary  search  the  personal
  249.         |          dictionary.  
  250.         |          Write to heap string is not a word. 
  251.         |   
  252.         |------->  PROCESS RESULTS if not word write mark character and 
  253.                    output entry.  
  254.         
  255.         LOOP2 until END of line
  256.                          
  257.                    if EOL output corrected line to output file
  258.                 
  259.         Loop1 until EOF(input)
  260.                 close files
  261.                 save input file ?
  262.                 if not delete input file if yes rename input file
  263.         
  264.                 If personal dictionary used add desired words to personal
  265.                 dictionary
  266.         
  267.                 If  Personal  dictionary not  used  create  a  personal
  268.                 dictionary and add desired words to the personal dictionary
  269.         
  270.        END OF PROGRAM
  271.         
  272.                                 SEDT Description
  273.         
  274.         Sedt  is a screen editor written with the  goal  of  providing  a
  275.         common  editor  across  a wide range of operating systems.    For
  276.         ease of use, Sedt is programmed with a keyboard layout similar to
  277.         EDT  (The  Digital  Equipment Corp Vax-VMS Editor or PDP-11 KED).
  278.                                      
  279.                            Distribution Policy of Sedt
  280.  
  281.     Sedt  binaries  for VMS and Rainbow-100 are being made  available
  282.         for customers and Digital internal use on the condition that  the
  283.         original  copyright    is   not  violated  or  removed,  that  no
  284.         modifications  are  made  to  the  program  without  the  express
  285.         permission of the author Anker Berg-Sonne.
  286.     
  287.     There is a development  version  of Sedt that supports the IBM PC
  288.         family,  which  is  not  available  publicly  out side of Digital
  289.         Equipment Corp. This policy may well change in the future.
  290.         
  291.         
  292.         
  293.                           How to use Cspella with SEDT
  294.         
  295.         "SEDT" can be modified to  call  "CSPELLA".    To  do so the user
  296.         needs at least 380K bytes of memory.  Using SEDT on a system with
  297.         380K bytes of memory, the largest document  "CSPELLA"  can handle
  298.         is about 60K bytes in size.  In stand-alone mode "CSPELLA" is not
  299.         limited by the length of the document. 
  300.         
  301.         
  302.         If you wish to shell out of SEDT to "CSPELLA" and  back  again at
  303.         the  press  of a key, you MUST modify the key configuration file.
  304.         The  modification could be done as in the example below.  In this
  305.         example, a GOLD <CONTROL-S> will call "CSPELLA".  The filename of
  306.         the document edited  will be passed to "CSPELLA".  When "CSPELLA"
  307.         is done spelling the  document  SEDT  then loads the marked file,
  308.         which the user may now edit.  The <CONTROL-S> will find the words
  309.         marked as errors, deleting the marker character <144>.
  310.         
  311.                   
  312.         The  <144>  CHARACTER    (ASCII  #144)  is  entered  by  pressing 
  313.         [GOLD]144[GOLD][KEYPAD3].
  314.                        
  315. "EDT" EXAMPLE  A018.......
  316.              A019(@F~<144>~:D+@C).  
  317.              ;CONTROL-S  SEARCHES FOR<144> AND  DELETES THE <144> 
  318.              A020.....  
  319.                .    
  320.                .        
  321.                GA018.......        
  322.                GA019:FS~~:SYS~CSPELLA  %F~:FE~%F~.   
  323.                ;GOLD CONTROL-S    CALLS  CSPELLA 
  324.                GA020.... 
  325.         
  326.                 
  327.                                OH Yeah Trademarks
  328.         MSDOS (TM) Micro-SOFT Corp.
  329.         SEDT COPYRIGHT  (C)    DIGITAL    EQUIPMENT  CORP.
  330.         Turbo C (TM) Borland International.
  331.         WORDSTAR  (TM)  MicroPro International  Corp.
  332.