Dec 232017
 
Spelling Checker Engine for Turbo Pascal 4.0, 5.0, and 5.5. Only includes TPU. Works great, and has the capability to have a HUGE dictionary.
File SPELL1.ZIP from The Programmer’s Corner in
Category Pascal Source Code
Spelling Checker Engine for Turbo Pascal 4.0, 5.0, and 5.5. Only includes TPU. Works great, and has the capability to have a HUGE dictionary.
File Name File Size Zip Size Zip Type
DEMO.EXE 12000 7220 deflated
DEMO.PAS 1459 599 deflated
SPELL.DIC 195445 156090 deflated
SPELL.DOC 10081 3423 deflated
SPELL40.TPU 7104 3277 deflated
SPELL50.TPU 7344 3218 deflated
SPELL55.TPU 7440 3247 deflated

Download File SPELL1.ZIP Here

Contents of the SPELL.DOC file




SPELL v1.4 Demo
Spelling Checker Engine
(c) Copyright 1989, by Acropolis Software
All rights reserved



Acropolis Software
4620 Hazel Ave.
Fair Oaks, CA 95628




Spell is provided on an "as is" basis without warranty of any kind
expressed or implied. In no event will Acropolis Software be liable
to you for any damages, including any lost profits, lost savings or
other incidental or consequential damages arising out of the use of
or inability to use the program, even if Acropolis Software has been
advised of the possibility of such damages, or for any claim by any
other party. Spell is copyrighted by Acropolis Software. Sale or
distribution of the source code or full compiled unit or word list by
anyone except Acropolis Software is strictly prohibited.




This SPELL should consist the following files:


SPELL.DOC This documentation file
SPELL40.TPU The compiled code unit for TP 4.0 (Rename SPELL.TPU)
SPELL50.TPU The compiled code unit for TP 5.0 (Rename SPELL.TPU)
SPELL55.TPU The compiled code unit for TP 5.5 (Rename SPELL.TPU)
SPELL.DIC Sample dictionary (51,581 words)
DEMO.PAS Demo program using SPELL.TPU
DEMO.EXE Compiled version of DEMO.PAS




The following are the types that are available from the SPELL unit.

Strg = STRING[20];

STRG is the type for words that go into and come out of the dictionary.
This means that words longer than 20 characters cannot be used with
SPELL. Believe me 21 character English words are not very common.


MaxSuggest = 10;

The maximum number of suggestions that SPELL will return. By the time
the suggestions get down to the tenth word they typically have less than
a 65% chance of being the correct spelling.


ShortList = ARRAY[1..MaxSuggest] OF Strg;

This is the structure returned by the suggestion routine. It will
contain the most likely word in the first element [1] the next in
the second [2] and so on. If less than MaxSuggest words are found
with a likelihood of 50% or more the subsequent elements contain an
empty string ''.



FUNCTION LoadDictionary(FileName : STRING) : BOOLEAN;

This is the first function you would use. It loads the dictionary
into RAM for processing. FileName is the name of the dictionary
file. These package comes with a dictionary with the name of
'SPELL.DIC'. You can rename the dictionary file. But cannot alter
it. Until you load the dictionary into RAM, SPELL uses a default
dictionary containing only one word 'A'. Upon quitting your program
SPELL will deallocate the memory that it has allocated for the storage
of the dictionary. If you make multiple calls to LoadDictionary it
will free the space from any currently loaded dictionary before loading
the new dictionary.

LoadDictionary returns TRUE if the dictionary loaded properly. If
for some reason the dictionary would not load it returns FALSE.




{ The following is not available in the demo version }

FUNCTION SaveDictionary(FileName : STRING) : BOOLEAN;

This function saves the dictionary that is currently in RAM to the
file that you specify. If the file saves properly it will return
TRUE. If for some reason (no disk space, bad file name) the file
cannot be saved SaveDictionary will return FALSE.




FUNCTION DictionaryWords : LONGINT;

DictionaryWords is a simple one. It returns the number of words
in the current dictionary. It compensates for the 'A' that is in
every dictionary chunk. (See "Assorted Things" at the end of this
document.)




FUNCTION GoodWord(CWORD : Strg) : BOOLEAN;

GoodWord takes a word that you pass it and returns TRUE if it was
found in the dictionary or FALSE if it was not found. As you could
imagine, GoodWord is the most used function in SPELL.



{ The following is not available in the demo version }

FUNCTION AddWord(S : Strg) : BOOLEAN;

Adds the word S to the dictionary in memory and returns TRUE. If
the word is already in the dictionary or there is not enough free
memory to store the word it will return FALSE. Be careful with this
function. Once you add a word to the dictionary it cannot be removed.




PROCEDURE SuggestWords(MatchWord : Strg; VAR Sw : ShortList);

SuggestWords returns a list of words from the dictionary that closely
match MatchWord. The list includes splitting MatchWord up into more
than one word. An example would be:

THEONE = THE ONE
THRONE
THENCE
THEN
THEE
THEOREM
THROE
THREE
THOSE
THESE

All the words returned by SuggestWords will be in uppercase. It is
up to you to convert them to upper-lower case if need be. If there
are less than MaxSuggest words that SPELL finds to suggest then the
unused element of the array are filled with an empty string.

SuggestWords has one slight problem at the moment. It is a bit slow
at making suggestions for words that start with certain letters.
Most notable are 'S' and 'C' with those two letters it can take
six to ten seconds to find a match on an 8Mhz AT clone. The
registered version should be faster. (See "Assorted Things" at the
end of this file.)



{ The following is not available in the demo version }

PROCEDURE OptimizeDictionary;

Compresses the current dictionary if it requires it. Once a chunk
in the dictionary is optimized to will take up much less space,
but you can no longer add words to that chunk. This really isn't
a problem since the number of chunks a dictionary can have is only
limited by the amount of RAM. (See "Assorted Things" at the end of
this document.);



{ The following is not available in the demo version }

FUNCTION DumpWords(FileName : Strg) : BOOLEAN;

Dumps all the words in the RAM dictionary to a file called FILENAME.
DumpWords will return TRUE if the dump was successful, it will return
FALSE otherwise. The list will be in the form of all the words each
on a separate line. Be warned, with the sample dictionary included
with SPELL the resulting list of words is over 400K long so you need
either a hard drive or a 3.5" or High Density disk drive to hold it.




Assorted Things


The included compiled units are for Turbo Pascal 4.0, 5.0 & 5.5.

The only characters allowed in words in the dictionary are as follows:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - . / _ * '

If a word has any characters other than those listed above it will not
be found in the dictionary. SuggestWords will give you suggestions
on it but none of the suggested words will contain a character that
is not in the above list.

Speeding up suggestions. I am still working on making SPELL faster.
The current version is much faster than the one before it, and the
one before that and so on.




REGISTRATION

I hate to do this, but I have put a lot of work into creating and
refining SPELL. A lot of time has been spent trying to make SPELL a
good bug free program. As the old saying goes time is money.
Registration will get you the latest version of the source code to
SPELL along with the most recent dictionary in both the .DIC format
and as a raw word list (over 500K at this time). In addition you
will receive several utilities to aid in the management/creation of
the dictionary file.

To register send $50 to Acropolis Software to purchase your copy of
SPELL. The only restrictions place on its use is that you do not
distribute the source code or a .TPU file with access to all of the
functions. You may include it inside of your own applications.

Please use the registration form included with your order. If you
do not use the form please indicate if you want 5 1/4" or 3 1/2"
disks and the version of the demo that you are currently using.


Thank You,

Robert Bequette
Acropolis Software
4620 Hazel Ave.
Fair Oaks, CA 95628


_____________________________________________________________________

Registration / Order Form


Name : __________________________
Company : __________________________
Address : __________________________
__________________________
City/State : __________________________
Zip Code : __________________________

(Optional)
Phone : __________________________



SPELL v1.4 source code registration: $50 ___

Disk Format: 5 1/4" ___ 3 1/2" ___

The product being registered is SPELL v1.4.
You will receive the latest version of the source code and
dictionary as well as several utilities to aid in the management
of the dictionary.



Send check, money order, or cash to:

Acropolis Software
4620 Hazel Ave.
Fair Oaks, CA
95628-6528


______________________________________________________________________





 December 23, 2017  Add comments

Leave a Reply