home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
PROGRAMS
/
PPSPELL
/
SPELED.DQC
/
SPELED.DOC
Wrap
Text File
|
2000-06-30
|
5KB
|
107 lines
"SPELL-ED"
A Utility Program For Use With
Alan Bomberger's
POOR PERSON'S SPELLING CHECKER
by
David Grenewetzki
DG/Systems
Alan Bomberger's program SPELL (the Poor Person's Spelling
Checker) which first appeared in "Dr. Dobbs Journal" has become a
success in the world of public domain software. The program
described in this documentation, SPELL-ED, extends the utility of
the original SPELL program by adding a number of features usually
found only in "commercial" products.
SPELL reads in a text file, constructs a list of distinct
words contained in the file, and compares this list with a number
of lexicon files. Next, SPELL outputs a list of the words not
found in the lexicon files to the terminal and optionally to a
file called SPELL.LEX. Other command line options allow the
output list to be also directed to the printer.
In normal operation, SPELL's output file of potential "bad"
words, SPELL.LEX, must then be edited to sort out "true"
misspelled words from those which are merely not "known" by the
lexicon. Finally, the original text file must be examined, and
the true "bad" words found and corrected. This editing process is
time consuming and often takes more time than manually proof
reading the original document.
The program described in this document, SPELL-ED, was created
to speed up the process of editing the file SPELL.LEX and
correcting the errors in the text file. SPELL-ED reads in SPELL's
output file, SPELL.LEX, and displays each potential "bad" word on
the console. The user is asked whether the word should be added
to the lexicon, marked for later editing in the original text file
or merely ignored.
Assume that you wish to check the spelling of an ASCII file
called FILE.TXT. First use SPELL to check the file against your
lexicon files using the command:
SPELL d:FILE.TXT F
The "d:" in the command line is an optional disk specifier. The
"F" in the command line forces the output list of potential "bad"
words to be placed in a file called SPELL.LEX on the default
drive. Next, invoke SPELL-ED with the following command:
SPELL-ED d:FILE.TXT
SPELL-ED assumes that the file SPELL.LEX is resident on the
default drive. When SPELL.LEX file is successfully opened, each
word in the file is displayed on the terminal and the user is
asked for one of three inputs:
A --> (A)dd to NEW.LEX
M --> (M)ark in FILE.TXT
I --> (I)gnore this word
If "A" is depressed, the displayed word will be added to the
end of the lexicon file, NEW.LEX. If the file NEW.LEX does
not exist, it will be created by SPELL-ED on the default
drive. If the file already exists on the default drive, the
new entries will be appended to the end of NEW.LEX.
If "M" is depressed, each occurrence of the displayed word in
the file d:FILE.TXT will be marked with a pair of trailing
#'s. For example, the misspelled word "calender" would
appear as "calender##" in the marked file.
If "I" (or any other key) is depressed, the displayed word
will be ignored i.e. neither sent to NEW.LEX nor marked in
FILE.TXT.
Typing a Control-C during this process will cause a graceful
abort of the program.
When the end of the list of "bad" words is reached, a temporary
file, TEMP.$$$, will be created (if necessary) to hold a marked
copy of FILE.TXT. When this file write is successfully completed,
the following steps occur:
1. Erase FILE.BAK (if it exists)
2. Rename FILE.TXT to FILE.BAK
3. Rename TEMP.$$$ to FILE.TXT
4. Erase SPELL.LEX
At this point, most word processors can easily search FILE.TXT
for the "##" pattern and find all words requiring correction in
minimum time. Also, your lexicon file NEW.LEX will have been
updated to include any "new" words found by SPELL.
The source code for SPELL-ED is written in Software Toolworks
C/80. This program is copyright 1982 by David Grenewetzki and
DG/Systems. Unlimited non-commercial distribution and use of
SPELL-ED is authorized. Send comments, suggestions and bug
reports to:
David Grenewetzki
DG/Systems
23145 Bigler Street
Woodland Hills, CA 91364
(213) 716-1655