home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
495a.lha
/
AZspell_v1.02
/
AZspell.DOC.pp
/
AZspell.DOC
Wrap
Text File
|
1991-04-06
|
13KB
|
280 lines
AZSPELL
-------
The Amiga spelling checker
--------------------------
by
Danny Hartley
Copyright © Danny Hartley, 1990.
AZspell and AZmerge can be used and distributed freely, but they are not
public domain. The author retains copyright. They may not be sold for
profit, or included with any commercial product without prior permission
from the author. This document must be supplied with the programs and
must not be modified.
AZdictionary is supplied 'as is' for public domain, and may be modified
and redistributed in a modified form - no guarantee is expressed or
implied as to the correctness of the words contained in the file.
AZspell and AZmerge were written in 68000 assembly language using the
excellent HiSoft Devpac2 assembler.
The files supplied are:
AZspell - The spelling checker program
AZmerge - The dictionary update program
AZassign - A script to assign AZspell:
AZdictionary - The dictionary
and their associated icons (.info files)
If you, like me, have great problems with spelling and/or your
typing fingers tend to hit every key except the one that your brain
told them to hit, then this is the program for you. A quick and simple
to use spelling checker.
All the files supplied have icons attached so that they may be
moved from volume to volume from the Workbench screen.
When a document is checked, words that cannot be found in the
dictionary can be simply added to the dictionary so that they are
remembered for the next time. The program uses an intermediate file
called AZupdate to allow you to check the words, should you need to,
before committing them to the main dictionary. The intermediate file
also has several more uses (see AZmerge and AZspell:Special Mode).
INSTALLING THE SPELLER
----------------------
For the speller to be most useful, that is, to allow words to be
added to the dictionary, it is best installing it onto a separate
disc. Installation is very simple.
If you require the speller to be kept on it's own disc, then format
a disc (initialize it), and rename it to AZspell. Once you have done that
then copy the files AZspell, AZmerge and AZdictionary onto the disc (by
dragging the icons from this drawer onto the new disc). As the disc is
called AZspell the program AZassign is not needed.
If you require the speller to be in a drawer on part of a disc, as
you would for a hard disc, then create the drawer for it (dragging
Empty from a Workbench disc would do), and copy the files AZspell,
AZmerge, AZassign and AZdictionary into the drawer. AZassign has to
be in the same drawer that AZdictionary is in, AZspell and AZmerge
could in fact be anywhere you choose to place them (except the bin!).
If you use AZassign then you will also need the following
Workbench V1.3 commands (in the C: directory) :
Run, FailAt, Execute, CD, IconX, Assign and Echo.
AZassign
--------
To allow maximum flexibility of speller configuration, ie. where
it is - from it's own separate floppy disc to a directory on a hard
disc, the speller uses a logical device name of AZspell: to store the
dictionary and update files on. If the speller resides on it's own disc
with a volume name of AZspell then you can ignore this program. If not
then copy AZassign along with AZspell, AZmerge and AZdictionary to the
drawer where you wish the speller to be.
Whenever you need to use AZspell or AZmerge then run AZassign first
by double clicking on the AZassign icon. After AZassign has run then
whenever you run AZspell or AZmerge they will be able to find the
dictionary.
NOTE: AZassign only has to be run once and of course after
the Amiga has been reset/turned off etc.
AZspell
-------
AZspell is the spelling checker program. To run it just double click
on it's icon. Once it has loaded the dictionary a window will appear
prompting you for the name of the document that you wish to check.
Just type the name of your document then press Enter, the name will
normally have to include the drive and/or directory of where the document
is, eg. df0:reports/report1. If the file could not be found or could not
be loaded an error message is displayed along with an AmigaDOS error
code, to allow you decide what is wrong.
The main part of the program is the checking window. It consists of
several sections.
The first section is the word stats, how many words are in the
dictionary and document (file). How many words have been checked so far,
how many were not found and how many are only used once. Please note to
make the checker check words quickly and only stop at words it can't find
the last three stats are only refreshed whenever the program has to wait
for a response from the user (you).
Underneath the stats is a correction box that allows you to type in
a new word whenever a word cannot be found.
At the bottom is a line from the document with the current word being
checked highlighted in the centre.
On the right hand side is a suggestions box. When a word can't be
found then a list of thirty closest possible words is generated. The
list takes words from the dictionary (including the word(s) added) and
any from the words ignored (they are remembered). This process takes
several seconds to complete. When the list has been compiled the words
are listed in order from the closest word at the top. To move the
list up and down use the Up and Do boxes respectively. Usually the word
you are looking for will be in the top few. If you wish to use one of
the words from the list of suggestions then just click on the word. It
will then be copied into the correction box, to allow it to be used for
correction.
A valid word (one that will be checked) is defined as a group of two
or more characters, the initial character must be alphabetic, the
remaining characters can be alphabetic, an apostrophe or a hyphen.
Anything that is not a valid word is not checked by the program.
The final section is the four boxes in the middle. These are for
instructing the program what to do when it can't find a word.
Add to dictionary - If the highlighted word in the document is not
already in the dictionary then it will be added
to the dictionary (via AZupdate).
Ignore word - Ignores the highlighted word but remembers it.
If you ignore a word then any further occurrences
of the word will also be ignored.
Correct word - Corrects the word with the word(s)/characters in
the correction box. If the correction box contains
a single valid word that is not already in the
dictionary then it will be remembered.
Correct word also has another mode. If the
correction box is empty then the word will be
completely ignored and not remembered.
Correct and Add - As Correct word but the correction box must only
contain a single valid word. If the word is not
already in the dictionary then it will be added
to the dictionary (via AZupdate).
The spelling checker can be stopped before all the words have been
checked by clicking on the close gadget.
When all the words have been checked (or you have stopped the speller
part way through) and words in the document have been corrected then a
window will appear asking you for the name to save the document under.
If words have been added to the dictionary then the words are saved
to the AZspell disc/directory in the file AZspell:AZupdate.
If you click on the close gadget when asked for the name to save the
document under then the document save AND the AZupdate save will both
be aborted.
Special Mode
AZspell has a special mode that allows the automatic collection of
mis-spelled/not found words in a document. This mode is only available
from the CLI/Shell as normally the machine would be left unattended,
controlled from a script. The command line format is:
AZSPELL [<file> [!]]
If the filename <file> is not specified then AZspell behaves as
normal just as if you had run it from the Workbench. If <file> is given
then it is loaded but otherwise nothing different. If a ! is given after
the filename, then the file is loaded, the checking window appears, but
if a word can't be found then it is automatically added to the dictionary
just as if you had click in the 'Add to dictionary' box. When AZspell
has completed then the file AZupdate can be examined to find any suitable
words for adding to the dictionary. In this way a large and thorough
dictionary can be easily built up.
If you do use this on a lot of documents and leave your Amiga running
while you watch Neighbours, then the script below should provide a
suitable starting point.
echo >ram:fried_egg "** file1 **"
azspell file1 !
join azspell:azupdate ram:fried_egg to ram:spam
echo >>ram:spam "** file2 **"
azspell file2 !
join azspell:azupdate ram:spam to ram:fried_egg
echo >>ram:fried_egg "** file3 **"
azspell file3 !
join azspell:azupdate ram:fried_egg to ram:spam
and so on...
AZmerge
-------
This program merges the words in AZupdate with the main dictionary
AZdictionary. After checking a document and you are sure that the words
that you have added to the dictionary (using Add to dictionary/Correct
and Add) are all correct then run this program by simply double clicking
on it's icon. A window will appear to tell you that it is running.
If you wish to add many words to the dictionary and don't want to
go through AZspell clicking 'Add to dictionary' all the time, then
using your favourite text editor, create a file of words and save it
as AZspell:AZupdate.
There must only be one word per line, each word must have two or
more characters, the initial must be alphabetic, each remaining character
can only be alphabetic, a hyphen or apostrophe - case doesn't matter,
any lower case letters are converted to upper case. AZupdate does not
need to be sorted.
Once AZupdate has been created then run AZmerge. Any words that are
already in the dictionary will be ignored, similarly if a word occurs
two or more times then only the first occurrence will be used.(This
could be used to join another dictionary with the main one)
AZdictionary
------------
This is the actual dictionary that AZspell uses to determine if a
word is correct or not, or isn't in the dictionary. The dictionary has
currently almost 12000 words which is hardly the whole English language
but does contain the most used words, so should be good for most of the
time unless you use very exotic words a lot. I should like to point out
that even though I have personally checked the whole dictionary, a task
only slightly more interesting than watching paint dry, the odd word or
two may have slipped past my bleary eyes, so I make no claim that the
dictionary is 100% correct.
** YOU HAVE BEEN WARNED **
You should always have a dictionary close to hand in any case.
The dictionary is purely a simple text file, and can be viewed (and
edited) with any text editor. All the words contain two or more
characters, are in upper case with one word per line and in strict ASCII
ascending order. If you decide to edit the dictionary then ensure that
the above is still true, particularly ensure there are no empty lines,
especially at the end of the file.
Any queries, suggestions, spare cash, beer, etc. to:
Danny Hartley
1 Alexandra Drive
Prestatyn
Clwyd
LL19 8BW
U.K.