Improved Spelling Checker (EDX 6.0 Nov. 06)

Post user created macros to share with others here.

Moderator: Moderators

Improved Spelling Checker (EDX 6.0 Nov. 06)

Postby deleyd on Wed Mar 17, 2004 1:18 am

IMPROVED SPELLING CHECKER FOR MULTI-EDIT (Version 6.0) November, 2006

Compatible with Multi-Edit versions 9.0, 9.10, & 10.0 (ME2006)
  • Improved Spell Guessing
  • Foreign Word Support
  • Integrates Seamlessly With Existing Multi-Edit Spell Checker Interface
  • Keeps Track Of Previous Corrections You've Made
  • Faster

IMPROVED SPELL GUESSING
Sometimes Multi-Edit fails to guess the correct spelling of a word when I make a simple typing mistake. This Spelling Checker for Multi-Edit concentrates on common typing mistakes when spell guessing. If it fails to come up with any guesses it then switches over to regular Multi-Edit spell guessing (new to version 6.0).

FOREIGN WORD SUPPORT
(New to version 6.0) You can create a Spelling Dictionary which contains foreign words with characters such as:

ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ

Some languages such as French use these characters with accents. These are characters above ASCII 127.

INTEGRATES SEAMLESSLY WITH EXISTING MULTI-EDIT SPELL CHECKER INTERFACE
This Spelling Checker for Multi-Edit integrates seamlessly into Multi-Edit. It uses the same dialog interface as the regular Multi-Edit spelling checker, so on the surface it looks and works the same. The differences are all internal, with improved speed, improved spell guessing, and support for foreign languages. It still checks the user's AUX1 and AUX2 dictionaries when spell checking a word, and it checks the user's AUX1 dictionary when spell guessing, just as the regular Multi-Edit spelling checker does.

KEEPS TRACK OF PREVIOUS CORRECTIONS YOU'VE MADE
This Spelling Checker keeps track of previous corrections you've made so if it comes across the same misspelled word again it will offer the previous correction as the suggested correction.

Although the emphasis here is on Multi-Edit (www.multieditsoftware.com), edxspell.dll can easily be used by any application wanting to add spell checking and/or spell guessing capabilities.

The edxspell.dll contains routines "edx$dic_lookup_word" for checking the spelling of individual words, and "edx$spell_guess" for guessing the spelling of a misspelled word. A few small changes to Spell.s and it's up and running.

This code is also available at http://www.codeproject.com/cpp/EDXspell.asp (minus the Multi-Edit specific stuff). It's a general purpose spelling checker.

You'll need to download both "EDX Spelling Checker 6.0.zip" and "EDX_DICTIONARY.ZIP" (next post).

UPDATES
-----------
03/10/2006 Version 4.02 Spell guessing now checks user's Aux1 dictionary for possible guesses. Also spell checker now keeps a list of corrections made, so if we encounter the same misspelled word again, the correction made previously will be placed in the "Change To:" field as the suggested correction.

05/20/2006 Version 4.03
Compatible with ME2006 (Multi-Edit version 10)

06/01/2006 Version 4.04
Updated EDX_DICTIONARY.TXT to include new words which didn't exist 20 years ago when I originally made the lexicon. Words like "internet", "email", "newsgroup", "laptop", etc. The new EDX_DICTIONARY.TXT file has 91,036 words. (The old EDX_DICTIONARY.TXT file had 90,713 words.) Version 4.02 & 4.03 users need only rebuild EDXDIC.DIC and replace the old one with the new. (The only thing that changed in zip file EDX Spelling Checker 4.04.zip are the ReadMe.txt files where they mention the lexicon.)

06/02/2006 Version 4.04a
Updated EDX_DICTIONARY.TXT . Added back single letters a-z and 120 special two character sequences.

07-08-2006 Version 5.00
Updated EDXSPELL.DLL . The call to edx$spell_guess was modified from one parameter to three. The extra two parameters are errbuf and errbuflen. Added error checking for EXCEPTION_IN_PAGE_ERROR which can occur if the EDX Dictionary file (EDXDIC.DIC) is located on a remote computer and the network connection to that remote computer goes down. Added closing of EDX Dictionary when DLL is unloaded.

Updated SpellEDX.s to use new DLL. Modified code so words checked message goes by 1000's, which speeds up the code even more and displays better on ME2006.

Updated EDXBuildDictionary to pause before exit so user can read messages before program exits.

Updated EDX_DICTIONARY.TXT, adding a few more words.

11/22/06 VERSION 6.0
Updated spell guessing. If EDX Spell Guessing doesn't come up with any suggestions, then we switch to using Multi-Edit's Spell Guessing.

Also updated the package to handle extended ANSI characters such as:
œ Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ
These are characters with byte values above 127 (up to 255).


[NOTE: http://www.codeproject.com/cpp/EDXspell.asp may have an updated version if you intend to use this spelling checker for purposes other than Multi-Edit.]
Attachments
EDX Spelling Checker for Multi-Edit 6.0.ZIP
(You'll also need to download EDX_DICTIONARY.ZIP [next post])
(193.17 KiB) Downloaded 1228 times
Last edited by deleyd on Wed Nov 22, 2006 7:01 pm, edited 18 times in total.
User avatar
deleyd
Developer
 
Posts: 1019
Joined: Tue Jul 29, 2003 4:27 pm
Location: Santa Barbara, CA

Postby deleyd on Wed Mar 17, 2004 1:23 am

This is the main lexicon for the EDX spelling checker.

06/01/2006 Version 4.04
Updated EDX_DICTIONARY.TXT to include new words which didn't exist 20 years ago when I originally made the lexicon. Words like "internet", "email", "newsgroup", "laptop", etc. The new EDX_DICTIONARY.TXT file has 91,036 words. (The old EDX_DICTIONARY.TXT file had 90,713 words.)

06/02/2006 Version 4.04a
Updated EDX_DICTIONARY.TXT . Added back single letters a-z and 120 special two character sequences. This EDX_DICTIONARY.TXT file has 91140 words.

07/08/2006 Version 5.00
Updated EDX_DICTIONARY.TXT . This EDX_DICTIONARY.TXT file has 91194 words.
Attachments
EDX_DICTIONARY.ZIP
Main Lexicon for EDX Spelling Checker
(246.36 KiB) Downloaded 6380 times
Last edited by deleyd on Tue Nov 07, 2006 8:30 am, edited 8 times in total.
User avatar
deleyd
Developer
 
Posts: 1019
Joined: Tue Jul 29, 2003 4:27 pm
Location: Santa Barbara, CA

Postby deleyd on Thu Mar 16, 2006 7:41 pm

March 2006 - Version 4.02 Released.

Spell guessing now checks user's Aux1 dictionary for possible guesses. Also spell checker now keeps a list of corrections made, so if we encounter the same misspelled word again, the correction made previously will be placed in the "Change To:" field as the suggested correction.
User avatar
deleyd
Developer
 
Posts: 1019
Joined: Tue Jul 29, 2003 4:27 pm
Location: Santa Barbara, CA

Postby deleyd on Sat May 20, 2006 8:03 pm

May 2006 - Version 4.03 Released.
Compatible with Multi-Edit versions 9.0, 9.10, and 10.0 (ME2006)
User avatar
deleyd
Developer
 
Posts: 1019
Joined: Tue Jul 29, 2003 4:27 pm
Location: Santa Barbara, CA

Postby deleyd on Sun Jul 09, 2006 6:43 am

July 2006 - Version 5.00 Released.
Compatible with Multi-Edit versions 9.0, 9.10, and 10.0 (ME2006)

Added some documentation on how to add the EDX Spell Checker ability to any program you have, and included a small demo program.
User avatar
deleyd
Developer
 
Posts: 1019
Joined: Tue Jul 29, 2003 4:27 pm
Location: Santa Barbara, CA

Postby deleyd on Wed Nov 22, 2006 7:04 pm

11/22/06 VERSION 6.0
Updated spell guessing. If EDX Spell Guessing doesn't come up with any suggestions, then we switch to using Multi-Edit's Spell Guessing.

Also updated the package to handle extended ANSI characters such as:
œ Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ
These are characters with byte values above 127 (up to 255). Users may now create an EDX spelling checker lexicon database for a foreign language, such as French.
User avatar
deleyd
Developer
 
Posts: 1019
Joined: Tue Jul 29, 2003 4:27 pm
Location: Santa Barbara, CA

Are you accepting words for your DICTIONARY.TXT file?

Postby John Martzouco on Thu Nov 30, 2006 2:54 pm

If so...

configurable
popup
unhandled
unreleased

Any chance you could add functionality that would let me add a second TXT file to the compile? Something like USER_ADDED.TXT... that way when I build, I could keep the base set of word and add my own as well.

PS - Very much enjoying your Spell Checker... good job!
User avatar
John Martzouco
Registered User
 
Posts: 325
Joined: Fri Jun 09, 2006 1:22 am
Location: Montreal, Canada

Re: Are you accepting words for your DICTIONARY.TXT file?

Postby deleyd on Thu Nov 30, 2006 7:40 pm

John Martzouco wrote:If so...

configurable
popup
unhandled
unreleased

Any chance you could add functionality that would let me add a second TXT file to the compile? Something like USER_ADDED.TXT... that way when I build, I could keep the base set of word and add my own as well.

PS - Very much enjoying your Spell Checker... good job!


Well the words need to be sorted, So it would be necessary to merge/sort the two files in to a new file, and call that new file EDX_DICTIONARY.TXT . All this could just as well be done externally. So you could write a batch file or something which does the merge/sort, names the output file EDX_DICTIONARY.TXT, then runs EDXBuildDictionary.exe .

There is another option which may suit your needs. The latest version of edxspell.dll at http://www.codeproject.com/cpp/EDXspell.asp now includes support for a user's personal auxiliary dictionary. I didn't put that version here since Multi-Edit already supplies an AUX1 and AUX2 dictionaries. Anyway in the latest version the call to edx$dic_lookup_word is now
Code: Select all
status = edx$dic_lookup_word(char *spellword, char *errbuf, int errbuflen, char *Dic_File_Name, char *Aux1_File_Name);

Here Aux1_File_Name is the name of a plain text file with one word per line. It's expected that this file will not be too long. There is no length limit, it's just if the word isn't found in the main EDX dictionary then it searches this, which is all loaded into memory, so the search will go very fast, until you start page faulting, which will only happen if this list is very long. You could probably have up to 8192 characters with no serious performace drop. Then all you would need to do is modify the call to edx$dic_lookup_word in EDXspell.s to include passing the Aux1_File_Name, and upgrade to the new edxspell.dll.

Well those are the ideas I have so far of what options are currently available.
User avatar
deleyd
Developer
 
Posts: 1019
Joined: Tue Jul 29, 2003 4:27 pm
Location: Santa Barbara, CA

Postby LarryEdwards on Thu Jul 26, 2007 8:23 pm

Deleyd,

I just installed your dictionary in my ME 9.10.04, which fixed one of two problems I was having. I now have spelling suggestions, which is great!

However, when I try to add a word to Aux1, ME crashes. I was having this problem with the original spell checker also. Do you have any idea how to fix that?

-- Larry
LarryEdwards
Registered User
 
Posts: 44
Joined: Fri Jan 23, 2004 2:18 am
Location: Sitka, Alaska

Postby LarryEdwards on Thu Jul 26, 2007 9:39 pm

I have fixed the crash problem, at least when using EDX.

It seems that when the instructions say to copy EDXDIC.DIC to the Multi-Edit directory, an additional step is needed: run the spell checker, click Setup, and change the Common Word Dictionary specification from COMMON.DIC to EDXDIC.DIC. After doing that, all works fine.

This is a great improvement, deleyd. Thanks for this effort!

-- Larry
LarryEdwards
Registered User
 
Posts: 44
Joined: Fri Jan 23, 2004 2:18 am
Location: Sitka, Alaska


Return to User Created Macros

Who is online

Users browsing this forum: No registered users and 0 guests